# Data Object - VirtualMachineCloneSpec(vim.vm.CloneSpec)

Property of
  PlacementSpec, StoragePlacementSpec
Parameter to
  CheckClone_Task, CloneVM_Task
Extends
  DynamicData
See also
  CustomizationSpec, VirtualMachineConfigSpec, VirtualMachineRelocateSpec, VirtualMachineSnapshot
Since
  2.0

## Data Object Description

Specification for a virtual machine cloning operation.

Properties

Name | Type | Description
--- | --- | ---
config* | VirtualMachineConfigSpec | An optional specification of changes to the virtual hardware. For example, this can be used to, (but not limited to) reconfigure the networks the virtual switches are hooked up to in the cloned virtual machine. Use deviceChange in location for specifying any virtual device changes for disks and networks.
customization* | CustomizationSpec | An optional guest operating system customization specification. This value is ignored if a template is being created.
location | VirtualMachineRelocateSpec | A type of RelocateSpec that specifies the location of resources the newly cloned virtual machine will use. The location specifies: A datastore where the virtual machine will be located on physical storage. This is always provided because it indicates where the newly created clone will be copied. a resource pool and optionally a host. The resource pool determines what compute resources will be available to the clone and the host indicates which machine will host the clone.
memory* | xsd:boolean | Flag indicating whether to retain a copy of the source virtual machine's memory state in the clone. Retaining the memory state during clone results in a clone in suspended state with all network adapters removed to avoid network conflicts, except those with a VirtualEthernetCard.addressType of "manual". Users of this flag should take special care so that, when adding a network adapter back to the clone, the VM is not resumed on the same VM network as the source VM, or else MAC address conflicts could occur. When cloning between two hosts with different CPUs outside an EVC cluster, users of this flag should be aware that vCenter does not verify CPU compatibility between the clone's memory state and the target host prior to the clone operation, so the clone may fail to resume until it is migrated to a host with a compatible CPU. This flag is ignored if the snapshot parameter is unset. This flag only applies for a snapshot taken on a running or suspended virtual machine with the 'memory' parameter set to true, because otherwise the snapshot has no memory state. This flag defaults to false. Since vSphere API 5.5
powerOn | xsd:boolean | Specifies whether or not the new VirtualMachine should be powered on after creation. As part of a customization, this flag is normally set to true, since the first power-on operation completes the customization process. This flag is ignored if a template is being created.
snapshot* | ManagedObjectReference to a VirtualMachineSnapshot | Snapshot reference from which to base the clone. If this parameter is set, the clone is based off of the snapshot point. This means that the newly created virtual machine will have the same configuration as the virtual machine at the time the snapshot was taken. If this property is not set then the clone is based off of the virtual machine's current configuration. Setting this is only supported if the host this virtual machine is currently residing on cloneFromSnapshotSupported. Such support does not need to exist on the destination host for the clone. Setting this is only supported if the virtual machine supports reporting snapshot configuration information. See snapshotConfigSupported. Such support does not need to exist on the destination host for the clone. Since vSphere API 4.0
template | xsd:boolean | Specifies whether or not the new virtual machine should be marked as a template.
tpmProvisionPolicy* | xsd:string | Provisioning policy for virtual TPM devices during VM clone operations. The list of supported values is defined in vim.vm.CloneSpec#TpmProvisionPolicy. If unset - a globally defined policy is used, which by default is set to 'copy'. Since 8.0.0.1
Properties inherited from DynamicData
None

*Need not be set
Show WSDL type definition
<complexType xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vim25="urn:vim25" name="VirtualMachineCloneSpec"> <complexContent> <extension base="vim25:DynamicData"> <sequence> <element name="location" type="vim25:VirtualMachineRelocateSpec"/> <element name="template" type="xsd:boolean"/> <element name="config" type="vim25:VirtualMachineConfigSpec" minOccurs="0"/> <element name="customization" type="vim25:CustomizationSpec" minOccurs="0"/> <element name="powerOn" type="xsd:boolean"/> <element name="snapshot" type="vim25:ManagedObjectReference" minOccurs="0"/> <element name="memory" type="xsd:boolean" minOccurs="0"/> <element name="tpmProvisionPolicy" type="xsd:string" minOccurs="0"/> </sequence> </extension> </complexContent> </complexType>