vSAN cluster Virtual Machines show in Orphaned state in vCenter UI after a network or power outage
search cancel

vSAN cluster Virtual Machines show in Orphaned state in vCenter UI after a network or power outage

book

Article ID: 399490

calendar_today

Updated On:

Products

VMware vSAN

Issue/Introduction

Following an outage (network, power etc.) Virtual Machines are showing as Orphaned in the vCenter UI inventory view, in the vCenter Datastore Browser they might not be showing the Friendly Name but only a UUID as in:

/vmfs/volume/<VSAN UUID>

As reviewed from the Host level, both UI and CLI the orphaned Virtual Machines are not listed as they have been unregistered from the host.

Environment

vCenter 7 and 8

vSAN 7 and 8

Cause

Temporary storage unavailability might cause the Virtual Machine to be knocked out of the inventory while still leaving the entry for it in the vCenter Server Database, therefore rendering it orphaned.

Resolution

To list and reload all the orphaned VMs in bulk please follow the below steps:

1. Open an SSH session to the vCenter Server Console.
2. Access the RVC by running the command:

  rvc <vcenter server address>

    By using the command above, you will be logged in using the [email protected] user by default. If you wish to use a different user, you must use the following syntax:
    rvc <username>@<vcenter server address>
    e.g.
    rvc [email protected]@vcenter.domain.local
    Note: The first @ symbol is part of the username ([email protected]) and the second @ symbol points to the vCenter Server system.

3. Navigate to the affected cluster by changing directories in RVC.
    
   e.g.
   cd /<vCenter Server Name>/<Datacenter Name>/computers/<vSAN_Cluster_Name>
   (computers is shorthand for Hosts & Clusters)
   (You can use the ls command to list options on each level and cd to change to the selected directory) 
  

4. At the Cluster level please run the below commands:

  vsan.check_state
   (to list the different object states in this cluster)
  
   and

  vsan.check_state -r
   (the -r option refreshes and re-registers the VMs)

Additional Information

Please see additional RVC documentation below:

How to use vSAN RVC

vSAN Ruby vSphere Console (RVC) use examples