Replace a Failed Host
in a Stretched Cluster
If a host or host component in a
stretched cluster fails, it is recommended that you replace the host with a new host.
- Image the replacement host with the same ESXi version as the other hosts in the cluster.
- Check the health of the cluster.
- Get the ID of the host to be removed.
- In the navigation pane, click.
- Under APIs for managing hosts, clickGET /v1/hosts.
- ClickExecute.
- ClickDownloadto download the JSON file.
- Open the JSON file and copy the the ID of the host to be removed.
- Get the ID of the cluster from where the host is to be removed.
- In the API Explorer, navigate to APIs for managing clusters and clickGET /v1/clusters.
- ClickExecute.
- ClickDownloadto download the JSON file.
- Open the JSON file and copy the the cluster ID.
- Prepare the JSON request body.
- ClickPatch /v1/clusters/id.
- UnderClusterUpdateSpec, clickCluster Update Data ClusterUpdateSpec{ ... }.
- ClickDownloadto download the JSON file.
- Edit the JSON file so that it contains only the compact section similar to the example below.{ "clusterCompactionSpec": { "hosts": [ { "id": "ESXi host 1 ID" }, { "id": "ESXi host 2 ID" }, { "id": "ESXi host 3 ID" } ] } }
- Run the compact cluster API.
- In theidfield, replace the values with the host IDs you retrieved in step 1.
- ClickExecute.
- Monitor the task till it is completed.
- Decommission the host to be removed.See Decommission Hosts.
- Commission the replacement host to the same network pool as the removed host.See Commission Hosts.
- Expand the cluster to add the commissioned host to the cluster. See Expand a Stretched Cluster in VMware Cloud Foundation.
- If required, SSH in to each newly added host and add a static route to the vSAN network of the witness host. Also add static routes in the witness if it could not reach the vSAN network of the newly added hosts.
vSAN automatically rebuilds
the stretch cluster.