Virtual Machine Will Not ‘Power Off’ (Hangs at 95%)


Sometimes it happens that after powering off a virtual machine it does not shutdown completely and hangs at 95% or 98%. After keep waiting in hope that virtual machine will be powered off in sometime it doesn’t happen. Now here is 2 solutions which you can do to avoid such problems:

Solution-1

1. Enable SSH access on the ESX host that is hosting the problem VM.
2. Connect to the ESX host via SSH, and logon as root. Execute the following command to see all the running VMs on this host, and list their world ID numbers.
# esxcli vm process list

3. Once you have the World ID of the problem VM, you can attempt to power it off with the following command;
Syntax
esxcli vm process kill –type {soft,hard,force} –world-id {ID Number}
Example
esxcli vm process kill –type hard –world-id  4290
4. Check now. Your VM should now be powered off.

Solution-2

1. Issue the following command to locate the Process ID’s that are associated with the problem VM.
Syntax
ps | grep “VM Name”
Example
ps | grep “Vcentre-1”
You will get all the processes, and they are preceded by two columns of numbers, the first column contains the individual PID’s. The second column is the PID for the parent process, this is the one you need.


2. Armed with your PID, you need to terminate that parent process with the following command;
Syntax
kill {PID}
Example
kill 4289



 

Comments

Popular posts from this blog

esxi-host-shows-disconnected-vmware

ESXi : Lost uplink redundancy on virtual switch "vSwitch0". Physical NIC vmnic0 is down

Virtual machines appear as invalid or orphaned in vCenter Server