This article provides instructions for removing orphaned virtual machine or template records from the vCenter Server database. This is used when the objects cannot be removed via the vSphere Client.
Symptoms:
vim-cmd vmsvc/getallvms on the ESXi host CLI.The object 'vim.VirtualMachine:vm-####' has already been deleted or has not been completely created.
Metadata inconsistency occurs when a virtual machine or datastore is removed directly from an ESXi host or storage layer while vCenter Server is unaware of the change, leaving residual entries in the vCenter Server database (VCDB).
#### with the numeric ID found: