Service Instance Validate Migration

Service Instance Validate Migration

Deprecated as of vSphere API 4.0, use VirtualMachineProvisioningChecker instead.

Checks the validity of a set of proposed migrations.

A migration is the act of changing the assigned execution host of a virtual machine, which can result from invoking MigrateVM_Task or RelocateVM_Task.

Required privileges: System.View

Request
URI
POST
https://{vcenter-host}/sdk/vim25/{release}/ServiceInstance/{moId}/ValidateMigration
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 ServiceInstance/{moId}.

string
release
Required

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


Request Body
ValidateMigrationRequestType of type(s) application/json
Required

Show optional properties

{
    "vm": [
        {}
    ]
}
{
    "vm": [
        {
            "_typeName": "string",
            "type": "string",
            "value": "string"
        }
    ],
    "state": "string",
    "testType": [
        "string"
    ],
    "pool": {
        "_typeName": "string",
        "type": "string",
        "value": "string"
    },
    "host": {
        "_typeName": "string",
        "type": "string",
        "value": "string"
    }
}
vm
Required

The set of virtual machines intended for migration.

state
Optional

The PowerState type defines a simple set of states for a virtual machine: poweredOn, poweredOff, and suspended.

This type does not model substates, such as when a task is running to change the virtual machine state. If the virtual machine is in a state with a task in progress, it transitions to a new state when the task completes. For example, a virtual machine continues to be in the poweredOn state while a suspend task is running, and changes to the suspended state once the task finishes.

As a consequence of this approach, clients interested in monitoring the status of a virtual machine should typically track the activeTask data object in addition to the powerState object.

Possible values:

  • poweredOff: The virtual machine is currently powered off.
  • poweredOn: The virtual machine is currently powered on.
  • suspended: The virtual machine is currently suspended.
Possible values are : poweredOff, poweredOn, suspended,
array of string
testType
Optional

The set of tests to run. If this argument is not set, all tests will be run.

pool
Optional

Reference to an instance of the ResourcePool managed object.

host
Optional

Reference to an instance of the HostSystem managed object.

Authentication
This operation uses the following authentication methods.
Responses
200

A set of events that describe the warnings or errors that would apply if the proposed set of migrations were executed.

Returns Array of Event of type(s) application/json
[
    {
        "_typeName": "string",
        "key": 0,
        "chainId": 0,
        "createdTime": "string",
        "userName": "string",
        "datacenter": {
            "_typeName": "string",
            "name": "string",
            "datacenter": {
                "_typeName": "string",
                "type": "string",
                "value": "string"
            }
        },
        "computeResource": {
            "_typeName": "string",
            "name": "string",
            "computeResource": {
                "_typeName": "string",
                "type": "string",
                "value": "string"
            }
        },
        "host": {
            "_typeName": "string",
            "name": "string",
            "host": {
                "_typeName": "string",
                "type": "string",
                "value": "string"
            }
        },
        "vm": {
            "_typeName": "string",
            "name": "string",
            "vm": {
                "_typeName": "string",
                "type": "string",
                "value": "string"
            }
        },
        "ds": {
            "_typeName": "string",
            "name": "string",
            "datastore": {
                "_typeName": "string",
                "type": "string",
                "value": "string"
            }
        },
        "net": {
            "_typeName": "string",
            "name": "string",
            "network": {
                "_typeName": "string",
                "type": "string",
                "value": "string"
            }
        },
        "dvs": {
            "_typeName": "string",
            "name": "string",
            "dvs": {
                "_typeName": "string",
                "type": "string",
                "value": "string"
            }
        },
        "fullFormattedMessage": "string",
        "changeTag": "string"
    }
]

500

InvalidArgument: if the target host(s) and target pool for a migration are not associated with the same compute resource, or if the host parameter is left unset when the target pool is associated with a non-DRS cluster.

InvalidPowerState: if the state argument is set and at least one of the specified virtual machines is not in that power state.

NoActiveHostInCluster: if a target host is not specified and a cluster associated with a target pool does not contain at least one potential target host. A host must be connected and not in maintenance mode in order to be considered as a potential target host.

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"
        }
    ]
}