Virtual Machine Provisioning Checker Check Relocate Task

Virtual Machine Provisioning Checker Check Relocate Task

Tests the feasibility of a proposed RelocateVM_Task operation.

Required privileges: System.View

Request
URI
POST
https://{vcenter-host}/sdk/vim25/{release}/VirtualMachineProvisioningChecker/{moId}/CheckRelocate_Task
COPY
Path Parameters
string
moId
Required

The unique identifier for the managed object to which the method attaches; the serialized managed object reference for a request has the form moType/moId, in this case VirtualMachineProvisioningChecker/{moId}.

string
release
Required

The vSphere release schema. The current specification covers vSphere 8.0.2.0 APIs.


Request Body
CheckRelocateRequestType of type(s) application/json
Required
{
    "vm": {
        "type": "string",
        "value": "string"
    },
    "spec": {
        "service": {
            "instanceUuid": "string",
            "url": "string",
            "credential": {
                "_typeName": "string"
            },
            "sslThumbprint": "string"
        },
        "folder": {
            "type": "string",
            "value": "string"
        },
        "datastore": {
            "type": "string",
            "value": "string"
        },
        "diskMoveType": "string",
        "pool": {
            "type": "string",
            "value": "string"
        },
        "host": {
            "type": "string",
            "value": "string"
        },
        "disk": [
            {
                "_typeName": "string",
                "diskId": 0,
                "datastore": {
                    "type": "string",
                    "value": "string"
                },
                "diskMoveType": "string",
                "diskBackingInfo": {
                    "_typeName": "string"
                },
                "profile": [
                    {
                        "_typeName": "string"
                    }
                ],
                "backing": {
                    "parent": "VirtualMachineRelocateSpecDiskLocatorBackingSpec Object",
                    "crypto": {
                        "_typeName": "string"
                    }
                },
                "filterSpec": [
                    {
                        "_typeName": "string"
                    }
                ]
            }
        ],
        "transform": "string",
        "deviceChange": [
            {
                "_typeName": "string",
                "operation": "string",
                "fileOperation": "string",
                "device": {
                    "key": 0,
                    "deviceInfo": {
                        "label": "string",
                        "summary": "string"
                    },
                    "backing": {
                        "_typeName": "string"
                    },
                    "connectable": {
                        "migrateConnect": "string",
                        "startConnected": false,
                        "allowGuestControl": false,
                        "connected": false,
                        "status": "string"
                    },
                    "slotInfo": {
                        "_typeName": "string"
                    },
                    "controllerKey": 0,
                    "unitNumber": 0,
                    "numaNode": 0,
                    "deviceGroupInfo": {
                        "groupInstanceKey": 0,
                        "sequenceId": 0
                    }
                },
                "profile": [
                    {
                        "_typeName": "string"
                    }
                ],
                "backing": {
                    "parent": "VirtualDeviceConfigSpecBackingSpec Object",
                    "crypto": {
                        "_typeName": "string"
                    }
                },
                "filterSpec": [
                    {
                        "_typeName": "string"
                    }
                ],
                "changeMode": "string"
            }
        ],
        "profile": [
            {
                "_typeName": "string"
            }
        ],
        "cryptoSpec": {
            "_typeName": "string"
        }
    },
    "testType": [
        "string"
    ]
}
vm
Required

Reference to an instance of the VirtualMachine managed object.

spec
Required

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

array of string
testType
Optional

The set of tests to run. If this argument is not set, all tests will be run. See CheckTestTypeEnum for possible values.

Authentication
This operation uses the following authentication methods.
Responses
200

OK

Returns MoRefTask of type(s) application/json
This response body class contains all of the following: MoRefExtensibleManagedObject
{
    "_typeName": "string",
    "type": "string",
    "value": "string"
}

500

NotSupported: if the virtual machine is marked as a template.

InvalidArgument: in the following cases:

  • the target host and target pool are not associated with the same compute resource
  • the target pool represents a cluster without DRS enabled, and the host is not specified
  • Datastore in a diskLocator entry is not specified
  • the specified device ID cannot be found in the virtual machine's current configuration
  • the object specified in relocate cannot be found
  • the target pool is not specified while checking feasibility of relocation to a different datacenter or different vCenter service
  • the datastore is not specified when testType parameter includes datastore tests while checking feasibility of relocation to a different datacenter or a different vCenter service

InvalidState: if the operation cannot be performed because of the host or virtual machine's current state. For example, if the host is in maintenance mode, or if the virtual machine's configuration information is not available.

Returns InvalidState of type(s) application/json
This response body class contains all of the following: VimFault
{
    "_typeName": "string",
    "faultCause": "MethodFault Object",
    "faultMessage": [
        {
            "_typeName": "string",
            "key": "string",
            "arg": [
                {
                    "_typeName": "string",
                    "key": "string",
                    "value": {
                        "_typeName": "string"
                    }
                }
            ],
            "message": "string"
        }
    ]
}