How to register and unregister a VM in vmware esxi using cmd
You can unregister a VM from ESXi directly using ESXi Host Shell / SSH (vim-cmd), vCenter will update automatically.
- List VMs:
vim-cmd vmsvc/getallvms
Note the VMID.
- Unregister the VM:
vim-cmd vmsvc/unregister <VMID>
- Register:
vim-cmd solo/register /vmfs/volumes/<datastore>/<vmname>/<vmname>.vmx
You will need to know the datastore and VM names.

Leave a Reply
Want to join the discussion?Feel free to contribute!