Skip to content

qemu vm windows kernel debugging

add <vendor_id state="on" value="KVMKVMKVM"/> to hyperv block of virt-manager xml (see link) in target vm (host doesn't need this)

copy kdnet.exe and VerifiedNICList.xml (not 100% sure if needed) from host (C:\Program Files (x86)\Windows Kits\10\Debuggers\x64) to target (c:\KDNET)

make sure host and target can ping each other

open ps as admin and run .\kdnet.exe to make sure your nic is supported.

run .\kdnet.exe <host ip> <port> (recommended port range is 50000-50039). it will print a key

open windbg on host and open kernel debugging. enter the port you selected and the key and connect.

restart target shutdown -r -t 0

enjoy the fact you didn't spend 5+h to troubleshoot the connection. (hopefully)

source debugging

0: kd> .symfix // windows debugging symbols
0: kd> .sympath+ <c:\path\to\project>
0: kd> .reload /f
0: kd> ed nt!Kd_Default_Mask 0xf // get debugging messages

resources

msdn kdnet

windows debugging on qemu

msdn source debugging