VMware Cloud Community
dbzouire
Contributor
Contributor
Jump to solution

Unstoppable VM

In 3.x, how can I shut off a VM that just WON'T shut off?

The thing looks like it's starting as the play button is depressed and has been for weeks. You can't power off or power on. I even tried to do a stop from the command line and no go, it says it's current state doesn't allow that.

I can't shut the system down as it's a major production system with the entire company riding on it. However, this VM is sucking up high priority and is allocated to use a chunk of the system. It's been like this for weeks.

We will wait as long as we have to as this machine will never, ever be rebooted.

0 Kudos
1 Solution

Accepted Solutions
esiebert7625
Immortal
Immortal
Jump to solution

How can I kill a stuck virtual machine?

ESX 3.0 method

o Login to the service console

o You can check the VM state by typing “vmware-cmd /” Note - In rare conditions, doing a kill -9 on a VM can take down the entire host

fyi...if you find this post helpful, please award point by using the Helpful/Correct buttons....thanks

View solution in original post

0 Kudos
6 Replies
esiebert7625
Immortal
Immortal
Jump to solution

How can I kill a stuck virtual machine?

ESX 3.0 method

o Login to the service console

o You can check the VM state by typing “vmware-cmd /” Note - In rare conditions, doing a kill -9 on a VM can take down the entire host

fyi...if you find this post helpful, please award point by using the Helpful/Correct buttons....thanks

0 Kudos
acr
Champion
Champion
Jump to solution

Have at one time or another used all of Erics suggested methods.. All work well for troublesome VM's..

0 Kudos
brownb01
Contributor
Contributor
Jump to solution

I have a very similar issue...however the VM is stuck while powering on.

I cant kill the pid because one is not available, and I can't use any of the vmware-cmd commands. Everyone, including a hard stop comes back that it can't perform the action on the VM while it's in the current state of "powered off". This includes the start command.

Message was edited by:

brownb01

0 Kudos
brownb01
Contributor
Contributor
Jump to solution

well...I was able to reset it through the web interface and connecting directly to the host. However, i still have the task in VC as "in progress". any idea how to get rid of that process?

0 Kudos
sbeaver
Leadership
Leadership
Jump to solution

You can try restarting the VC service

Steve Beaver
VMware Communities User Moderator
VMware vExpert 2009 - 2020
VMware NSX vExpert - 2019 - 2020
====
Co-Author of "VMware ESX Essentials in the Virtual Data Center"
(ISBN:1420070274) from Auerbach
Come check out my blog: [www.virtualizationpractice.com/blog|http://www.virtualizationpractice.com/blog/]
Come follow me on twitter http://www.twitter.com/sbeaver

**The Cloud is a journey, not a project.**
0 Kudos
tasonis
Contributor
Contributor
Jump to solution

First, I had to create a user with shell access to login to the console of my ESX host.

I then ran the following command:

> cat /proc/vmware/vm/*/names

The console will return something like this:

vmid=1128 pid=-1 cfgFile="/vmfs/volumes/472f475a-9602adf8-7f57-00188b495da7/VMname/VMname.vmx" uuid="50 04 c6 00 03 86 a0 ee-a5 d9 66 17 ff c9 61 0f" displayName="VMname"

Take note of the vmid.

Now run:

> less -S /proc/vmware/vm/"PID (in this case 1128)"/cpu/status

I used putty to login in to the console and I also set the width of the window around 250.

Once you see the output of the "less" command, use your right arrow key to scroll over until you see group. It should say something like vm.1127 .

This represents the group of processes running the virtual machine in a questionable state.

Finally, run: ****Please be sure you're coherent when doing this! Make sure your are killing the right process as you may shutoff another production VM! If you can shutdown your other guests or migrate them to another host, that is much safer. At this point you would be able to reboot your ESX host. If this is not an option, proceed carefully...

> /usr/lib/vmware/bin/vmkload_app -k "group id" (in this case 1127)

If your VIC is open, you should see the process disappear or acknowledge failure instantly and you will then be able to power the machine on again.

There are also some commands "stop soft", "stop hard", but this is essentially "Shutdown Guest" and "Power Off".

0 Kudos