Killing a Hung Virtual Machine on Hyper-V
However, rebooting the host will probably affect other VMs that run on the same host. If you're using a Hyper-V Failover Cluster you may be able to move the other VMs to anther node in the cluster which will leave just the failed VM on the host. But what if you don't have a cluster in place and have just one or two hosts that run several VMs?
If it was a "normal" process, you could probably use Task Manager to find the hung process and terminate it. But how do you find the process of the entire VM?
Killing Hung VMsTask Manager shows a process called VMWP.EXE. This is the virtual machine worker process that runs for every VM that is currently running.
In the above example you only see two instances, but on a production host there may be many instances of the process running. So how can you identify which VMWP.EXE process is the one running for the hung VM?
After finding either the Process ID or the GUID, here is how you can kill a hung VM without affecting the other VMs on the host.
Note: It is always better to properly shut down a VM. If you cannot shut it down, turn it off. Use this tip only if there is no alternative. Remember that killing a VM might corrupt the .VHD file(s) and might cause you to either lose data that was not properly committed to the disk, lose the VM's integrity, or both.
1. Open Task Manager and click on the Processes tab.
2. Locate the VMWP.EXE processes.
3. Click on View, then click Select Columns.
4. In the Select Process Page Columns list, select Command Line and click Ok.
5. Back in the Processes tab, expand the Command Line column to be able to see the entire line(s). Locate the VMWP.EXE processes (you will have one for every VM that is running).
6. Note the GUID for the running VMs. Find the one that matches the VM you wish to kill. Right-click the process and select End Process. Acknowledge the message.
Note: You can also use the Process ID parameter to kill the correct VMWP.EXE process.
Method 2: Using Sysinternals Process Explorer
1. Download Sysinternals Process Explorer from the following link:
2. Extract the files(s) to a folder of your choice, then double-click PROCEXP.EXE. Acknowledge the EULA message. Also acknowledge the security warning, if you get one.
3. In Process Explorer, click File > Show Details got All Processes.
4. Acknowledge the UAC message, if you get one.
5. Locate the VMWP.EXE processes (you will have one for every VM that is running). Hover with your mouse over the process to see the balloon message. It will give you an indication of the VM's GUID.
Note: Again, you can also use the Process ID parameter to kill the correct VMWP.EXE process.