vSphere 6.5

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.

orphaned1

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!

orphaned2

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.

orphaned3

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.

Back to top button