Some Virtual Machines Become Disconnected After Running Site Maintenance Mode and Force Takeover
search cancel

Some Virtual Machines Become Disconnected After Running Site Maintenance Mode and Force Takeover

book

Article ID: 439980

calendar_today

Updated On:

Products

VMware vSAN

Issue/Introduction

In a vCenter on vSAN environment, some virtual machines in vCenter may appear as disconnected after a combination of entering site maintenance mode and performing a force takeover operation on one site.

Environment

VMware vSAN 9.1 and future releases

Resolution

Detailed steps:

  1. In an SDDC Manager environment, manually re-register all NSX virtual machines first to restore the system virtual machines.
  2. If vSphere HA is enabled on the cluster, use the Reconfigure for vSphere HA option for the hosts from the vSphere Client to recover other virtual machines in bulk.
  3. Manually register any remaining orphaned or disconnected virtual machines.

Steps to Manually Register a Virtual Machine on an ESXi Host

  1. Locate the .vmx files across the datastores. The following command lists the virtual machine names and corresponding paths in the vSAN datastore:

find /vmfs/volumes/<DATASTORE_NAME>/ -name "*.vmx"

  1. Re-register the disconnected virtual machine by using the .vmx file path obtained in the previous step:

vim-cmd solo/registervm /vmfs/volumes/<DATASTORE_NAME>/<VM_DIRECTORY>/<VM_NAME>.vmx

  1. Retrieve the virtual machine ID (Vmid):

vim-cmd vmsvc/getallvms | grep -i <VM_NAME>

Sample output:

Vmid Name File Guest OS Version Annotation
1 vCLS-c6ac0142-d536-7c27-####-######### [] /var/run/crx/infra/vCLS-c6ac0142-d536-7c27-####-#########/vCLS-c6ac0142-d536-7c27-####-#########.vmx crxSys1Guest vmx-##

The Vmid value is displayed in the first column of the output.

  1. Power on the virtual machine:

vim-cmd vmsvc/power.on <Vmid>