hpvmclone — Create a new virtual machine that is a copy of an existing virtual machine.



  • NAME
    hpvmclone — Create a new virtual machine that is a copy of an existing 
    virtual machine.
    
    SYNOPSIS
    hpvmclone { -P vm_name -p vm_number } -N clone_VM_name [ -F | -s ] [-l 
    vm_label] [-B start_attr] [-O os_type [:version]] [-c number_vcpus] [ -e 
    percent[:max_percent] -E cycles[:max_cycles] ] [-r amount] [-S] [-g -group] [-g 
    [+]group[: {admin|oper}]] [-u -user] [-u [+]user[: {admin|oper}]] [-a rsrc]... 
    [-m rsrc]... [-d rsrc]... [-b rsrc] [[-x name=value [:name=value]]]
    
    DESCRIPTION
    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 this 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. Note that resource conflicts 
    could occur if both the original and clone virtual machines are booted together.
    
    Resources are checked to determine whether the virtual machine can boot by 
    itself on the server. Any problems are reported as WARNINGS. These warnings do 
    not prevent the new virtual machine from being created.
    
    Only superusers can execute the hpvmclone command.
    
    Options
    To print the warnings without creating a new virtual machine, use the -s option.
    
    Because there is no guarantee that other virtual machines are running at the 
    same time as the new virtual machine is running, use the following command to 
    verify whether a device has dependents:
    
    hpvmdevmgmt -l gdev:entry_name
    
    where entry_name is the device name in the device-management database.
    
    If you omit an option, the associated attribute remains unchanged.
    
    -P vm_name
    Specifies the name of the existing virtual machine to be cloned.
    
    You must specify either the -P or the -p option.
    
    -p vm_number
    Specifies the number of the existing virtual machine to be cloned. You can 
    obtain the value of vm_number using the hpvmstatus command.
    
    You must specify either the -P or the -p option.
    
    -N clone_vm_name
    Specifies the name to be assigned to the new virtual machine. The name can be 
    composed of up to 256 alphanumeric characters, including A-Z, a-z, 0-9, the 
    dash (—), the underscore (_), and the period (.).
    
    The virtual machine name cannot start with a dash (—). You must specify the 
    -N option.
    
    -e percent[:max_percent]
    Specifies the percentage of CPU resources to which each of the new guest's 
    virtual CPUs is entitled. If the entitlement is not specified with this option 
    or the -E option, the new virtual machine's entitlement is that of the existing 
    virtual machine.
    
    The percentage can be set to an integral value between 0 and 100. If the value 
    specified is less than 5, then the virtual machine is allocated the minimum 
    percentage of 5%. The default is 10%.
    
    The maximum entitlement cannot exceed 100 percent and cannot be less than the 
    minimum. Each group has a default maximum setting of 100 percent.
    
    The entitled CPU resources inherited from the existing virtual machine, 
    specified in cycles or percentages, are replaced in the new virtual machine by 
    this percentage.
    
    The -e and the -E options are mutually exclusive.
    
    -E cycles[:max_cycles]
    Specifies the virtual machine's CPU entitlement in number of CPU clock cycles. 
    If the cycles are not specified with this option and the -e option is not 
    specified, the new virtual machine's entitled CPU resources is that of the 
    existing virtual machine.
    
    The cycles are expressed as an integer, followed by one of these units:
    
    M (megahertz)
    
    G (gigahertz)
    
    If no letter is specified, the default unit is megahertz.
    
    The value of entitlement inherited from the existing virtual machine (specified 
    in either cycles or percentages) is replaced in the new virtual machine by the 
    new value in CPU clock cycles.
    
    The -e and the -E options are mutually exclusive.
    
    -l vm_label
    Specifies a descriptive text string for the new virtual machine. This option 
    can be useful in identifying a specific virtual machine in the hpvmstatus -V 
    display. The label can be up to 256 alphanumeric characters, including A-Z, 
    a-z, 0-9, the dash (—), the underscore (_), and the period (.). To specify 
    white space, the label must be quoted (" ").
    
    -B start_attr
    Specifies the startup behavior of the virtual machine. The start_attr attribute 
    can have the following (case-insensitive) values:
    
    auto: Automatically start the virtual machine when Integrity VM is initialized 
    on the host.
    
    manual: Manually start the virtual machine. (This is the default.)
    
    If the start_attr attribute is set to auto, the virtual machine starts when 
    Integrity VM is initialized. This occurs when the VM Host system is booted, and 
    when the Integrity VM software is stopped and restarted on a running VM Host. 
    For example, when you upgrade Integrity VM to a new version on a running 
    system, the software is started automatically. The VM Host attempts to start 
    all virtual machines for which the attribute is set to auto. If insufficient 
    resources exist, some virtual machines might fail to start.
    
    If the attribute is set to manual, the virtual machine does not start 
    automatically when Integrity VM is initialized on the VM Host. This is the 
    default. The virtual machine can then be started manually with the hpvmstart 
    command or through its virtual console.
    
    This option does not set the virtual machine's console to enable booting when 
    the virtual machine is started. This function must be set with the virtual 
    machine's console.
    
    -O os_type[:version]
    Specifies the type and version of the operating system running on the virtual 
    machine. The response affects the default selection of certain virtual machine 
    attributes, such as amount of memory and CPU power. The os_type is one of the 
    following: HP-UX, WINDOWS, or LINUX. This parameter is not case sensitive. The 
    version is specific to the operating system type.
    
    The version specifies a descriptive text string of the version of the operating 
    system. The version string can consist of up to 256 alphanumeric characters, 
    including A-Z, a-z, 0-9, the dash (—), the underscore r (_), and the period 
    (.). To specify white space, then “version” must be quoted.
    
    -a rsrc
    Adds an I/O resource to the new virtual machine. The resource specification 
    (rsrc) is described in hpvmresources(5).
    
    This option can be specified more than once.
    
    -d rsrc
    Deletes an I/O resource from the new virtual machine. The resource 
    specification (rsrc) is described in hpvmresources(5).
    
    This option can be specified more than once.
    
    -m rsrc
    Modifies an I/O resource on the cloned virtual machine.
    
    This option can be specified more than once.
    
    Integrity VM recognizes the following types of guest virtual devices:
    
    Virtual disks, which can be backed by files in a VM Host file system, by 
    logical volumes or by whole disks.
    
    Virtual DVDs, which can be backed by files in a VM Host file system or by the 
    physical DVD drive.
    
    Virtual network switches (vswitches), which are created using the hpvmnet 
    command and backed by physical LAN cards. For more information about vswitches, 
    see the hpvmnet manpage.
    
    For information about specifying storage and network resources for guests, see 
    hpvmresources(5).
    
    -b rsrc
    Specifies the boot device for the cloned virtual machine.
    
    To specify the rsrc parameter to the -b, option, you must specify the virtual 
    device hardware address. The virtual device hardware address specifies the 
    address of the boot disk being cloned from. The physical device specifies the 
    boot disk being cloned to.
    
    For more information about specifying storage and network resources for guests, 
    see hpvmresources(5).
    
    -F
    Ignores all virtual machine configuration warnings, including oversubscribing 
    of resources (Force mode).
    
    This option is primarily intended for use by scripts and other noninteractive 
    applications.
    
    -c number_vcpus
    Specifies the number of virtual CPUs visible to the new virtual machine. If 
    unspecified, the number defaults to that of the existing virtual machine.
    
    -r amount
    Specifies the amount of memory available to the new virtual machine at boot 
    time.
    
    The sizes are expressed as integers, optionally followed by one of these units:
    
    M (megabytes)
    
    G (gigabytes)
    
    If the letter is left off, the unit type defaults to megabytes. If the -r 
    option is omitted, the amount of memory is that of the existing virtual machine.
    
    -S
    Specifies 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.
    
    -g [+]group:{ admin| oper}
    Specifies group authorization. Use the -g [+]group:{admin | oper}syntax to add 
    a group, where + is optional. When adding a group authorization, the default 
    authorization type is oper.
    
    To remove a group authorization, specify the -g -group syntax.
    
    This option can be specified more than once.
    
    -u [+]username:{admin | oper}
    Specifies user authorization. Remove user authorization by using the -u user 
    syntax. The virtual machine user account specified here can use the hpvmconsole 
    command to manage the virtual machine.
    
    Add user authorization using the -u [+]user:{admin |oper } syntax, where + is 
    optional. When adding a group authorization, the default authorization type is 
    oper.
    
    -s
    Verifies the new virtual machine configuration and returns warnings or errors 
    but does not create the virtual machine.
    
    -x
    Specifies whether the new virtual machine uses dynamic memory and the values 
    associated with it by including the following keywords:
    
    -x dynamic_memory_control={0|1}
    
    -x ram_dyn_type={none|any|driver}
    
    -x ram_dyn_min=amount
    
    -x ram_dyn_max=amount
    
    -x ram_dyn_target_start=amount
    
    -x mac_address={new|same}
    
    -x serial_number={new|same}
    
    -x sched_preference={none|cell|ilm}
    
    where:
    
    none — The default preference. If your application is predominantly CPU 
    bound, specifying either ilm or cell will perform the same.
    
    cell — The cell with the most CPU and memory space is chosen. When that guest 
    is active, the scheduler then optimizes where the guest runs, so that it can be 
    closest to its memory.
    
    ilm — Indicates that guests that are larger than any single cell and contain 
    highly threaded applications.
    
    To specify the MAC address of the new virtual machine, enter the following: -x 
    mac_address={new|same}
    
    To specify the serial number of the new virtual machine, enter the following: 
    -x serial_number={new|same}
    
    RETURN VALUES
    The hpvmclone command exits with one of the following values:
    
    0: Successful completion.
    1: One or more error conditions occurred.
    DIAGNOSTICS
    The hpvmclone command displays error messages on stderr for any of the 
    following conditions:
    
    An invalid option is specified.
    
    An invalid value is specified for an option.
    
    A value was omitted for an argument that requires one, or a value was supplied 
    for an argument that does not take one.
    
    One or more options other than -a, -m, -d, -g, or -u have been specified more 
    than once.
    
    The clone_vm_name attribute already exists.
    
    The vm_name or vm_number attribute does not exist, cannot be accessed, is not a 
    virtual machine, or is corrupt.
    
    The hpvmclone command and Integrity VM are at different revision levels.
    
    The same resource was allocated more than once.
    
    A resource allocated to another virtual machine was specified, and the force 
    flag (-F) was not used.
    
    EXAMPLES
    Clone the virtual machine named compass2, to create a new virtual machine named 
    compass5.
    
    
    # hpvmclone -P compass2 -N compass5
    
    Following are sample warning messages returned when hpvmclone is executed with 
    various configuration problems on the guest compass5:
    
    
    HPVM guest compass5 configuration problems: Warning 1: Guest needs more vcpus 
    than server supports. Warning 2: Insufficient free memory for guest. Warning 3: 
    Insufficient swap resource for guest. Warning 4: Insufficient cpu resource for 
    guest. Warning 5 on item /dev/rdisk/disk0: Device file '/dev/rdsk/disk0' in use 
    by another guest. Warning 6 on item /dev/vg00/rswap: Device file 
    '/dev/vg00/rswap' in use by server. Warning 7 on item /dev/rdisk/disk3 backing 
    device does not exist. Warning 8 on item /dev/rdisk/disk4: Device file 
    '/dev/rdisk/disk4' in use by another guest. Warning 9 on item hostnet: MAC 
    address in use for switch hostnet. Warning 10 on item offnet: Vswitch offnet is 
    not active. Warning 11 on item badnet: 'badnet' backing device does not exist. 
    These problems will prevent HPVM guest compass5 from booting.
    
    The following example shows how to use the hpvmclone command to create a guest 
    named vmclone1 that uses the same ports as the existing guest (vm1). The 
    hpvmnet command shows that two guests are sharing ports 1 and 2 on the virtual 
    switch vmlan4. Only the active virtual machine (vm1) can use the port.
    
    
    # hpvmclone -P vm1 -N vmclone1 -S # hpvmnet -S vmlan4 Name Number State Mode 
    PPA MAC Address IP Address ======== ====== ======= ========= ====== 
    ============== =============== vmlan4 2 Up Shared lan4 0x00127942fce3 
    192.1.2.205 [Port Configuration Details] Port Port Port Untagged Number of 
    Active VM Number state Adaptor	VLANID Reserved VMs ======= ============ 
    ======== ============ ============ 1 Active lan	none 2 vm1 2 Active lan	100 2 
    vm1 3 Active avio_lan	none 1 vm2 4 Active lan	100 1 vm2
    
    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:
    
    
    
    Be sure that the backing devices are the same, The copy of data succeeds but 
    the new virtual machine fails to boot if the backing devices are different. For 
    example, if the source virtual machine boots from an lvol, and you boot the 
    cloned virtual machine from a disk, it fails.
    
    AUTHORS
    The hpvmclone command was developed by HP.
    
    SEE ALSO
    On the VM Host:
    
    hpvm(5), hpvmcollect(1M), hpvmconsole(1M), hpvmcreate(1M), hpvmdevmgmt(1M), 
    hpvmdevtranslate(1M), hpvmhostrdev(1M), hpvminfo(1M), hpvmmigrate(1M), 
    hpvmmodify(1M), hpvmnet(1M), hpvmpubapi(3), hpvmremove(1M), hpvmresources(5), 
    hpvmsar(1M), hpvmstart(1M), hpvmstatus(1M), hpvmstop(1M), hpvmupgrade(1M), 
    p2vassist(1M)
    
    On the Integrity VM guest:
    
    hpvmcollect(1M), hpvminfo(1M), hpvmmgmt(1M), hpvmpubapi(3)
    

Log in to reply
 

© Lightnetics 2024