Unable to remove VM from vCenter Server / ESX inventory due to "Invalid State" error
search cancel

Unable to remove VM from vCenter Server / ESX inventory due to "Invalid State" error

book

Article ID: 425094

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

When attempting to remove a VM from the vCenter Server or ESX inventory, the process may fail with an "Invalid State" error.  You may experience one or more of the following conditions: 
 
- The VM shows powered off in the vCenter and ESX UI
- Attempting to remove the VM from the vCenter UI or ESX UI fails with an "Invalid State" error
- Attempting to remove the VM from ESX inventory via command line fails with an "Invalid State" error
- There is no folder, vmx, or vmdk's related to the VM on any datastore 
- An attempt to remove the VM from the vCenter Server database edit has already been attempted via KB311105
- There is no running VMX Process for the VM shown in esxtop or when running esxcli vm process list

Environment

vCenter Server 8.x

ESX 8.x

 

Cause

This is caused by a stale host process running on the ESX host related to the VM.

Resolution

1. Reboot the ESX host
  • Upon reboot, the host should confirm any VM in inventory by validating vmx file connectivity.  If the vmx file is no longer present or seen by the host, the VM should appear as "Invalid" within the vCenter / host UI upon it reconnecting to vCenter. 
 
2. Right-click the invalid VM and select "Remove from inventory"