Virtual Machine Enable Secondary VM Task
Enables the specified secondary virtual machine in this fault tolerant group.
This operation is used to enable a secondary virtual machine that was previously disabled by the DisableSecondaryVM_Task call. The specified secondary will be automatically started whenever the primary is powered on.
If the primary virtual machine (i.e., this virtual machine) is powered on when the secondary is enabled, an attempt will be made to power on the secondary. If a host was specified in the method call, this host will be used. If a host is not specified, one will be selected by the system. In the latter case, 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 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.
Required privileges: VirtualMachine.Interact.EnableSecondary
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.3.0 APIs.
Show optional properties
{
"vm": {}
}
{
"vm": {
"_typeName": "string",
"type": "string",
"value": "string"
},
"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 VirtualMachine and the status of powering it on, if attempted.
{
"_typeName": "string",
"type": "string",
"value": "string"
}
VmConfigFault: if a configuration issue prevents enabling the secondary. Typically, a more specific fault such as VmConfigIncompatibleForFaultTolerance is thrown.
VmFaultToleranceIssue: if any error is encountered with the fault tolerance configuration of the virtual machine. Typically, a more specific fault like InvalidOperationOnSecondaryVm is thrown.
TaskInProgress: if the virtual machine is busy.
ManagedObjectNotFound: if a host is specified and it does not exist.
InvalidState: if the virtual machine's configuration information is not available, if the secondary virtual machine is not disabled, or if a power-on is attempted and one is already in progress.
{
"_typeName": "string",
"faultCause": "MethodFault Object",
"faultMessage": [
{
"_typeName": "string",
"key": "string",
"arg": [
{
"_typeName": "string",
"key": "string",
"value": {
"_typeName": "string"
}
}
],
"message": "string"
}
]
}