mkvm - Creates HMC-, IVM-, and zVM-managed partitions or other virtual machines.
mkvm [-h| --help]
mkvm [-v| --version]
mkvm [-V| --verbose] noderange -i id -l singlenode
mkvm [-V| --verbose] noderange -c destcec -p profile
mkvm [-V| --verbose] noderange --full
mkvm noderange [-m|--master mastername] [-s|--size disksize] [--mem memsize] [--cpus cpucount] [-f|--force]
mkvm noderange [-s|--size disksize] [--mem memsize] [--cpus cpucount]
mkvm noderange [directory_entry_file_path]
mkvm noderange [source_virtual_machine] [pool= disk_pool]
For PPC (with HMC) specific:
The first form of mkvm command creates new partition(s) with the same profile/resources as the partition specified by singlenode. The -i and noderange specify the starting numeric partition number and the noderange for the newly created partitions, respectively. The LHEA port numbers and the HCA index numbers will be automatically increased if they are defined in the source partition.
The second form of this command duplicates all the partitions from the source specified by profile to the destination specified by destcec. The source and destination CECs can be managed by different HMCs.
Please make sure the nodes in the noderange is defined in the nodelist table and the mgt is set to 'hmc' in the nodehm table before running this command.
Please note that the mkvm command currently only supports creating standard LPARs, not virtual LPARs working with VIOS server.
The mkvm command creates new virtual machine(s) with the disksize size of hard disk, memsize size of memory and cpucount number of cpu.
For KVM: If -f|--force is specified, the storage will be destroyed first if it existed.
=head2 For zVM:
The first form of mkvm creates a new virtual machine based on a directory entry.
The second form of this creates a new virtual machine with the same profile/resources as the specified node (cloning).
Display usage message.
The cec (fsp) name for the destination.
The cpu count which will be created for the kvm/vmware virtual machine.
Request to create a new full system partition for each CEC.
If -f|--force is specified, the storage will be destroyed first if it existed.
Starting numeric id of the newly created partitions.
The partition name of the source.
The memory size which will be used for the new created kvm/vmware virtual machine. Unit is Megabyte.
The file that contains the profiles for the source partitions.
The size of storage which will be created for the kvm/vmware virtual machine.
Command Version.
Verbose output.
0 The command completed successfully.
1 An error has occurred.
1. To create a new partition lpar5 based on the profile/resources of lpar4, enter:
mkdef -t node -o lpar5 mgt=hmc groups=all
then:
mkvm lpar5 -i 5 -l lpar4
Output is similar to:
lpar5: Success
2. To create new partitions lpar5-lpar8 based on the profile/resources of lpar4, enter:
mkdef -t node -o lpar5-lpar8 mgt=hmc groups=all
then:
mkvm lpar5-lpar8 -i 5 -l lpar4
Output is similar to:
lpar5: Success lpar6: Success lpar7: Success lpar8: Success
3. To duplicate all the partitions associated with cec01 on cec02, first save the lpars from cec01 to a file:
lsvm lpar01-lpar04 > /tmp/myprofile
then create lpars on cec02:
mkvm lpar05-lpar08 -c cec02 -p /tmp/myprofile
Output is similar to:
lpar5: Success lpar6: Success lpar7: Success lpar8: Success
4. To duplicate all the partitions associated with cec01 on cec02, one is for cec01, the other is for cec02:
mkdef -t node -o lpar5,lpar6 mgt=hmc groups=all chtab node=lpar5 ppc.parent=cec01 chtab node=lpar6 ppc.parent=cec02
then create lpars on cec01 and cec02:
mkvm lpar5,lpar6 --full
Output is similar to:
lpar5: Success lpar6: Success
5. To create a new zVM virtual machine (gpok3) based on a directory entry:
mkvm gpok3 /tmp/dirEntry.txt Output is similar to:
gpok3: Creating user directory entry for LNX3... Done
6. To clone a new zVM virtual machine with the same profile/resources as the specified node:
mkvm gpok4 gpok3 pool=POOL1
Output is similar to:
gpok4: Cloning gpok3 gpok4: Linking source disk (0100) as (1100) gpok4: Linking source disk (0101) as (1101) gpok4: Stopping LNX3... Done gpok4: Creating user directory entry gpok4: Granting VSwitch (VSW1) access for gpok3 gpok4: Granting VSwitch (VSW2) access for gpok3 gpok4: Adding minidisk (0100) gpok4: Adding minidisk (0101) gpok4: Disks added (2). Disks in user entry (2) gpok4: Linking target disk (0100) as (2100) gpok4: Copying source disk (1100) to target disk (2100) using FLASHCOPY gpok4: Mounting /dev/dasdg1 to /mnt/LNX3 gpok4: Setting network configuration gpok4: Linking target disk (0101) as (2101) gpok4: Copying source disk (1101) to target disk (2101) using FLASHCOPY gpok4: Powering on gpok4: Detatching source disk (0101) at (1101) gpok4: Detatching source disk (0100) at (1100) gpok4: Starting LNX3... Done
7. To create a new kvm/vmware virtual machine with 10G storage, 2048M memory and 2 cpus.
mkvm vm1 -s 10G --mem 2048 --cpus 2
/opt/xcat/bin/mkvm