Data Object - VirtualMachineRelocateSpec(vim.vm.RelocateSpec)

Property of
PlacementAction, PlacementSpec, StorageMigrationAction, StoragePlacementAction, StoragePlacementSpec, VirtualMachineCloneSpec, VirtualMachineInstantCloneSpec
Parameter to
CheckRelocate_Task, RelocateVM_Task
Extends
DynamicData
See also
CryptoSpec, Datastore, Folder, HostSystem, ResourcePool, ServiceLocator, VirtualDeviceConfigSpec, VirtualMachineProfileSpec, VirtualMachineRelocateSpecDiskLocator, VirtualMachineRelocateTransformation
Since
2.0

Data Object Description

Specification for moving or copying a virtual machine to a different datastore or host.

Properties

Name Type Description
cryptoSpec*CryptoSpec

Virtual Machine cryptographic options. Encryption requirement for the virtual machine's metadata files (non-disk files).

Since vSphere API 7.0
datastore*ManagedObjectReference
to a Datastore

The datastore where the virtual machine should be located. If not specified, the current datastore is used.
deviceChange*VirtualDeviceConfigSpec[]

An optional list of virtual device specs that allow specifying the new device locations for the relocate operation.

The supported device changes are:

  • For VirtualEthernetCard, it has to be used in device to specify the target network backing.
  • For VirtualDisk, it can be used to specify vFlash cache configuration, or the storage profile for destination disks. The storage profiles are used to either upgrade the virtual disk's storage to a persistent memory, or keep the virtual disk in persistent memory when moving the virtual machine's overall storage.
  • All other specification are ignored.

Since vSphere API 5.5
disk*VirtualMachineRelocateSpecDiskLocator[]

An optional list that allows specifying the datastore location for each virtual disk.
diskMoveType*xsd:string

Manner in which to move the virtual disk to the datastore. The set of possible values is described in VirtualMachineRelocateDiskMoveOptions.

This property applies to all the disks which the virtual machine has, but can be overridden on a per-disk basis using diskMoveType prior to vSphere API 6.0 or using diskMoveType in vSphere API 6.0 and later.

This property can only be set if deltaDiskBackingsSupported is true.

If left unset then vim.vm.RelocateSpec.DiskMoveOptions#moveAllDiskBackingsAndDisallowSharing is assumed.

Since vSphere API 4.0
folder*ManagedObjectReference
to a Folder

The folder where the virtual machine should be located. If not specified, the root VM folder of the destination datacenter will be used.

Since vSphere API 6.0
host*ManagedObjectReference
to a HostSystem

The target host for the virtual machine. If not specified,
  • if resource pool is not specified, current host is used.
  • if resource pool is specified, and the target pool represents a stand-alone host, the host is used.
  • if resource pool is specified, the virtual machine is powered on, and the target pool represents a DRS-enabled cluster, a host selected by DRS is used.
  • if resource pool is specified, the virtual machine is powered on, and the target pool represents a cluster without DRS enabled, an InvalidArgument exception is thrown.
  • if a resource pool is specified, the target pool represents a cluster, and this is a clone or the virtual machine is powered off, a random compatible host is chosen.
  • if the virtual machine is relocated to a different vCenter service, and a resource pool is not specified, the destination host must be set.

pool*ManagedObjectReference
to a ResourcePool

The resource pool to which this virtual machine should be attached.
  • For a relocate or clone operation to a virtual machine, if the argument is not supplied, the current resource pool of virtual machine is used.
  • For a clone operation from a template to a virtual machine, this argument is required.
  • If the virtual machine is relocated to a different vCenter service, both the destination host and resource pool have to be specified and cannot be unset.
  • If the virtual machine is relocated to a different datacenter within the vCenter service, the resource pool has to be specified and cannot be unset.

profile*VirtualMachineProfileSpec[]

Storage profile requirement for Virtual Machine's home directory. Profiles are solution specific. Storage Profile Based Management(SPBM) is a vSphere server extension. The API users who want to provision VMs using Storage Profiles, need to interact with SPBM. This is an optional parameter and if user doesn't specify profile, the default behavior will apply.

Since vSphere API 5.5
service*ServiceLocator

The service endpoint of vCenter where the virtual machine should be located. If not specified, the current vCenter service is used. If the virtual machine is relocated to a different vCenter service, the destination host, pool, and datastore parameters have to be explicitly specified by default when the task is submitted.

Since vSphere API 6.0
transform*VirtualMachineRelocateTransformationDeprecated. as of vSphere API 5.0. Use diskBackingInfo instead for disk format conversions. This setting will be ignored for disks with the above property set.

Transformation to perform on the disks. The backend is free to ignore this hint if it is not valid for the current operation. This can be used by clients, for example, to create sparse disks for templates.
See VirtualMachineRelocateTransformation

Properties inherited from DynamicData
None
*Need not be set
Show WSDL type definition