Nov 19, 2019

VMWare : Delete Invalid VM

The following commands will allows you to delete VM that are "Invalid" in the WebUI.

1. Run SSH via Putty or any remote console of your choice.

2. Login as "root" into the ESXi server.

3. Type --> vim-cmd /vmsvc/getallvms
* To display all VMs in the server.

4. Take note of the "VMID" columns and any error messages shown such as "skipping unknown VMID 10" or similar messages, this is the VM that you might want to delete from the server.

5. Type --> vim-cmd /vmsvc/unregister <vmid>
* To unregister the specified vmid from the server.

6. If successful, you can exit from SSH and login back to the server via the WebUI.

7. Goto "Browse Datastore" and remove the invalid VM from the HDD.

Simple right ?

!!! HAPPY COMPUTING !!!