When a virtual machine is orphaned, you should begin by trying to determine if a vCenter reboot has occurred. Occasionally if you try to move a machine through a vMotion migration to another host and the vCenter is rebooted it can cause them to be orphaned. Virtual machines can become orphaned if a host failover is unsuccessful, or when the virtual machine is unregistered directly on the host. Some additional symptoms:
- Virtual Machines show as invalid or orphaned after a VMware High Availability (VMware HA) host failure occurs
- Virtual Machines show as invalid or orphaned after an ESX host comes out of maintenance mode
- Virtual Machines show as invalid or orphaned after a failed DRS migration
- Virtual Machines show as invalid or orphaned after a storage failure
- Virtual Machines show as invalid or orphaned after the connection is lost between the vCenter Server and the host where the virtual machine resides
To fix, follow the steps below:
- Determine the datastore where the virtual machine configuration (.vmx) file is located.
- Return to the virtual machine in the vSphere Web Client, right-click, and select:
- All Virtual Infrastructure Actions> Remove from Inventory.
- Click Yes to confirm the removal of the virtual machine.
If you were looking to recreate and not just remove the virtual machine try the following:
- Browse to the datastore and verify that the virtual machine files exist.
- If the vmx configuration file was deletedor remove and the disk files are still there, attach the old disk files to a newly create machine.
- If the disk files were deleted, restore from a backup.