Relocate VM Task
Relocates a virtual machine based on the specification. The parts of the virtual machine that can move are: FOLDER, RESOURCE_POOL, HOST, CLUSTER and DATASTORE of home of the virtual machine and disks.
if you do not have all of the privileges described as follows: - The resource VirtualMachine referenced by the parameter vm requires Resource.ColdMigrate. - The resource ResourcePool referenced by the attribute VM.RelocatePlacementSpec.resource-pool requires Resource.AssignVMToPool.
Request
URLURL
Path Parameters
Path Parameters
Header Parameters
Header Parameters
Request Body
Relocate specification. Document-based relocate spec.
{
"disks": {
"key": {
"datastore": "string"
}
},
"placement": {
"cluster": "string",
"datastore": "string",
"folder": "string",
"host": "string",
"resource_pool": "string"
}
}
Individual disk relocation map. If unset, all disks will migrate to the datastore specified in the VM.RelocatePlacementSpec.datastore field of VM.RelocateSpec.placement. When clients pass a value of this structure as a parameter, the key in the field map must be an identifier for the resource type: com.vmware.vcenter.vm.hardware.Disk. When operations return a value of this structure as a result, the key in the field map will be an identifier for the resource type: com.vmware.vcenter.vm.hardware.Disk.
Virtual machine placement information. If this field is unset, the system will use the values from the source virtual machine. If specified, each field will be used for placement. If the fields result in disjoint placement the operation will fail. If the fields along with the other existing placement of the virtual machine result in disjoint placement the operation will fail.
Response
Response BodyResponse Body
An identifier for the task created by this API invocation will be returned. If the non-async version of the operation returns a value, this id can be used with the CIS Get Task operation to fetch that value. The normal description of this operation’s return value will follow if one exists.