If a host or host component in a stretched cluster fails, it is recommended that you replace the host with a new host.
Prerequisites
- Image the replacement host with the same ESXi version as the other hosts in the cluster.
- Check the health of the cluster.
Procedure
- Get the ID of the host to be removed.
- In the navigation pane, click .
- Under APIs for managing hosts, click GET /v1/hosts.
- Click Execute.
- Click Download to 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 click GET /v1/clusters.
- Click Execute.
- Click Download to download the JSON file.
- Open the JSON file and copy the the cluster ID.
- Prepare the JSON request body.
- Click Patch /v1/clusters/id.
- Under ClusterUpdateSpec, click Cluster Update Data ClusterUpdateSpec{ ... }.
- Click Download to 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 the id field, replace the values with the host IDs you retrieved in step 1.
- Click Execute.
- Monitor the task till it is completed.
- Decommission the host to be removed.
- Commission the replacement host to the same network pool as the removed host.
- Expand the cluster to add the commissioned host to the cluster. See Expand a Stretched Cluster.
- 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.
Results
vSAN automatically rebuilds the stretch cluster.