For whatever reason, ESXi had to be reinstalled manually on all hosts in a vSAN cluster.
vSAN 6.x
vSAN 7.x
vSAN 8.x
vSAN OSA
vSAN ESA
After rebuilding an ESXi cluster, vSAN will be inaccessible. If all the drives that were previously used by vSAN, the data should remain intact.
1. Verify that vSAN disks are present using: esxcli vsan storage list or esxcli vsan storagepool list (for ESA)
2. Add vSAN networking to an existing configured vmKernel port: esxcli vsan network ipv4 add -i vmkX
3. Create a new vSAN cluster using a generated uuid: esxcli vsan cluster join -u $(python -c 'import uuid; print(str(uuid.uuid4()))')
4. Obtain the new UUID by running: esxcli vsan cluster get
5. Use the Sub-Cluster UUID from the previous output to join the other hosts to this vSAN cluster: esxcli vsan cluster join -u <UUID>
6. Now you can browse the datastore and see the VM objects in ESXi or vCenter
7. Obtain the previous cluster UUID by running the following command: esxcli vsan debug object list --all|grep -A1 "(Missing)"
8. Remove the hosts from the vsan cluster again: esxcli vsan cluster leave
9. Create the vSAN cluster again using the command from step 3 and the UUID obtained from step 7: esxcli vsan cluster join -u <UUID> NOTE: The UUID format should be in line with the following example: 07c39b5c-50da-2693-29fd-e4434b4bfc90
10. Next use the command from step 9 to join the other nodes back to the cluster
NOTE: For vSAN ESA, you need to add the flag '-x' to the commands to function
You may need to rebuild the unicast table to make the hosts participate in the cluster.
If the ESXi hosts were added to the new vCenter before the vSAN rebuild, you may see the error unable to enumerate all disks, in that case, follow VMs on vSAN fail to power on with Unable to enumerate all disks