How to Stop/Kill a Stuck Virtual Machine on Hyper-V?

If your digital machine working on Hyper-V is caught for some causes, stopped to reply and doesn’t begin/cease/reset after clicking the corresponding buttons within the Hyper-V console, the one approach out is to forcibly kill the method liable for this VM on the host OS. We’ll present you ways to drive restart caught Hyper-V VMs working on Windows Server 2016/2019 with out rebooting all the host and all working VMs (in the event you do not need an Hyper-V HA cluster and ).

Hyper-V VM Stuck within the “Stopping/Starting” State

Suppose, that one in all your Hyper-V VMs is caught within the Stopping (Stopping-Critical) or Starting (Starting x%) state.

The visitor OS doesn’t reply and “Turn Off”, “Shut Down” and “Reset” buttons within the Hyper-V Manager both are unavailable, or return the next error when pressed:

The utility encountered an error whereas making an attempt to change the state of VM.
Failed to change state.
The operation can’t be carried out whereas the article is in its present state.

Hyper-V Manager Stuck on “Connecting to Virtual Machine Management Service”

If your Hyper-V doesn’t present digital machines within the Hyper-V Manager console, and returned the “Connecting to Virtual Machine Management service” error, you want to restart the vmms.exe (Hyper-V Virtual Machine Management service) course of. This is a protected operation and won’t interrupt the working VMs. The simplest way to restart the vmms.exe course of is thru the vmms service utilizing the providers.msc console or with the command:

Get-Service vmms | Restart-Service

How to Kill a Hung VM Process in Task Manager?

The solely approach to drive shutdown restart such a caught VM with out rebooting the entire Hyper-V host is to finish its working workflow within the visitor OS. All VMs on the Hyper-V host are began utilizing the vmwp.exe course of (Virtual Machine Worker Process). To seek for a course of, you want to discover out the GUID of the digital machine.

You can get the VM GUID by the Hyper-V Manager console. Open the Hyper-V server settings. In the Server part, the placement of the VM configuration information is proven (in our case it’s D:VMStore).

Open this listing in File Explorer and discover the folder with the identical identify as your digital machine has. Copy the GUID that’s specified within the identify of the VM configuration file with the *.vmcx extension.

Run the Task Manager and go to the Details tab. All digital machines are working in their very own occasion of vmwp.exe. To decide which course of is liable for your VM, you want the GUID of the hung-up VM you obtained earlier. Locate the method vmwp.exe that has the GUID of your VM within the User identify column. Kill this course of (End Task).

The digital machine will probably be pressured to cease. Now you are able to do something with it.

It is far simpler to discover and kill the method of the hung-up digital machine utilizing the PowerShell CLI. Run the PowerShell console with the administrator privileges (your account should be added to the native “Hyper-V directors” group).

In this case, the built-in Stop-VM cmdlet won’t allow you to shutdown the VM. If you strive to run the Stop-VM -Force command, it additionally freezes. Obviously awaiting a response from the VM.

You additionally want to kill the VM course of by its GUID. You can get the VM GUID by its identify. For instance, to get the GUID of the VM with the identify SVM-GUARDEDHOST1, run the command:


If you don’t need to sort the complete identify of the VM, you possibly can listing all of the VMs registered on this Hyper-V host:

Get-VM | Select Name, Id

Copy your VM GUID from the ensuing listing.

Find the vmwp.exe course of identifier (PID) for this VMGUID:

$VMWMProc = (Get-WmiObject Win32_Process | ? )

Then, utilizing the Stop-Process command, you will need to force-terminate this course of:

Stop-Process ($VMWMProc.ProcessId) –Force

This is the way in which to simply forcefully terminate the working technique of a hung-up Hyper-V digital machine.

Hyper-V: Failed to Change VM State

Sometimes it occurs that even after killing a hung-up VM course of, you can’t flip on the VM. Moreover, it freezes within the Starting state with an error:

Virtual Machine Connection
Failed to Change State.

In this case, examine the next choices:

  • Check that there’s enough free house on the disk on which the Hyper-V VM information are saved;
  • If an ISO picture is linked within the VM settings, examine its availability;
  • Check the community adapter settings of the VM. Virtual community adapters should be linked to an present Hyper-V digital swap (there should be no standing Network Adapter – Configuration Error for any NIC);
  • Check that the Hyper-V Virtual Management Service (VMMS) is working and isn’t
  • Make certain that your antivirus software program doesn’t block entry to VM information. Add paths to the VM listing to the antivirus exclusions (please, examine how to add exclusions to );
  • Check for Hyper-V associated errors within the Event Viewer -> Applications and Services Logs -> Microsoft -> Windows -> Hyper-V-Worker.

Check Also

Configuring L2TP/IPSec VPN Connection Behind a NAT, VPN Error Code 809

Due to disabling PPTP VPN help in iOS, one in all my shoppers determined to …

Leave a Reply

Your email address will not be published. Required fields are marked *