[VMConAWS] Remove a specific host from VMC SDDC
search cancel

[VMConAWS] Remove a specific host from VMC SDDC


Article ID: 325151


Updated On:


VMware Cloud on AWS


In VMC SDDC, you cannot specify a host to remove. You can remove hosts from your SDDC as long as the number of hosts in your SDDC cluster remains above the minimum. When you remove a host, VMs running on that host are evacuated to other hosts in the SDDC cluster. The host is placed into maintenance mode and then removed. The minimum number of hosts for a single availability zone cluster is 3. The minimum number for a multiple availability zone cluster is 6. If you are removing hosts from a multiple availability zone cluster, you must remove them in multiples of two.


You can leverage the VMC Developer Center API Explorer to remove a specific host. Following are the steps to remove a specific host.

1. Login to the vmware cloud console for VMC and navigate to Developer Center > API Explorer.

2. Select your SDDC from the drop down under Environment, by default the Org is auto populated.

3. Under Available APIs, expand VMware Cloud on AWS and select General


4. From the API Categories list, expand SDDCs and execute the Get SDDC API -  /orgs/{org}/sddcs/{sddc}


5. Execute the Get API and expand the result to obtain the esx_id for host removal


6. Now from the above result make a note of  the esx_id that you wish to remove. Under the same category navigate to orgs/{org}/sddcs/{sddc}/esxs API.

7. Expand POST orgs/{org}/sddcs/{sddc}/esxs API, this should auto populate the ORG and SDDC ID. Specify the remove action, type “remove” in the action field.

8. The esxconfig is a required filed and if you click on the EsxConfig hyperlink, it populates the strings in its required field. The num_hosts is a required field. Edit the config with specifying the esx_id noted in step 6.

 {"esxs": [ "41bcxxxx-ebe7-xxxx-8f9d-22f457xxxxxX" ],  "num_hosts": 1}

9. Click the Execute button to remove the specified host and expand the Response to view the status.


Note: The above example was run on a 3 Node lab SDDC and as the SDDC Cluster is at minimum host, the host removal is expected to fail.

Alternatively, you may remove multiple specified hosts from a non-default cluster (Cluster-1).

Following Step 5, above, determine the cluster_id and the esxs_id that represent the cluster and hosts respectively.

In the below example, a method is provided to remove a specified number of hosts (num_hosts) from a non-default cluster, for instance, Cluster-2 (Cluster_id).
{"num_hosts":3,"cluster_id":"5dfxxxxx-xxxx-4742-a05d-xxxxxxx42fxx","esxs":["xxxxx16e-xxxx-41c7-xxxx-0715fxxxxxxx","45xxxx57-xxxx-4135-xxxx-fe07f70xxxxx", "5xxxxx21-2c20-xxxx-xxxx-c0efxxxxxxxx"],"host_operation_context":"USER"}