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 General4. 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 removal6. 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. Example: {"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).
Example:
{"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"}