From b0a094e6fa95d0e141d3e5ec0534c6d0cc509af8 Mon Sep 17 00:00:00 2001 From: Nicole Rappe Date: Thu, 19 Feb 2026 15:31:10 -0700 Subject: [PATCH] Add platforms/virtualization/hyper-v/forcefully-stop-guestvm.md --- .../hyper-v/forcefully-stop-guestvm.md | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 platforms/virtualization/hyper-v/forcefully-stop-guestvm.md diff --git a/platforms/virtualization/hyper-v/forcefully-stop-guestvm.md b/platforms/virtualization/hyper-v/forcefully-stop-guestvm.md new file mode 100644 index 0000000..98b5ba2 --- /dev/null +++ b/platforms/virtualization/hyper-v/forcefully-stop-guestvm.md @@ -0,0 +1,34 @@ +## Purpose +If you have a GuestVM that will not stop gracefully either because the Hyper-V host is goofed-up or the VMMS service won't allow you to restart it. You can perform a hail-mary to forcefully stop the GuestVM's Hyper-V process. + +!!! warning "May Cause GuestVM to be Inconsistent" + This is meant as a last-resort when there are no other options on-the-table. You may end up corrupting the GuestVM by doing this. + +### Get the VMID of the GuestVM +```powershell +Get-VM SERVER-01 | Select VMName, VMId + +# Example Output +# VMName VMId +# ------ ------------------------------------ +# DC3 3e4b6f91-6c6c-4075-9b7e-389d46315074 +``` + +### Extrapolate Process ID +Now you need to hunt-down the process ID associated with the GuestVM. +```powershell +Get-CimInstance Win32_Process -Filter "Name='vmwp.exe'" | +Where-Object { $_.CommandLine -match "3e4b6f91-6c6c-4075-9b7e-389d46315074" } | +Select-Object ProcessId, CommandLine + +# Example Output +# ProcessId CommandLine +# --------- --------------------------------------------------------- +# 12488 "C:\Windows\System32\vmwp.exe" -vmid 3e4b6f91-6c6c-4075-9b7e-389d46315074 +``` + +### Terminate Process +Lastly, you terminate the process by its ID. +```powershell +Stop-Process -Id 12488 -Force +``` \ No newline at end of file