Skip to content

Kernel debugging from Hyper‐V

Fredrik Orderud edited this page Feb 29, 2024 · 4 revisions

Setting Up Kernel-Mode Debugging of a Virtual Machine Manually using a Virtual COM Port

Preparation on host machine

Set-VMComport -VMName <VMName> -Number 1 -Path \\.\pipe\VMKernelDbg
Get-VMComport -VMName <VMName>

Preparation on target machine

bcdedit /debug on
bcdedit /dbgsettings serial debugport:1

Then reboot.

Debugging

Connect with WinDbg using COM named pipe \\.\pipe\VMKernelDbg

SimBatt driver debugging

Break the debugger and type in the following to enable debug messages: ed nt!Kd_IHVDRIVER_Mask 0xff