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

Image

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.

Image

 
2. Armed with your PID, you need to terminate that parent process with the following command;

Syntax

kill {PID}

Example

kill 4289

About Alex Hunt

Hi All I am Manish Kumar Jha aka Alex Hunt. I am currently working in VMware Software India Pvt Ltd as Operations System Engineer (vCloud Air Operations). I have around 5 Years of IT experience and have exposure on VMware vSphere, vCloud Director, RHEL and modern data center technologies like Cisco UCS and Cisco Nexus 1000v and NSX. If you find any post informational to you please press like and share it across social media and leave your comments if you want to discuss further on any post. Disclaimer: All the information on this website is published in good faith and for general information purpose only. I don’t make any warranties about the completeness, reliability and accuracy of this information. Any action you take upon the information you find on this blog is strictly at your own risk. The Views and opinions published on this blog are my own and not the opinions of my employer or any of the vendors of the product discussed.
This entry was posted in Vmware. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s