HP Integrity Virtual Machines Installation, Configuration, and Administration Version A.03.50

For example, to clone the virtual machine named compass1, to create a new virtual machine
named clone1, enter the following commands. First display the current guest status on the VM
Host:
# hpvmstatus
[Virtual Machines]
Virtual Machine Name VM # OS Type State #VCPUs #Devs #Nets Memory Runsysid
==================== ===== ======= ========= ====== ===== ===== ======= ========
compass1 2 HPUX On (OS) 1 1 1 2 GB 0
compass2 3 UNKNOWN Off 1 1 1 1 GB 0
compass3 4 HPUX Off 1 1 1 2 GB 0
You can create a clone of compass2 by entering the following command. The new virtual machine
is named clone1:
# hpvmclone -P compass1 -N clone1
To see the results of the command, enter the hpvmstatus command again:
# hpvmstatus
[Virtual Machines]
Virtual Machine Name VM # OS Type State #VCPUs #Devs #Nets Memory Runsysid
==================== ===== ======= ========= ====== ===== ===== ======= ========
compass1 2 HPUX On (OS) 1 1 1 2 GB 0
compass2 3 UNKNOWN Off 1 1 1 1 GB 0
compass3 4 HPUX Off 1 1 1 2 GB 0
clone1 5 UNKNOWN Off 1 1 1 2 GB 0
The hpvmclone command creates a copy of an existing virtual machine and its configuration
information. This command copies the configuration files of the existing guest. It does not copy
the actual data and software associated with the guest. The clone_vm_name must not already
exist on the same VM Host.
The new virtual machine's configuration information can be modified from the original
configuration file by using command options. If no options are specified, all original parameters
are retained. This will cause resource conflicts if both the original and clone virtual machines are
booted together.
Resources are checked to determine whether the virtual machine could boot by itself on the
server. Any problems are reported as WARNINGS. These warnings will not prevent the new
virtual machine from being created. These conditions will, however, prevent the guest from
starting.
Backing storage devices (for example, directories and files) cannot be shared, and therefore they
cannot be used by two running guests at the same time. In this case, you must either enter a
different backing store, or run only one of the guests at a time. For more more information, see
Chapter 7 “Creating Virtual Storage Devices”.
Use the b option to specify a storage device to be physically duplicated in the cloning process.
This feature allows the user to specify any number of storage devices and supports all of the
possible physical device types (disk, lv, and file).
The following example shows how to use the hpvmclone command to create a new Linux guest
named linux2 based on the existing guest named linux1. The boot disk is specified.
# hpvmclone -P linux1 -N linux2 -b disk:scsi:0,0,0:disk:
Because there is no guarantee that other virtual machines would be running at the same time
the new virtual machine would be running, use the following command to check the device for
dependents:
# hpvmdevmgmt -l entry_name
For more information about the hpvmdevmgmt command and the guest device management
database, see Chapter 7 (page 81).
46 Creating Virtual Machines