≡ Menu

How to force reset a guest VM in ESX environment

Often we fall into a situation where resetting VM from Virtual Center console won’t help and server remains hung. In such cases we need to “hard” reset the VM to get it back online. 

To hard reset a VM, there are two options…

Option 1:

  1. SSH to host as root where VM is hosted
  2. Issue “vmware-cmd -l” to list the guests on the current host
  3. In output you will see VMX file location for each guest
  4. Now issue “vmware-cmd <path_of_guest_vm_vmx_file_that_you_want_to_restart> stop hard”
  5. If above command is successful, start the VM either from VC console or with command “vmware-cmd path_of_guest_vm_vmx_file_that_you_want_to_restart> start” 

Option 2:

In most cases, it option#1 should work. If it throws errors for some reason, try below method.

  1. SSH to host as root where VM is hosted
  2. Issue “vm-support -x”
  3. Result will give vmid(s) of guests running on the current host
  4. Now issue “vm-support -X 1234” where 1234 is the vmid of guest which you want to force reset
  5. Answer all the questions — mostly yes for all, but use your won intelligence
  6. This process will generate some debug information, so I prefer to execute this command from /tmp location.
  7. Once execution is completed, either use step#5 in option#1 or Virtual Center to start your guest VM.

Hope this helps…