Killing a wedged virtual machine

Killing a wedged virtual machine

Rate This
  • Comments 10

While I would like to pretend that nothing ever goes wrong with Hyper-V – the fact of the matter is that sometimes things go wrong with the best systems.

Hyper-V has been designed in a modular fashion so that you can easily address any problems without affecting other virtual machines.  But there can be a problem in figuring out what to do when things go wrong.  Imagine that on my server the “FTP Server” has stopped responding – and I cannot even turn it off:


What I need to do is to kill the vmwp.exe process for the FTP Server.  But how do I know which one to kill?  Thankfully I can figure this out with a single line of PowerShell:

(gwmi -q "SELECT * FROM Msvm_ComputerSystem WHERE ElementName = 'FTP Server'" -n root\virtualization).ProcessID

Which will tell me exactly which one needs to be killed:


Now I can simply kill the vmwp.exe with a process ID of 2932 and restart the FTP Server.


Leave a Comment
  • Please add 8 and 6 and type the answer here:
  • Post
  • I can see it being trivial to get access to the Process ID - any plans to show that Process ID in future versions of the Hyper-V Manager?

  • Oh man, I wish I knew this. I had this happen to me Friday night when doing Windows Update deployment... I agree with goyuix, this would be a nice feature request to have the vmvp.exe tell us what guest OS it is running...

  • I have had VMs go into a Stopping state and have attempted to use this to fix the issue on our 3 node cluster. Unfortunately, everytime I have attempted this the process does not die and the host stops responding forcing a hard shutdown.

  • Could it be easier by looking at the command line of the process since the VM id should be there? I have pressed the power button several times on a member of a fail over Hyper-V cluster due to VM problem. Whenever I cannot shutdown a VM, I can never kill the corresponding process and all VM running on the same host will not be able to live migrate/shutdown; the worst things is even the host cannot be shutdown/restart properly.

  • This problem happened to me tonight.  No way of shutting down the VM. I was going to try the powershell solution, but I couldn't find it on our 2008 server.  I'm sure it was there somewhere, but ultimately the fix wasn't that difficult to figure out.

    Open Task manager and for all of the vmwp.exe tasks, watch the I/O Write bytes field.  The field constantly changes when the VM is running, mine was frozen.  I just killed that vmwp.exe task and the VM rebooted.

    Although this article pushed me in the right direction.  Thanks, Ben

  • What about to use Reset or Turn Off VM command from Action menu in Hyper-V Manager console?

  • Nice post.Much easier than looking up GUIDS manually.  Wht do you do when the VMWP.exe wont terminate though?  I've had it happen a couple of times now and only a hyper-v server restart (reset button) has worked.

  • Tried this, but if a VM is hung shutting down, nothing can kill vmpe.exe process. Also tried using process explorer, no success. Many other posts from others with same frustrations.

    Any ideas?

  • Try changing the memory size on your VM

  • I tried to stop BEN.exe it does not work

Page 1 of 1 (10 items)