Method relocateVM_Task(VcVirtualMachineRelocateSpec spec, VcVirtualMachineMovePriority priority)

Relocates a virtual machine's virtual disks to a specific location; optionally moves the virtual machine to a different host as well. Starting from VCenter 5.1, this API also supports relocating a template to a new host should the current host becomes inactive. If is specified, this API attempts to relocate the template to the specified host; otherwise, this API will select a suitable host.

Additionally requires the Resource.HotMigrate privilege if the virtual machine is powered on (for Storage VMotion), and Datastore.AllocateSpace on any datastore the virtual machine or its disks are relocated to.

If the "pool" field of the RelocateSpec is set, additionally requires the Resource.AssignVMToPool privilege held on the specified pool.




Name Type Description
spec VcVirtualMachineRelocateSpec The specification of where to relocate the virtual machine.
priority VcVirtualMachineMovePriority The task priority (@see vim.VirtualMachine.MovePriority).