175
The VM or VMs on which this operation should be performed are selected using the standard selection
mechanism (see VM selectors). Optional arguments can be any number of the VM parameters listed at the
beginning of this section.
vm-clone
vm-clone new-name-label=<name_for_clone>
[new-name-description=<description_for_clone>] [<vm-selector>=<vm_selector_value>...]
Clone an existing VM, using storage-level fast disk clone operation where available. Specify the name
and the optional description for the resulting cloned VM using the new-name-label and new-name-
description arguments.
The VM or VMs on which this operation should be performed are selected using the standard selection
mechanism (see VM selectors). Optional arguments can be any number of the VM parameters listed at the
beginning of this section.
vm-compute-maximum-memory
vm-compute-maximum-memory total=<amount_of_available_physical_ram_in_bytes>
[approximate=<add overhead memory for additional vCPUS? true | false>]
[<vm_selector>=<vm_selector_value>...]
Calculate the maximum amount of static memory which can be allocated to an existing VM, using the total
amount of physical RAM as an upper bound. The optional parameter approximate reserves sufficient extra
memory in the calculation to account for adding extra vCPUs into the VM at a later date.
For example:
xe vm-compute-maximum-memory vm=testvm total=`xe host-list params=memory-free --minimal`
This command uses the value of the memory-free parameter returned by the xe host-list command to set the
maximum memory of the VM named testvm.
The VM or VMs on which this operation will be performed are selected using the standard selection mechanism
(see VM selectors). Optional arguments can be any number of the VM parameters listed at the beginning of this
section.
vm-copy
vm-copy new-name-label=<name_for_copy> [new-name-description=<description_for_copy>]
[sr-uuid=<uuid_of_sr>] [<vm-selector>=<vm_selector_value>...]
Copy an existing VM, but without using storage-level fast disk clone operation (even if this is available). The disk
images of the copied VM are guaranteed to be "full images", that is, not part of a copy-on-write (CoW) chain.
Specify the name and the optional description for the resulting copied VM using the new-name-label and
new-name-description arguments.
Specify the destination SR for the resulting copied VM using the sr-uuid. If this parameter is not specified, the
destination is the same SR that the original VM is in.
The VM or VMs on which this operation should be performed are selected using the standard selection
mechanism (see VM selectors). Optional arguments can be any number of the VM parameters listed at the
beginning of this section.
vm-crashdump-list
vm-crashdump-list [<vm-selector>=<vm selector value>...]