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.

  1. List VMs:

              vim-cmd vmsvc/getallvms

Note the VMID.

  1. Unregister the VM:

vim-cmd vmsvc/unregister <VMID>

  1. Register:

              vim-cmd solo/register /vmfs/volumes/<datastore>/<vmname>/<vmname>.vmx

              You will need to know the datastore and VM names.

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *