Remove Orphaned VM in VMware vCenter Web Client
Recently, I ran into an issue where I had a VM that was showing as orphaned in vCenter 6.5 web client. ย The VM was not showing on the host itself when logging in directly. ย When I right clicked on the orphaned VM in vCenter web client there was no option to remove the VM from inventory. ย What was the resolution? ย Let’s take a look at how to remove orphaned VM in VMware vCenter web client and the easy way we can get rid of a problem VM that is lingering in an orphaned state.
Remove Orphaned VM in VMware vCenter Web Client
As you can see below in the web client, I had an Ubuntu VM showing as “orphaned” and I couldn’t remove it from the web client.
In steps PowerCLI! ย Using the latest version 6.5 Release 1, I connected to the vCenter VCSA appliance. ย Running aย get-vm | select name I can see the VM in question.
Now all we have to do is run aย remove-vm <VM name>ย to remove the VM that is orphaned. ย Finally, I ran the same get-vm | select name command to see if it was indeed gone and voila!
A final confirmation was looking in the web client once again to see if the VM was gone from there as well and it was.
Thoughts
There are many cases where when you can’t get rid of objects using the vSphere Client (no longer usable with 6.5) or the vCenter web client, you can pull out PowerCLI and accomplish what you want to and the “Remove Orphaned VM in VMware vCenter Web Client” is no exception to this. ย So, if you get stuck with the GUI tools, be sure to leverage PowerCLI.