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.
  1. Get the ID of the host to be removed.
    1. In the navigation pane, click
      Developer Center
      API Explorer
      .
    2. Under APIs for managing hosts, click
      GET /v1/hosts
      .
    3. Click
      Execute
      .
    4. Click
      Download
      to download the JSON file.
    5. Open the JSON file and copy the the ID of the host to be removed.
  2. Get the ID of the cluster from where the host is to be removed.
    1. In the API Explorer, navigate to APIs for managing clusters and click
      GET /v1/clusters
      .
    2. Click
      Execute
      .
    3. Click
      Download
      to download the JSON file.
    4. Open the JSON file and copy the the cluster ID.
  3. Prepare the JSON request body.
    1. Click
      Patch /v1/clusters/id
      .
    2. Under
      ClusterUpdateSpec
      , click
      Cluster Update Data ClusterUpdateSpec{ ... }
      .
    3. Click
      Download
      to download the JSON file.
    4. 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
      " } ] } }
  4. Run the compact cluster API.
    1. In the
      id
      field, replace the values with the host IDs you retrieved in step 1.
    2. Click
      Execute
      .
    3. Monitor the task till it is completed.
  5. Decommission the host to be removed.
  6. Commission the replacement host to the same network pool as the removed host.
  7. Expand the cluster to add the commissioned host to the cluster. See Expand a Stretched Cluster in VMware Cloud Foundation.
  8. 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.