VMware Cloud Community
pstoric
Enthusiast
Enthusiast

Delete orpahned VM from Vsphere 6.5 web client

I'm trying to delete our older vCenter 5.5 VM (orphaned) via the web client but it's not letting me. We're using 6.5 now so 5.5 is not needed anymore and I can use the disk space. If I right click onto it it gives me different options that the rest of the VM's. The only option I see to delete is if I right click onto it, choose "All vCenter Orchestrator plugin actions" and select "Shut down and delete virtual machine". my problem is when I select that, it bring me to a gray window and nothing happens. How can I permanently delete that VM??

Capture.PNG

Capture.PNG

Here is what is get when I choose shutdown and delete VM from under "All vCenter Orchestrator plugin actions"

Capture.PNG

Tags (1)
6 Replies
DavoudTeimouri
Virtuoso
Virtuoso

You can remove VMs from command-line.

Try this:

Delete a VM

Remove-VM vm_name -deletepermanently

vmware-cmd --server esxhost –s unregister path_to_vmx_file

vmware-cmd --server vcenter --vihost esxhost –s unregister path_to_vmx_file vifs --server esxhost --rm “[datastore] path_to_vmx_on_datastore

vim-cmd vmsvc/destroy vmid

Also take a look at:

Performing common virtual machine-related tasks with command-line utilities (2012964) | VMware KB

-------------------------------------------------------------------------------------
Davoud Teimouri - https://www.teimouri.net - Twitter: @davoud_teimouri Facebook: https://www.facebook.com/teimouri.net/
pstoric
Enthusiast
Enthusiast

Actually I was able to delete it from the Web UI. It was 3 menus deep so I did not see the option. Thanks anyway!

0 Kudos
Aatifm
Contributor
Contributor

Hi, can you tell me how you did it.  I am using a VCSA and I have a vm on disconnected host which I cannot unregister. Can you tell me how you did it.

0 Kudos
Roachmojo
Contributor
Contributor

Drill down from infrastructure options and go to "all infrastructure option and then you'll see the option to remove from inventory.

Rohitsa
Enthusiast
Enthusiast

0 Kudos
Biswajitm
Contributor
Contributor

it worked for me ! Thank you very much.

Right click on VM(orphaned)-->all virtual infrastructure actions --> more Uncategorized actions-->remove form inventory.

0 Kudos