After a complete shutdown of an ESXi environment, I had some issues with one ESXi host while attempting to start it. The SD card containing the ESXi image became corrupted, which forced me to replace the SD card and reinstall ESXi. After the installation and configuration of the host was completed, the host was added to vCenter server.
Because the original host got a couple of virtual machines registered, these virtual machines now appear as “orphaned”. Orphaned means the virtual machine is still linked to a particular host in the vCenter Server database, but actually not linked on the host that should have the virtual machine. In this case that’s quite obvious because I just installed a brand new host.
You can remove an orphaned virtual machine from the inventory and than at it manually by re-registering. In this case there’s a far more elegant method available, just move (cold migrate) the orphaned virtual machines to another host in your cluster. Yes: This is possible, despite the virtual machine is orphaned. The new host should have (of course) access to VMFS/NFS volume hosting the orphaned virtual machine. If this is the case the virtual machine will re-register itself and appear in normal state in your inventory.
Yes, no more orphaned VMs 🙂
Great tip! This fixed my VSAN troubles. Thanks!