
Then, using the Stop-Process command, we must force-terminate this process: Stop-Process ($VMWMProc.ProcessId) –Force If we do not want to type the full name of the VM, we can list all the VMs registered on this Hyper-V host: Get-VM | Select Name, IdĬopy the VM GUID from the resulting list.įind the vmwp.exe process identifier (PID) for this VMGUID: $VMWMProc = (Get-WmiObject Win32_Process | ? ) We can get the VM GUID by its name.įor example, to get the GUID of the VM with the name SVM-GUARDEDHOST1, run the command: $VMGUID = (Get-VM “SVM-GUARDEDHOST1”).ID We also need to kill the VM process by its GUID. If we try to run the Stop-VM -Force command, it also freezes, awaiting a response from the VM. In this case, the built-in Stop-VM cmdlet will not let us shutdown the VM. We need to run the PowerShell console with the administrator privileges. It is easy to find and kill the process of the hung-up virtual machine using the PowerShell CLI. Killing a Frozen Hyper-VM using PowerShell The virtual machine will be forced to stop. Locate the process vmwp.exe that has the GUID of our VM in the User name column. To determine which process is responsible for our VM, we need the GUID of the hung-up VM obtained earlier. All virtual machines are running in their own instance of vmwp.exe. Run the Task Manager and go to the Details tab. Copy the GUID that is specified in the name of the VM configuration file with the *.vmcx extension.

Open this directory in File Explorer and find the folder with the same name virtual machine has. In the Server section, the location of the VM configuration files is shown. We can get the VM GUID through the Hyper-V Manager console. To search for a process, we need to find out the GUID of the virtual machine. The only way to force a shutdown/restart a stuck VM without rebooting the whole Hyper-V host is to end its running workflow in the guest OS.Īll VMs on the Hyper-V host starts using the vmwp.exe process. How to Kill a Hung VM Process in Task Manager The easiest way to restart the vmms.exe process is through the vmms service using the services.msc console or with the PowerShell service management cmdlets: Get-Service vmms | Restart-Service This is a safe operation and will not interrupt the running VMs. If our Hyper-V does not show virtual machines in the Hyper-V Manager console, and returns the “Connecting to Virtual Machine Management service” error, we need to restart the vmms.exe process.

Hyper-V Manager Stuck on “Connecting to Virtual Machine Management Service” The operation cannot be performed while the object is in its current state.

The application encountered an error while attempting to change the state of VM.
