Virtual Machine Create Secondary VM Task
Deprecated as of vSphere API 6.0, use CreateSecondaryVMEx_Task instead.
Creates a secondary virtual machine to be part of this fault tolerant group.
If a host is specified, the secondary virtual machine will be created on it. Otherwise, a host will be selected by the system.
If the primary virtual machine (i.e., this virtual machine) is powered on when the secondary is created, an attempt will be made to power on the secondary on a system selected host. If the cluster is a DRS cluster, DRS will be invoked to obtain a placement for the new secondary virtual machine. If the DRS recommendation (see ClusterRecommendation) is automatic, it will be automatically executed. Otherwise, the recommendation will be returned to the caller of this method and the secondary will remain powered off until the recommendation is approved using ApplyRecommendation. Failure to power on the secondary virtual machine will not fail the creation of the secondary.
Required privileges: VirtualMachine.Interact.CreateSecondary
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 VirtualMachine/{moId}
.
The vSphere release schema. The current specification covers vSphere 8.0.2.0 APIs.
{
"host": {
"_typeName": "string",
"type": "string",
"value": "string"
}
}
This method returns a Task object with which to monitor the operation. The info.result property in the Task returns an instance of the FaultToleranceSecondaryOpResult data object, which contains a reference to the created VirtualMachine and the status of powering it on, if attempted.
{
"_typeName": "string",
"type": "string",
"value": "string"
}
TaskInProgress: if the virtual machine is busy.
NotSupported: if the virtual machine is marked as a template, or it is not in a vSphere HA enabled cluster.
InvalidState: if the virtual machine's configuration information is not available.
ManagedObjectNotFound: if a host is specified and it does not exist.
InsufficientResourcesFault: if this operation would violate a resource usage policy.
VmFaultToleranceIssue: if any error is encountered with the fault tolerance configuration of the virtual machine. Typically, a more specific fault like FaultToleranceNotLicensed is thrown.
FileFault: if there is a problem accessing the virtual machine on the filesystem.
VmConfigFault: if a configuration issue prevents creating the secondary. Typically, a more specific fault such as VmConfigIncompatibleForFaultTolerance is thrown.
{
"_typeName": "string",
"faultCause": "MethodFault Object",
"faultMessage": [
{
"_typeName": "string",
"key": "string",
"arg": [
{
"_typeName": "string",
"key": "string",
"value": {
"_typeName": "string"
}
}
],
"message": "string"
}
]
}