Wednesday, 20 December 2017

VM shows as orphaned in vCenter - Web Client

This week we've been creating and deleting VMs, and in one of the labs we delete a VM and then when we access the Web Client and connect to our we see the VM shown as orphaned.

This is because the vCenter server database still see the VM.

The fix for this in vSphere 6.5 is a straightforward task.

Step 1. Download PowerCLI 6.5

Step 2. Run PowerCLI and connect to your vCenter Server from PowerCLI

connect-viserver vc-fqdn (replace with FQDN eg

Step 3. List the VMs

get-vm | select name

Step 4. Delete the orphaned VM

remove-vm VMName

Step 5. Verify deletion

get-vm | select name

The machine should no longer be listed.

Another way to delete the orphaned VM is to use the Web Client

Highlight the VM right click the VM > All Virtual Infrastructure Actions > Remove from Inventory