Friday, October 3, 2008

Stopping a Hyper-V VM that refuses to stop

I posted this question on the Microsoft Tech Forums: I have a Vista (x64 Ultimate) VM that refuses to stop. (Host is Server 2008 x64.)  I've tried using the hard stop but it remains in the state of Stopping. How do I stop it from here?

And received this (great) answer from Stephen Edgar:

If you grab Sysinternals Process Monitor you can check each VMWP.EXE Process (Virtual Machine Worker Process) and Select 'Properties' and each process will have a reference in the 'Command Line' section of the properties dialogue which refers to the VM's GUID which can be found for each VM by examining the configuration files contained in C:\ProgramData\Microsoft\Windows\Hyper-V\Virtual Machines and then just kill the approriate VMWP.EXE Instance and that should kill that VM without affecting any of your other currently running VM's.

This is the second time that I've had this problem with Hyper-V and I have no doubt that it won't be the last. Thanks Stephen!

11 comments:

  1. I have had the same issue. This additionally causes the server to hang on shut down.

    ReplyDelete
  2. Thanks a million! I knew it had to be one of those vmwp.exe files in there, but I couldn't figure out how to match them up...matching the guid worked great!

    ReplyDelete
  3. Thank you so much for this tip. It helped me get a machine that was stuck on 'Pausing...' rebooted.

    ReplyDelete
  4. btw you don't need sysinternals process monitor. in the task manager you can add the 'command line' column to the process list. also here you can find the VMs guid
    tnx for the tip though, it helped me kill hanging VMs!
    filip

    ReplyDelete
  5. I have the same problem but this solution doesn't work for me. The process doesn't want to be killed. I event tried prockill /PID xxxx /F from the admin command prompt. The prockill action terminates with success but the process are still running.
    The only "solution" is to stop the vmms.exe and to restart the host server.

    ReplyDelete
  6. Thank you. This was a lifesaver!!

    ReplyDelete
  7. Excellent solution.
    It helps me to resolve a freezing problem when taking a snapshot of a VM.

    ReplyDelete
  8. I have a similar problem, but I can't solve whit this: the WM states is "executing" but I can't connect/shutdown or anything else, hw properties are not loaded and anything seems to work. I'll try to restart the host, but I don't like this solution.

    ReplyDelete
  9. Hi, it's so strange that these VM do not show up in memory consumption. My 8GB was shown as 94% consumed and I noticed these 4 vmwp.exe's running. I moved the xml's (did not need them running any way) and killed them up, matching the GUID's. (They used to start up even if I killed them, so the xml path was really the pointer!)
    Thanks for the tip!!

    ReplyDelete
  10. Hi .can somebody help me why this is happeing ..What is the cause of the issue..

    ReplyDelete
  11. Cause would be interessting. HyperV 2008 R2 Cluster (2 node) with all updates, had this today the first time. I could not kill the VMWP.EXE Instance, even with taskkill /f. The I tried to do a live migration of all other VMS to the other cluster node and got error 21502. Found that might be the AV, dearivetd, tried again and all VMs got the state "Online (Migration attempt failed due to existing migration). All VMs were reachable at this point. Exact 30 minutes all failed, no failover. Tried to shutdown the failed node, but it hung on the VMPW Process -> soft reboot

    Problem is, that there is no error log of the failed stopping process and I have no idea why it happened :( This system runs now for three years (with reboots) without any major problems.

    ReplyDelete