VMware ESXi 6.5 – How to remove invalid virtual machine in web client

VMware ESXi 6.5 – How to remove invalid virtual machine in web client

i had invalid/orphaned virtual machine, so i decided to remove it from inventory in ESXi web client, but unregister was grayed.

The solution is use cli… so connect to your esxi host and use:

  • vim-cmd /vmsvc/getallvms to list all registered VMs
  • vim-cmd /vmsvc/unregister <id> to unregister that VM.

get the ID of the VM you removed the files for (the first column of output). Mine said invalid vm skipped but showed the ID – in my case 60;61;71;72;80;83;89;97

[root@xxxxxxx2-esx2:~] vim-cmd /vmsvc/getallvms
Skipping invalid VM '60'
Skipping invalid VM '61'
Skipping invalid VM '71'
Skipping invalid VM '72'
Skipping invalid VM '80'
Skipping invalid VM '83'
Skipping invalid VM '89'
Skipping invalid VM '97'
[root@xxxxxxx2:~] vim-cmd /vmsvc/unregister 60
(Visited 2 586 times, 1 visits today)

Napsat komentář

Vaše emailová adresa nebude zveřejněna. Vyžadované informace jsou označeny *