VirtualMachineRelocateSpec

VirtualMachineRelocateSpec
VirtualMachineRelocateSpec

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

AllOf
This class requires all of the following:
JSON Example
{
    "_typeName": "string",
    "service": {
        "_typeName": "string",
        "instanceUuid": "string",
        "url": "string",
        "credential": {
            "_typeName": "string"
        },
        "sslThumbprint": "string"
    },
    "folder": {
        "_typeName": "string",
        "type": "string",
        "value": "string"
    },
    "datastore": {
        "_typeName": "string",
        "type": "string",
        "value": "string"
    },
    "diskMoveType": "string",
    "pool": {
        "_typeName": "string",
        "type": "string",
        "value": "string"
    },
    "host": {
        "_typeName": "string",
        "type": "string",
        "value": "string"
    },
    "disk": [
        {
            "_typeName": "string",
            "diskId": 0,
            "datastore": {
                "_typeName": "string",
                "type": "string",
                "value": "string"
            },
            "diskMoveType": "string",
            "diskBackingInfo": {
                "_typeName": "string"
            },
            "profile": [
                {
                    "_typeName": "string"
                }
            ],
            "backing": {
                "_typeName": "string",
                "parent": "VirtualMachineRelocateSpecDiskLocatorBackingSpec Object",
                "crypto": {
                    "_typeName": "string"
                }
            },
            "filterSpec": [
                {
                    "_typeName": "string"
                }
            ]
        }
    ],
    "transform": "string",
    "deviceChange": [
        {
            "_typeName": "string",
            "operation": "string",
            "fileOperation": "string",
            "device": {
                "_typeName": "string",
                "key": 0,
                "deviceInfo": {
                    "_typeName": "string",
                    "label": "string",
                    "summary": "string"
                },
                "backing": {
                    "_typeName": "string"
                },
                "connectable": {
                    "_typeName": "string",
                    "migrateConnect": "string",
                    "startConnected": false,
                    "allowGuestControl": false,
                    "connected": false,
                    "status": "string"
                },
                "slotInfo": {
                    "_typeName": "string"
                },
                "controllerKey": 0,
                "unitNumber": 0,
                "numaNode": 0,
                "deviceGroupInfo": {
                    "_typeName": "string",
                    "groupInstanceKey": 0,
                    "sequenceId": 0
                }
            },
            "profile": [
                {
                    "_typeName": "string"
                }
            ],
            "backing": {
                "_typeName": "string",
                "parent": "VirtualDeviceConfigSpecBackingSpec Object",
                "crypto": {
                    "_typeName": "string"
                }
            },
            "filterSpec": [
                {
                    "_typeName": "string"
                }
            ],
            "changeMode": "string"
        }
    ],
    "profile": [
        {
            "_typeName": "string"
        }
    ],
    "cryptoSpec": {
        "_typeName": "string"
    }
}
service
Optional

This data object type specifies the information of a service endpoint as well as the parameters needed to locate and login to to the service endpoint.

folder
Optional

Reference to an instance of the Folder managed object.

datastore
Optional

Reference to an instance of the Datastore managed object.

string
diskMoveType
Optional

Manner in which to move the virtual disk to the target datastore.

The set of possible values is described in VirtualMachineRelocateDiskMoveOptionsEnum.

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 moveAllDiskBackingsAndDisallowSharing is assumed.

pool
Optional

Reference to an instance of the ResourcePool managed object.

host
Optional

Reference to an instance of the HostSystem managed object.

disk
Optional

An optional list that allows specifying the datastore location for each virtual disk.

transform
Optional

Deprecated as of vSphere API 5.0.

The set of tranformations that can be performed on the virtual disks as part of the copy.

Possible values:

  • flat
  • sparse
Possible values are : flat, sparse,
deviceChange
Optional

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.
profile
Optional

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.

cryptoSpec
Optional

This data object type encapsulates virtual machine or disk encryption settings.