Scripting Object - VcVirtualMachineRelocateSpec

Attribute of
VcPlacementAction, VcPlacementSpec, VcStorageMigrationAction, VcStoragePlacementAction, VcStoragePlacementSpec, VcVirtualMachineCloneSpec, VcVirtualMachineCreateChildSpec
Parameter to
checkRelocate_Task, relocateVM_Task

Scripting Object Description

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

Attributes

Name Type Description
datastoreVcDatastore

The datastore where the virtual machine should be located. If not specified, the current datastore is used. If the virtual machine is relocated to a different vCenter service or datacenter the destination datastore must be specified and cannot be unset. Even if the datastore is not changing, the destination datastore will have a different managed object reference in the destination datacenter or vCenter service. @since VI API 2.5
deviceChangeVcVirtualDeviceConfigSpec []

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

The supported device changes are:

  • For {@link vim.vm.device.VirtualEthernetCard}, it has to be used in {@link vim.vm.device.VirtualDeviceSpec#device} to specify the target network backing.
  • For {@link vim.vm.device.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
diskVcVirtualMachineRelocateSpecDiskLocator []

An optional list that allows specifying the datastore location for each virtual disk. @since VI API 2.5
diskMoveTypeString

Manner in which to move the virtual disk to the {@link #datastore target datastore}. The set of possible values is described in {@link vim.vm.RelocateSpec.DiskMoveOptions}.

This property applies to all the disks which the virtual machine has, but can be overridden on a per-disk basis using {@link vim.vm.RelocateSpec.DiskLocator#diskMoveType} prior to vSphere API 6.0 or using {@link vim.vm.device.VirtualDiskSpec#diskMoveType} in vSphere API 6.0 and later.

This property can only be set if {@link vim.host.Capability#deltaDiskBackingsSupported} is true.

If left unset then {@link vim.vm.RelocateSpec.DiskMoveOptions#moveAllDiskBackingsAndDisallowSharing} is assumed. @since vSphere API 4.0

dynamicPropertyVcDynamicProperty []

@since Unknown
dynamicTypeString

@since Unknown
folderVcFolder

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
hostVcHostSystem

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, and the target pool represents a DRS-enabled cluster, a host selected by DRS is used.
  • if resource pool is specified and the target pool represents a cluster without DRS enabled, an InvalidArgument exception be thrown.
  • if the virtual machine is relocated to a different vCenter service, both the destination host has to be specified and cannot be unset.
@since VI API 2.5
poolVcResourcePool

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.
@since VI API 2.5
profileVcVirtualMachineProfileSpec []

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
serviceVcServiceLocator

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

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. @since VI API 2.5

Methods

Methods defined in this Scripting Object
None