How to add a host back to a vSAN cluster after an ESXi host rebuild
search cancel

How to add a host back to a vSAN cluster after an ESXi host rebuild

book

Article ID: 327032

calendar_today

Updated On:

Products

VMware vSAN

Issue/Introduction

This article provides steps to rebuild an ESXi host that previously participated in a vSAN (formerly known as Virtual SAN) cluster.

Environment

VMware vSAN 7.x
VMware vSAN 8.x
VMware vSAN 6.7.x

Resolution

To rejoin the ESXi host to the vSAN cluster:

  1. Remove the old ESXi host entry from vCenter 
    1. Validate the ESXi is in a disconnected state. If so proceed to step 3. 
    2. If it is connected Right-click the host you want to Disconnect in the inventory pane, and select disconnect from the pop-up menu.
    3. Right click on the ESX host you wish to remove from the Inventory and select "remove from inventory"

  2. Install the exact ESXi version (Via build number) as the rest of the cluster is using, ensuring that you preserve the vSAN disk partitions.

  3. Add the host to the Datacenter Object in vCenter Server. Creating a datacenter and adding an ESXi host to the vCenter Server Inventory using vCenter Server appliance.
  4. Configure the vSAN VMkernel port group on the host. For more information, see How to configure vSAN VMkernel networking (315554).
  5. Drag the host in to the vSAN cluster object. This will enable vSAN clustering on the host and trigger a vSAN cluster update pushing the correct unicastagent list to all hosts.

  6. Validate cluster health via the vSAN skyline health check 

If the process above does not correct the issue please follow the steps below. 

  1. Connect to one of the remaining vSAN cluster hosts using SSH.
  2. Identify the vSAN Sub Cluster ID using this command:

    # esxcli vsan cluster get

    You see output similar to:

    Cluster Information
    Enabled: true
    Current Local Time: 2024-10-22T01:07:35Z
    Local Node UUID: ########-####-####-####-########826f
    Local Node Type: NORMAL
    Local Node State: AGENT
    Local Node Health State: HEALTHY
    Sub-Cluster Master UUID: ########-####-####-####-########f17d
    Sub-Cluster Backup UUID: ########-####-####-####-########dd93
    Sub-Cluster UUID: ########-####-####-####-########9e45
    Sub-Cluster Membership Entry Revision: 2
    Sub-Cluster Member Count: 3
    Sub-Cluster Member UUIDs: ########-####-####-####-########f17d, ########-####-####-####-########dd93, ########-####-####-####-########826f
    Sub-Cluster Member HostNames: esxi3.########, esxi2.########, esxi1.########
    Sub-Cluster Membership UUID: ########-####-####-####-########f17d
    Unicast Mode Enabled: true
    Maintenance Mode State: OFF
    Config Generation: ########-####-####-####-########d2c2 3 2024-10-22T01:07:26.420
    Mode: REGULAR
    vSAN ESA Enabled: false
     
  3. Run one of the commands below on the newly rebuilt ESXi host using the Sub Cluster UUID identified in step 2:
    • For vSAN OSA:

      # esxcli vsan cluster join -u sub_cluster_UUID

      For example:

      # esxcli vsan cluster join -u ########-####-####-####-########9e45

    • For vSAN ESA:
      # esxcli vsan cluster join -x -u sub_cluster_UUID

      For example:

      # esxcli vsan cluster join -x -u ########-####-####-####-########9e45


       
  4. Verify that the host is now a part of the vSAN cluster by running the command:

    # esxcli vsan cluster get

    You see output similar to:

    Cluster Information
    Enabled: true
    Current Local Time: 2024-10-22T01:13:14Z
    Local Node UUID: ########-####-####-####-########965e
    Local Node Type: NORMAL
    Local Node State: AGENT
    Local Node Health State: HEALTHY
    Sub-Cluster Master UUID: ########-####-####-####-########f17d
    Sub-Cluster Backup UUID: ########-####-####-####-########dd93
    Sub-Cluster UUID: ########-####-####-####-########9e45
    Sub-Cluster Membership Entry Revision: 3
    Sub-Cluster Member Count: 4
    Sub-Cluster Member UUIDs: ########-####-####-####-########f17d, ########-####-####-####-########dd93, ########-####-####-####-########826f, ########-####-####-####-########965e
    Sub-Cluster Member HostNames: esxi3.########, esxi2.########, esxi1.########, esxi4.########
    Sub-Cluster Membership UUID: ########-####-####-####-########f17d
    Unicast Mode Enabled: true
    Maintenance Mode State: OFF
    Config Generation: ########-####-####-####-########d2c2 4 2024-10-22T01:12:47.346
    Mode: REGULAR
    vSAN ESA Enabled: false
     
  5. In the vCenter Server, refresh the vSAN status view. All hosts now report the status as Healthy.