VMware Cloud Community
terrible_towel
Contributor
Contributor

Unregister a VM from an unresponsive ESX host?

I have an ESX 4.1U1 host that is disconnected from my vCenter.  Attempts to reconnect fail with timeout errors.  The ESX host is up.  I can ssh onto the service console.  The uptime command returns a load of around 30.  Commands such as esxtop, vmware-cmd, etc. hang and do not return.  I've worked with support for over 2 hours.  They ended up saying I have to reboot the ESX host.  The ESX currently has a lot of VMs running fine.
If I can shut down the guests, is there any way to unregister a VM from somewhere other than the unresponsive ESX host?  A rolling outage of all the VMs that are currently running on the bad ESX would be much better for us -- instead of one big outage of all the VMs as I reboot the bad esx host.
Any way to change which esx host has a VM registered via the shared file system?
Thanks.
Paul
0 Kudos
1 Reply
MKguy
Virtuoso
Virtuoso

I think if you shutdown a VM and the host is still able to end the vmx-process of that running VM properly, this would be enough to release the VMFS lock and you don't need to unregister the VM manually first in order to register it on another host.

Commands such as esxtop, vmware-cmd, etc. hang and do not return

I suppose you went through restarting the management agents and using vim-cmd/vimsh (http://www.virtuallyghetto.com/p/vmware-vimsh_9940.html) won't work either? If that still works you could try to unregister VMs with it:

/usr/bin/vmware-vim-cmd vmsvc/getallvms

/usr/bin/vmware-vim-cmd vmsvc/unregister [VM ID]

If that fails too, you can manually edit the vmlist file (apparantly /etc/vmware/hostd/vmInventory.xml now) on the host as mentioned here:

http://communities.vmware.com/thread/426301

http://communities.vmware.com/thread/50143

-- http://alpacapowered.wordpress.com
0 Kudos