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:
- SSH to host as root where VM is hosted
- Issue “vmware-cmd -l” to list the guests on the current host
- In output you will see VMX file location for each guest
- Now issue “vmware-cmd <path_of_guest_vm_vmx_file_that_you_want_to_restart> stop hard”
- 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.
- SSH to host as root where VM is hosted
- Issue “vm-support -x”
- Result will give vmid(s) of guests running on the current host
- Now issue “vm-support -X 1234” where 1234 is the vmid of guest which you want to force reset
- Answer all the questions — mostly yes for all, but use your won intelligence
- This process will generate some debug information, so I prefer to execute this command from /tmp location.
- Once execution is completed, either use step#5 in option#1 or Virtual Center to start your guest VM.
Hope this helps…