Virtual Machine Provisioning Checker Check Clone Task

Virtual Machine Provisioning Checker Check Clone Task

Tests the feasibility of a proposed CloneVM_Task operation.

Required privileges: System.View

Request
URI
POST
https://{api_host}/sdk/vim25/{release}/VirtualMachineProvisioningChecker/{moId}/CheckClone_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
CheckCloneRequestType of type(s) application/json
Required
"CheckCloneRequestType Object"
object
vm
Required

Reference to an instance of the VirtualMachine managed object.

object
folder
Required

Reference to an instance of the Folder managed object.

string
name
Required

The name of the new virtual machine.

object
spec
Required

Specification for a virtual machine cloning operation.

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: 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 cloning to a different datacenter or a different vCenter service
  • the datastore is not specified when testType parameter includes datastore tests while checking feasibility of cloning to a different datacenter or a different vCenter service

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

Returns InvalidState of type(s) application/json
"InvalidState Object"

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