Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP Integrity Virtual Machines Version 4.0 Installation, Configuration, and Administration > Chapter 3 Creating Virtual Machines

Cloning Virtual Machines

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

Once you have created a guest, you can quickly and easily create additional guests by using the hpvmclone command. Like the hpvmcreate, hpvmmigrate, and hpvmmodify commands, the hpvmclone command accepts the command options listed in Table 3-2 for specifying virtual devices, network interfaces, and other virtual machine characteristics. This allows you to create new guests with similar characteristics but different virtual resources.

Table 3-7 describes the options you can use with the hpvmclone command.

Table 3-7 Options to the hpvmclone Command

OptionDescription
-P vm-nameSpecifies the name of the existing virtual machine to be cloned. You must specify either the -P option or the -p option.
-p vm-numberSpecifies the number of the existing virtual machine to be cloned. You must specify either the -P option or the -p option.
-N clone-vm-nameSpecifies the name of the new virtual machine (the clone). The clone-vm-name can be up to 256 alphanumeric characters. The same virtual machine name cannot already exist on the same VM Host system.
-e percent[:max_percent] | -E cycles[:max_cycles]Specifies the virtual machine's CPU entitlement in CPU cycles. To specify the percentage of CPU power, enter the following option:
-e percent[:max_percent]
To specify the clock cycles, enter one of the following options:
-E cycles[:max_cycles]M (for megahertz) -E cycles[:max_cycles]G (for gigahertz)
-l vm_labelSpecifies a descriptive label for this virtual machine. The label can contain up to 256 alphanumeric characters, including A-Z, a-z, 0-9, the dash (—), the underscore (_), and the period (.). To include spaces, the label must be quoted (" ").
-B start_attrSpecifies the startup behavior of the virtual machine. For start_attr, enter one of the following keywords:

auto: Automatically starts the virtual machine when the VM Host is started (autoboot).

manual: The virtual machine is not started automatically. Use the hpvmstart command to start the virtual machine manually.

-O os_type[:version] Specifies the type and version of the operating system running on the virtual machine. For the os_type parameter, you can specify one of the following (case-insensitive) values:

hpux

windows

linux

-a rsrc Creates a virtual device for the new virtual machine (clone). Specify the virtual and physical device information for rsrc .

For information about forming a virtual storage device specification, see Chapter 7.

For information about forming a virtual network device specification, see Chapter 8.

-d rsrc Deletes a virtual device that is defined on the existing virtual machine in the clone virtual machine configuration. Specify the virtual and physical device information for rsrc .

For information about forming a virtual storage device specification, see Chapter 7.

For information about forming a virtual network device specification, see Chapter 8.

-m rsrc Modifies a virtual device that is defined on the existing virtual machine in the clone virtual machine configuration. Specify the virtual and physical device information for rsrc .

For information about forming a virtual storage device specification, see Chapter 7.

For information about forming a virtual network device specification, see Chapter 8.

-b rsrcSpecifies the boot disk for the new virtual machine.
-FSuppresses all resource-conflict checks and associated warning messages (force mode). Use force mode for troubleshooting purposes only.
-c number_vcpusSpecifies the number of vCPUs this virtual machine detects at boot time. If unspecified, the number defaults to one. The maximum number of vCPUs that you can allocate to a virtual machine is the number of physical processors on the VM Host system.
-r amountSpecifies the amount of memory available to this virtual machine. Specify the amount as either amountM (for megabtyes) or amountG (for gigabytes).
-S amountSpecifies that the cloned guest must share the same virtual LAN (VLAN) ports as the source guest. By default, the hpvmclone command allocates VLAN ports that are different from those allocated to the guest that is the source of the clone operation. For more information about using VLANS on virtual machines, see Section .
-g group[:{admin|oper}]Specifies a group authorization. The specified administrative level (admin or oper) is applied to the specified user group.
-u user[:{admin|oper}]Specifies a user authorization. The specified administrative level (admin or oper) is applied to the specified user group.
-x keyword=parameter

Specifies values for dynamic memory setting associated with the guest, including:

  • dynamic_memory_control

  • ram_dyn_type

  • ram_dyn_min

  • ram_dyn_max

  • ram_dyn_target_start

For more information about dynamic memory, see Section .

To specify the serial number of the new virtual machine, enter serial_number={new | same}

-CProvides information about the memory type for Host and guests: cell local memory, interleaved, or none.

 

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 compass1 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 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.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2008 Hewlett-Packard Development Company, L.P.