xcat-core/xCAT-client/pods/man1/chvm.1.pod
2013-03-01 19:06:06 +00:00

569 lines
18 KiB
Plaintext

=head1 NAME
B<chvm> - Changes HMC-, IVM-, and zVM-managed partition profiles or virtual machines. For Power 775, chvm is used to change the octant configuration values for generating LPARs, set the octant memory interleaving value and change the I/O slots assignment to LPARs within the same CEC.
=head1 SYNOPSIS
B<chvm> [B<-h>| B<--help>]
B<chvm> [B<-v>| B<--version>]
=head2 PPC (with HMC) specific:
B<chvm> [B<-V>| B<--verbose>] I<noderange> [B<-p> I<profile>]
B<chvm> [B<-V>| B<--verbose>] I<noderange> I<attr>=I<val> [I<attr>=I<val>...]
=head2 PPC (using Direct FSP Management for Power 775) specific:
B<chvm> I<noderange> [B<-p> I<profile>]
B<chvm> I<noderange> [B<lparname>={B<*>|B<name>}]
B<chvm> I<noderange> B<-i id> [B<-m> I<memory_interleaving>] B<-r> I<partition_rule>
=head2 VMware/KVM specific:
B<chvm> I<noderange> [B<-a> I<size>] [B<-d> I<disk>] [B<-p> I<disk>] [B<--resize> B<disk>=I<size>] [B<--cpus> I<count>] [B<--mem> I<memory>]
=head2 zVM specific:
B<chvm> I<noderange> [B<--add3390> I<disk_pool> I<device_address> I<cylinders> I<mode> I<read_password> I<write_password> I<multi_password>]
B<chvm> I<noderange> [B<--add3390active> I<device_address> I<mode>]
B<chvm> I<noderange> [B<--add9336> I<disk_pool> I<virtual_device> I<block_size> I<mode> I<blocks> I<read_password> I<write_password> I<multi_password>]
B<chvm> I<noderange> [B<--adddisk2pool> I<function> I<region> I<volume> I<group>]
B<chvm> I<noderange> [B<--addnic> I<address> I<type> I<device_count>]
B<chvm> I<noderange> [B<--addprocessor> I<address>]
B<chvm> I<noderange> [B<--addprocessoractive> I<address> I<type>]
B<chvm> I<noderange> [B<--addvdisk> I<userID]> I<device_address> I<size>]
B<chvm> I<noderange> [B<--connectnic2guestlan> I<address> I<lan> I<owner>]
B<chvm> I<noderange> [B<--connectnic2vswitch> I<address> I<vswitch>]
B<chvm> I<noderange> [B<--copydisk> I<target_address> I<source_node> I<source_address>]
B<chvm> I<noderange> [B<--dedicatedevice> I<virtual_device> I<real_device> I<mode>]
B<chvm> I<noderange> [B<--deleteipl>]
B<chvm> I<noderange> [B<--formatdisk> I<disk_address> I<multi_password>]
B<chvm> I<noderange> [B<--disconnectnic> I<address>]
B<chvm> I<noderange> [B<--grantvswitch> I<VSwitch>]
B<chvm> I<noderange> [B<--removedisk> I<virtual_device>]
B<chvm> I<noderange> [B<--resetsmapi>]
B<chvm> I<noderange> [B<--removediskfrompool> I<function> I<region> I<group>]
B<chvm> I<noderange> [B<--removenic> I<address>]
B<chvm> I<noderange> [B<--removeprocessor> I<address>]
B<chvm> I<noderange> [B<--replacevs> I<directory_entry>]
B<chvm> I<noderange> [B<--setipl> I<ipl_target> I<load_parms> I<parms>]
B<chvm> I<noderange> [B<--setpassword> I<password>]
=head1 DESCRIPTION
=head2 PPC (with HMC) specific:
The chvm command modifies the partition profile for the partitions specified in noderange. A partitions current profile can be read using lsvm, modified, and piped into the chvm command, or changed with the -p flag.
This command also supports to change specific partition attributes by specifying one or more "attribute equals value" pairs in command line directly, without whole partition profile.
=head2 PPC (using Direct FSP Management for Power 775) specific:
The chvm command is used to set the Power 775 pending octant partition configuration value, the pending memory interleave value, and also is used to assign the I/O slots to an lpar within the CEC.
The octant configuration value specifies one of five preset configurations. Each configuration specifies the number of lpars per octant and the percentage of CPUs and memory assigned to those lpars. The configuration values include:
=over
=over
=item B<1> - One partition with all cpus and memory of the octant
=item B<2> - Two partitions with a 50/50 split of cpus and memory
=item B<3> - Three partitions with a 25/25/50 split of cpus and memory
=item B<4> - Four partitions with a 25/25/25/25 split of cpus and memory
=item B<5> - Two partitions with a 25/75 split of cpus and memory
=back
=back
The memory interleaving value specifies how the memory is accessed within the octant and can be one of two values:
=over
=over
=item B<1> - interleaved or 8MC mode
Memory allocations are interleaved evenly across all eight memory controllers in the octant. This is the default value if -m is not specified. A value of 1 must NOT be specified if the octant is to be partitioned, i.e. have an octant configuration value of 2-5.
=item B<2> - non-interleaved or 2MC mode
Memory allocations are only interleaved across the two memory controllers on a local chip in the octant. A value of 2 MUST be specified if the octant is to be partitioned, i.e. have an octant configuration value of 2-5.
=back
=back
If octants in the same CEC are to have different memory interleaving values then they must be configured in separate chvm commands. For example, if octant zero is to have an octant configuration of 2 and octant one through seven are to have an octant configuration of 1 and a memory interleave value of 1 then the two commands would be:
chvm lpar1,lpar2 -i 1 -m 2 -r 0:2
chvm lpar3-lpar9 -i 5 -m 1 -r 1-7:1
The lsvm command can be used to verify the pending octant configurations are correct for the CEC.
To activate the pending configuration the CEC needs to be manually rebooted.
Once the CEC has the correct active configuration, the chvm command can then be used to assign I/O slots to new partitions in the CEC. Once again, the lsvm command can be used to display the current I/O slot assignments of the CEC. Before running the chvm command to update I/O slot assignments, ensure that both the current I/O owning lpar and the new I/O owning lpar are powered off. Otherwise, the chvm will return an error.
The lsvm command output can be redirected to a file. This file can then be edited to include only the current sixteen I/O slot assignments. A sample of some of the output is:
1: 537/U78A9.001.0123456-P1-C9/0x21010219/2/1
1: 514/U78A9.001.0123456-P1-C17/0x21010202/2/1
1: 568/U78A9.001.0123456-P1-C2/0x21010238/2/1
1: 561/U78A9.001.0123456-P1-C3/0x21010231/2/1
The number, as in the above example, or text before the ":" indicates the lpar id of the node or the node name. To change the I/O slot assignment, change this value to the new lpar id or node name, for example, 5 for lpar id 5 or use the node name "lpar5". For example:
1: 537/U78A9.001.0123456-P1-C9/0x21010219/2/1
1: 514/U78A9.001.0123456-P1-C17/0x21010202/2/1
5: 568/U78A9.001.0123456-P1-C2/0x21010238/2/1
5: 561/U78A9.001.0123456-P1-C3/0x21010231/2/1
This file can then be piped into the chvm command, or specified with the -p flag.
=head2 VMware/KVM specific:
The chvm command modifes the vm specified in noderange. Calling with deregister or purge options at the same time as the resize option is not recommended.
=head2 zVM specific:
The chvm command modifes the virtual machine's configuration specified in noderange.
=head1 OPTIONS
=head2 Common:
=over 10
=item B<-h>
Display usage message.
=item B<-v>
Command Version.
=back
=head2 PPC (with HMC) specific:
=over 10
=item B<-p> I<profile>
Name of an existing partition profile.
=item I<attr>=I<val>
Specifies one or more "attribute equals value" pairs, separated by spaces.
=item B<-V>
Verbose output.
=back
=head2 PPC (using Direct FSP Management for Power 775) specific:
=over 10
=item B<-i>
Starting numeric id of the first lpar in the octant. Valid id values are B<1>, B<5>, B<9>, B<13>, B<17>, B<21>, B<25> and B<29>. These values correspond to the first lpar id in each of the eight octants.
=item B<-m>
1 - interleaved or 8MC mode
2 - non-interleaved or 2MC mode
See interleaving description above for more information.
=item B<-r>
Octant partition configuration rule. The rule specifies the octant and the octant configuration value.
The format is " B<-r> B<octant_number:value>"
Multiple octants can be specified in the same rule: " B<-r> B<0-7>:I<value>"
If the octants use the different configuration value in one cec, it will be "B<-r> B<0>:I<value1>,B<1>:I<value2>,...B<7>:I<value7>", or "B<-r> B<0>:I<value1>,B<1-7>:I<value2>" and so on.
The octant configuration value specifies one of five preset configurations (B<1>, B<2>, B<3>, B<4>, B<5>). Each configuration specifies the number of lpars per octant and the percentage of CPUs and memory assigned to those lpars. The configuration values include:
1 - One partition with all cpus and memory of the octant
2 - Two partitions with a 50/50 split of cpus and memory
3 - Three partitions with a 25/25/50 split of cpus and memory
4 - Four partitions with a 25/25/25/25 split of cpus and memory
5 - Two partitions with a 25/75 split of cpus and memory
=item B<-p> I<profile>
Name of I/O slots assignment profile.
=item B<lparname>={B<*>|B<name>}
Set LPAR name for the specified lpars. If '*' specified, it means to get names from xCAT database and then set them for the specified lpars. If a string is specified, it only supports single node and the string will be set for the specified lpar. The user can use lsvm to check the lparnames for lpars.
=back
=head2 VMware/KVM specific:
=over 10
=item B<-a> I<size>
Add a new Hard disk with size defaulting to GB. Multiple can be added with comma separated values.
=item B<--cpus> I<count>
Set the number of CPUs.
=item B<-d> I<disk>
Deregister the Hard disk but leave the backing files. Multiple can be done with comma separated values. The disks are specified by SCSI id. Size defaults to GB.
=item B<--mem> I<memory>
Set the memory, defaults to MB.
=item B<-p> I<disk>
Purge the Hard disk. Deregisters and deletes the files. Multiple can be done with comma separated values. The disks are specified by SCSI id. Size defaults to GB.
=item B<--resize> B<disk>=I<size>
Change the size of the Hard disk. The disk can never be set to less than it's current size. Multiple disks can be resized to I<size> by using comma separated values on the left side of B<=>. The disks are specified by SCSI id. Size defaults to GB.
=back
=head2 zVM specific:
=over 10
=item B<--add3390> I<disk_pool> I<device_address> I<cylinders> I<mode> I<read_password> I<write_password> I<multi_password>
Adds a 3390 (ECKD) disk to a virtual server's directory entry.
=item B<--add3390active> I<device_address> I<mode>
Adds a 3390 (ECKD) disk that is defined in a virtual server's directory entry to that virtual server's active configuration.
=item B<--add9336> I<disk_pool> I<virtual_device> I<block_size> I<mode> I<blocks> I<read_password> I<write_password> I<multi_password>
Adds a 9336 (FBA) disk to a virtual server's directory entry.
=item B<--adddisk2pool> I<function> I<region> I<volume> I<group>
Add a disk to a disk pool defined in the EXTENT CONTROL. Function type can be either: (4) Define region as full volume and add to group OR (5) Add existing region to group. The disk has to already be attached to SYSTEM.
=item B<--addnic> I<address> I<type> I<device_count>
Adds a network adapter to a virtual server's directory entry (case sensitive).
=item B<--addprocessor> I<address>
Adds a virtual processor to a virtual server's directory entry.
=item B<--addprocessoractive> I<address> I<type>
Adds a virtual processor to a virtual server's active configuration (case sensitive).
=item B<--addvdisk> I<userID]> I<device_address> I<size>
Adds a v-disk to a virtual server's directory entry.
=item B<--connectnic2guestlan> I<address> I<lan> I<owner>
Connects a given network adapter to a GuestLAN.
=item B<--connectnic2vswitch> I<address> I<vswitch>
Connects a given network adapter to a VSwitch.
=item B<--copydisk> I<target_address> I<source_node> I<source_address>
Copy a disk attached to a given virtual server.
=item B<--dedicatedevice> I<virtual_device> I<real_device> I<mode>
Adds a dedicated device to a virtual server's directory entry.
=item B<--deleteipl>
Deletes the IPL statement from the virtual server's directory entry.
=item B<--formatdisk> I<disk_address> I<multi_password>
Formats a disk attached to a given virtual server (only ECKD disks supported). The disk should not be linked to any other virtual server. This command is best used after add3390().
=item B<--disconnectnic> I<address>
Disconnects a given network adapter.
=item B<--grantvswitch> I<VSwitch>
Grant VSwitch access for given virtual server.
=item B<--removedisk> I<virtual_device>
Removes a minidisk from a virtual server's directory entry.
=item B<--resetsmapi>
Reset z/VM SMAPI, assuming the SMAPI worker machines to reset are: VSMWORK1, VSMWORK2, VSMWORK3, VSMREQIN, and VSMREQIU.
=item B<--removediskfrompool> I<function> I<region> I<group>
Remove a disk from a disk pool defined in the EXTENT CONTROL. Function type can be either: (1) Remove region, (2) Remove region from group, (3) Remove region from all groups, OR (7) Remove entire group.
=item B<--removenic> I<address>
Removes a network adapter from a virtual server's directory entry.
=item B<--removeprocessor> I<address>
Removes a processor from an active virtual server's configuration.
=item B<--replacevs> I<directory_entry>
Replaces a virtual server's directory entry.
=item B<--setipl> I<ipl_target> I<load_parms> I<parms>
Sets the IPL statement for a given virtual server.
=item B<--setpassword> I<password>
Sets the password for a given virtual server.
=back
=head1 RETURN VALUE
0 The command completed successfully.
1 An error has occurred.
=head1 EXAMPLES
=head2 PPC (with HMC) specific:
1. To change the partition profile for lpar4 using the configuration data in the file /tmp/lparfile, enter:
cat /tmp/lparfile | chvm lpar4
Output is similar to:
lpar4: Success
2. To change the partition profile for lpar4 to the existing profile 'prof1', enter:
chvm lpar4 -p prof1
Output is similar to:
lpar4: Success
3. To change partition attributes for lpar4 by specifying attribute value pairs in command line, enter:
chvm lpar4 max_mem=4096
Output is similar to:
lpar4: Success
=head2 PPC (using Direct FSP Management for Power 775) specific:
1. For Power 775, to create a new partition lpar1 on the first octant of CEC cec01, lpar1 will use all the cpu and memory of the octant 0, enter:
mkdef -t node -o lpar1 mgt=fsp groups=all parent=cec01 nodetype=lpar hcp=cec01
then:
chvm lpar1 -i 1 -m 1 -r 0:1
Output is similar to:
lpar1: Success
cec01: Please reboot the CEC cec1 firstly, and then use chvm to assign the I/O slots to the LPARs
2. For Power 775, to create new partitions lpar1-lpar8 on the whole CEC cec01, each LPAR will use all the cpu and memory of each octant, enter:
mkdef -t node -o lpar1-lpar8 nodetype=lpar mgt=fsp groups=all parent=cec01 hcp=cec01
then:
chvm lpar1-lpar8 -i 1 -m 1 -r 0-7:1
Output is similar to:
lpar1: Success
lpar2: Success
lpar3: Success
lpar4: Success
lpar5: Success
lpar6: Success
lpar7: Success
lpar8: Success
cec01: Please reboot the CEC cec1 firstly, and then use chvm to assign the I/O slots to the LPARs
3. For Power 775 cec1, to create new partitions lpar1-lpar9, where lpar1 will use 25% CPU and memory resource and lpar2 will use the remaining 75% resources of octant 0 and lpar3-lpar9 will use all the cpu and memory of octants 2-7, enter:
mkdef -t node -o lpar1-lpar9 mgt=fsp groups=all parent=cec1 nodetype=lpar hcp=cec1
then:
chvm lpar1-lpar2 -i 1 -m 2 -r 0:5
chvm lpar3-lpar9 -i 5 -m 1 -r 1-7:1
Output is similar to:
lpar1: Success
lpar2: Success
cec1: Please reboot the CEC cec1 firstly, and then use chvm to assign the I/O slots to the LPARs
lpar3: Success
lpar4: Success
lpar5: Success
lpar6: Success
lpar7: Success
lpar8: Success
lpar9: Success
cec1: Please reboot the CEC cec1 firstly, and then use chvm to assign the I/O slots to the LPARs
4.To change the I/O slot profile for lpar4 using the configuration data in the file /tmp/lparfile, the I/O slots information is similar to:
4: 514/U78A9.001.0123456-P1-C17/0x21010202/2/1
4: 513/U78A9.001.0123456-P1-C15/0x21010201/2/1
4: 512/U78A9.001.0123456-P1-C16/0x21010200/2/1
then run the command:
cat /tmp/lparfile | chvm lpar4
5. To change the I/O slot profile for lpar1-lpar8 using the configuration data in the file /tmp/lparfile. Users can use the output of lsvm.and remove the cec information, and modify the lpar id before each I/O, and run the command as following:
chvm lpar1-lpar8 -p /tmp/lparfile
6. To change the LPAR name, enter:
chvm lpar1 lparname=test_lpar01
Output is similar to:
lpar1: Success
=head2 VMware/KVM specific:
chvm vm1 -a 8,16 --mem 512 --cpus 2
Output is similar to:
vm1: node successfully changed
=head2 zVM specific:
1. To adds a 3390 (ECKD) disk to a virtual server's directory entry:
chvm gpok3 --add3390 POOL1 0101 3338 MR
Output is similar to:
gpok3: Adding disk 0101 to LNX3... Done
2. To add a network adapter to a virtual server's directory entry:
chvm gpok3 --addnic 0600 QDIO 3
Output is similar to:
gpok3: Adding NIC 0900 to LNX3... Done
3. To connects a given network adapter to a GuestLAN:
chvm gpok3 --connectnic2guestlan 0600 GLAN1 LN1OWNR
Output is similar to:
gpok3: Connecting NIC 0600 to GuestLan GLAN1 on LN1OWNR... Done
4. To connects a given network adapter to a VSwitch:
chvm gpok3 --connectnic2vswitch 0600 VSW1
Output is similar to:
gpok3: Connecting NIC 0600 to VSwitch VSW1 on LNX3... Done
5. To removes a minidisk from a virtual server's directory entry:
chvm gpok3 --removedisk 0101
Output is similar to:
gpok3: Removing disk 0101 on LNX3... Done
6. To Removes a network adapter from a virtual server's directory entry:
chvm gpok3 --removenic 0700
Output is similar to:
gpok3: Removing NIC 0700 on LNX3... Done
7. To replaces a virtual server's directory entry:
chvm gpok3 --replacevs /tmp/dirEntry.txt
Output is similar to:
gpok3: Replacing user entry of LNX3... Done
=head1 FILES
/opt/xcat/bin/chvm
=head1 SEE ALSO
L<mkvm(1)|mkvm.1>, L<lsvm(1)|lsvm.1>, L<rmvm(1)|rmvm.1>