Multiple vSAN Virtual Objects exist with type 'VM (removed from inventory)'
search cancel

Multiple vSAN Virtual Objects exist with type 'VM (removed from inventory)'

book

Article ID: 442617

calendar_today

Updated On:

Products

VMware vSAN

Issue/Introduction

When navigating to a vSAN Cluster > Monitor > Virtual Objects, you see multiple vSAN objects with the type 'VM (removed from Inventory). 

Environment

  • vSAN 7.x
  • vSAN 8.x 
  • vSAN 9.x

Cause

This is caused by virtual machines being removed from inventory, but were not deleted from disk. 

Due to this, the objects remain on the vSAN cluster with the 'VM (removed from inventory)' type. 

Resolution

Please note that both of the solutions provided are irreversible. Once the objects are deleted, they cannot be recovered. 

Ensure you have necessary backups of any virtual machines before proceeding. 

If these VMs are no longer needed and can be safely deleted, re-register the virtual machines and proceed with a 'Delete from disk' via the vSphere Client:

  1. Click on the vSAN datastore.
  2. Select the Files tab.
  3. Locate and select the virtual machine folder. 
  4. Check the box to the left of the vmx file.
  5. Click on Register VM.
  6. Right click on the VM in inventory.
  7. Select Delete from disk.

In the event the virtual machine folder is not intact preventing the virtual machine from being re-registered and you wish to remove it, you must delete the manually objects using the UUID:

  1. Navigate to the vSAN Cluster.
  2. Select Monitor.
  3. Click on Virtual Objects under vSAN.
  4. Select the filter icon to filter for VMs with the 'VM (removed from inventory type'.
  5. Make note of the UUID for each object. 
  6. SSH into a host within the vSAN cluster. 
  7. Run the following command for each UUID entry with type 'VM (removed from inventory)', replacing <UUID> with the UUID listed: /usr/lib/vmware/osfs/bin/objtool delete -u <UUID> -f