Upgraded, can't remove old VMs

Joined
Sep 17, 2012
Messages
767
I upgraded my home ESXi server from a 256GB SSD to a 512GB. Unfortunately, the three VMs that were on the drive are showing up as invalid. I forgot to remove them from inventory before I powered the server off. I moved them over to my 1TB SSD, powered off the system to swap drives, then moved them over to 512GB. The invalid ones need to be removed from inventory, but when I right click, there is no option to delete. I can't plug the original back in, as the NUC has no more ports, and I already wiped the drive after I ensure the VMs still worked, as I figured this would be easier than it has proven to be. If I go into SSH or PowerCLI, it only shows current drives, not the absent ones.



ESXi 6.5, standalone free license, no vcenter


Suggestions?

Capture_zpsinn2mdql.png

Capture_zpsnjzrjdup.png
 
Last edited:
Found the solution online. SSH into it, and ran the following.
  • List all VMs registered to this host (This reveals the Vmid needed for other commands)
    vim-cmd /vmsvc/getallvms
  • Unregister a VM
    vim-cmd /vmsvc/unregister <Vmid>
 
  • Like
Reactions: Farva
like this
Or create a trash folder, and move those VMs to it, then delete the trash folder.
 
Back
Top