Failover Cluster Task
Initiates failover from the active vCenter node to the passive node. For forced failover, Active node immediately initiates a failover. This may result into a data loss after failover.
For planned failover, Active node flushes all the state to the Passive node, waits for the flush to complete before causing a failover. After the failover, Passive node starts without any data loss.
A failover is allowed only in the following cases:
- Cluster’s mode is enabled and all cluster members are present.
- Cluster’s mode is maintenance and all cluster members are present.
Request
URLURL
Header Parameters
Header Parameters
Required session ID, acquired from Create Session API under CIS product
vmware-api-session-id example
"b00db39f948d13ea1e59b4d6fce56389"
Request Body
This is a request body class for an operation.
{
"planned": false
}
If false, a failover is initiated immediately and may result in data loss. If true, a failover is initated after the Active node flushes its state to Passive and there is no data loss.
Authentication
Response
Response BodyResponse Body
An identifier for the task created by this API invocation will be returned. If the non-async version of the operation returns a value, this id can be used with the CIS Get Task operation to fetch that value. The normal description of this operation’s return value will follow if one exists.
Errors
com.vmware.vapi.std.errors.unauthorized : If the user has insufficient privilege to perform the operation. Operation execution requires the Global.VCServer privilege.
‘Default’ means this response is used for all HTTP codes that are not covered individually for this operation.
Code Samples
PowerCLI Client SDK Example
cURL Command
Vendor Extensions
x-vmw-doc-deprecated-method: post
x-vmw-doc-deprecated-path: /rest/vcenter/vcha/cluster?action=failover&vmw-task=true
x-vmw-doc-operation: failover_task