Virtual Machine Compatibility Checker Check Power On Task

Virtual Machine Compatibility Checker Check Power On Task

Tests whether the provided virtual machine can be powered on on the given host and/or resource pool.

Required privileges: System.View

Request
URI
POST
https://{api_host}/sdk/vim25/{release}/VirtualMachineCompatibilityChecker/{moId}/CheckPowerOn_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 VirtualMachineCompatibilityChecker/{moId}.

string
release
Required

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


Request Body
CheckPowerOnRequestType of type(s) application/json
Required
"CheckPowerOnRequestType Object"
vm
Required

The virtual machine to power on.

host
Optional

The host on which we want to power on the virtual machine. The host parameter may be left unset if the compute resource associated with the pool represents a stand-alone host or a DRS-enabled cluster. In the former case the stand-alone host is used. In the latter case, each connected host in the cluster that is not in maintenance mode is tested. Either this parameter or the pool parameter must be set.

pool
Optional

The resource pool we would like the virtual machine to run in. If the pool parameter is left unset, we use the host's root resource pool.

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
"MoRefTask Object"

500

InvalidArgument: if the desired host and pool are not associated with the same compute resource, the host parameter is left unset when the specified pool is associated with a non-DRS cluster, or if the provided vm does not exist.

DatacenterMismatch: if the provided host and pool do not belong to the same datacenter.

Returns MethodFault of type(s) application/json
This response body class contains all of the following: InlineMethodFault0
"MethodFault Object"
faultCause
Optional

Fault which is the cause of this fault.

array of object
faultMessage
Optional

Message which has details about the error Message can also contain a key to message catalog which can be used to generate better localized messages.


Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '[{}]' https://{api_host}/sdk/vim25/{release}/VirtualMachineCompatibilityChecker/{moId}/CheckPowerOn_Task