VMware ESXi – deleting problematic VM

Reading Time: < 1 minute

Recently I revisted a set of ESXi machines in my lab that I hadn’t touched in a while. When I see

Well that’s problematic. In this case I was cleaning house and knew that that the storage and vms no longer existed so it was time to clean house. I enabled SSH and then connected to the ESX hosts console.

[root@localhost:~] vim-cmd /vmsvc/getallvms
Skipping invalid VM '1'
Skipping invalid VM '2'
Vmid Name File Guest OS Version Annotation

Invalid VM? That can’t be good. Well we knew this was a LAB ESX host and it’s obvious some house cleaning in order to get it back into shape. So…

[root@localhost:~] vim-cmd /vmsvc/unregister 1
[root@localhost:~] vim-cmd /vmsvc/unregister 2
[root@localhost:~] vim-cmd /vmsvc/getallvms
Vmid Name File Guest OS Version Annotation

And this put me back into shape again.

[root@localhost:~] vim-cmd /vmsvc/getallvms
Vmid Name File Guest OS Version Annotation
[root@localhost:~]

END POST

This entry was posted in VMware. Bookmark the permalink.