- The first thing you will need is the process id of the host you want to terminate.
- Host I want to terminate: esx_esx1
- Run this command :: ps | grep vmx
Previously I wrote about powering off vms with vim-cmd vmsvc/power.off VMID
Now suppose even with a hard power off command, the vm wont go down.
You can kill the process associated with the vm.
I had to do this on one of my hosts a while ago when it locked up.
Here you can see : the vmx associated with esx_esx1has a PID of 629720
The left number is the PID of the thread, and the right number is the PID of the parent process.
The line : 3703775 629720 vmx-mks:esx_esx1 /bin/vmx shows the parent is 629720.
Make sure you have the right pid!
Now we are going to terminate the vmx process
Before that we check to see what the power state of the vm is. See this if you want to know more about the VMID
Now enter : kill PID which in this case is kill 629720
The vm is powered off now after terminating the parent vmx
0 comments:
Post a Comment