How to Stop an Unresponsive Hyper-V Virtual Machine

Argomenti vari di carattere sistemistico
Post Reply
daniele
Posts: 327
Joined: 04 Mar 2009, 13:59

How to Stop an Unresponsive Hyper-V Virtual Machine

Post by daniele »

Look at this article for reference: https://petri.com/how-to-stop-an-unresp ... l-machine/

METHOD 1 - Kill just that VM which isn't responding

Using Powershell:

1) Get VM name
Get-VM

2) Find VM GUID
$VmGUID = (Get-VM 'Windows 11').id

3) Find the process ID for the VM
$VMWMProc = (Get-WMIObject Win32_Process | ? {$_.Name -match 'VMWP' -and $_.CommandLine -match $VmGUID})

4) Kill that process
Stop-Process ($VMWMProc.ProcessId) –Force


METHOD 2 - Restart the entire HyperV service (Force all VMs to shut down)

From Powershell:

Get-Service vmms | Restart-Service
Post Reply