vcenter vcha cluster: undeploy-task
Destroys the VCHA cluster and removes all VCHA specific information from the VCVA appliance. Optionally, the passive and witness node virtual machines will be deleted only if VCHA was deployed using automatic deployment. The active node in the cluster continues to run as a standalone VCVA appliance after the destroy operation has been performed.
If the VCHA cluster is in a transition state and not configured, then the VCHA cluster specific information is removed.
. This operation was added in vSphere API 6.7.1.Request:
HTTP request
POST https://{server}/rest/vcenter/vcha/cluster?vmw-task=true&action=undeploy
Request Body Structure:
{
"spec" : {
"vc_spec" : {
"active_location" : {
"hostname" : "string",
"password" : "secret string",
"port" : 1,
"ssl_thumbprint" : "string",
"username" : "string"
}
},
"force_delete" : true,
"vms" : {
"witness" : {
"vm" : "obj-103",
"bios_uuid" : "string"
},
"passive" : {
"vm" : "obj-103",
"bios_uuid" : "string"
}
}
}
}
"spec" : {
"vc_spec" : {
"active_location" : {
"hostname" : "string",
"password" : "secret string",
"port" : 1,
"ssl_thumbprint" : "string",
"username" : "string"
}
},
"force_delete" : true,
"vms" : {
"witness" : {
"vm" : "obj-103",
"bios_uuid" : "string"
},
"passive" : {
"vm" : "obj-103",
"bios_uuid" : "string"
}
}
}
}
Request Body Parameters:
Name | Type | Description |
---|---|---|
bold = required | ||
spec | undeploy_spec | Contains the undeploy specification for a VCHA cluster. |
spec.vc_spec | credentials_spec | Contains the active node's management vCenter server credentials. This attribute was added in vSphere API 6.7.1. Optional. If unset, then the active vCenter Server instance is assumed to be either self-managed or else in enhanced linked mode and managed by a linked vCenter Server instance. |
spec.vc_spec.active_location | connection_spec | Connection information for the management vCenter Server of the Active Node in a VCHA Cluster. This attribute was added in vSphere API 6.7.1. |
spec.vc_spec.active_location.hostname | string | IP Address or DNS of the vCenter. This attribute was added in vSphere API 6.7.1. |
spec.vc_spec.active_location.port | long | Port number. This attribute was added in vSphere API 6.7.1. Optional. If unset, port 443 will be used. |
spec.vc_spec.active_location.ssl_thumbprint | string | SHA1 hash of the server SSL certificate. This attribute was added in vSphere API 6.7.1. Optional. If unset, empty ssl thumbprint is assumed. |
spec.vc_spec.active_location.username | string | Username to access the server. This attribute was added in vSphere API 6.7.1. Optional. This field is currently required. If unset, an error is returned. In the future, if this field is unset, the system will attempt to identify the user. If a user cannot be identified, then the requested operation will fail. |
spec.vc_spec.active_location.password | secret | Password for the specified user. This attribute was added in vSphere API 6.7.1. Optional. This field is currently required. If unset, an empty password is assumed. In the future, if this field is unset, the system will attempt to authenticate the user. If a user cannot be identified, then the requested operation will fail. |
spec.force_delete | boolean | Flag controlling in what circumstances the virtual machines will be deleted. For this flag to take effect, the VCHA cluster should have been successfully configured using automatic deployment.
|
spec.vms | vm_info | Contains virtual machine information for the passive and witness virtual machines. For this flag to take effect, the VCHA cluster should have been successfully configured using automatic deployment. If set, the vcenter.vcha.cluster.undeploy_spec.force_delete field controls whether this information is validated.
|
spec.vms.passive | node_vm_info | The virtual machine information of the passive node. This attribute was added in vSphere API 6.7.1. |
spec.vms.passive.vm | string | The identifier of the virtual machine of the VCHA node. This attribute was added in vSphere API 6.7.1. When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: VirtualMachine:VCenter . When operations return a value of this structure as a result, the field will be an identifier for the resource type: VirtualMachine:VCenter . |
spec.vms.passive.bios_uuid | string | BIOS UUID for the node. This attribute was added in vSphere API 6.7.1. |
spec.vms.witness | node_vm_info | The virtual machine information of the witness node. This attribute was added in vSphere API 6.7.1. |
spec.vms.witness.vm | string | The identifier of the virtual machine of the VCHA node. This attribute was added in vSphere API 6.7.1. When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: VirtualMachine:VCenter . When operations return a value of this structure as a result, the field will be an identifier for the resource type: VirtualMachine:VCenter . |
spec.vms.witness.bios_uuid | string | BIOS UUID for the node. This attribute was added in vSphere API 6.7.1. |
Response:
HTTP Status Code: 200
Representation:
{
"value" : "obj-103"
}
"value" : "obj-103"
}
Response Type:
Name | Type | Description |
---|---|---|
bold = required | ||
value | string |
Errors:
HTTP Status Code | Type | Description |
---|---|---|
400 | invalid_argument | If the credentials provided for authenticating with the active node's management vCenter server are invalid. |
404 | not_found | If the passive virtual machine is not managed by the specified vCenter server. |
403 | unauthorized | If the user has insufficient privilege to perform the operation. Operation execution requires the Global.VCServer privilege. |
400 | unverified_peer | If the SSL certificate of the management vCenter server cannot be validated. The value of the data field of vapi.std.errors.error will be a structure that contains all the fields defined in vcenter.vcha.certificate_info. |
500 | error | If any other error occurs. |