microsoft/openvmm
Publicmirrored fromhttps://github.com/microsoft/openvmmAvailable
Guide/src/reference/dev_feats/kdnet.md
30lines · modecode
| 1 | # Kernel Debugging (KDNET) |
| 2 | |
| 3 | Kernel Debugging is available for Windows guests via KDNET over VMBus. |
| 4 | |
| 5 | ## Enabling and Starting the Debugger |
| 6 | |
| 7 | Set up KDNET on the guest and start the debugger as described on |
| 8 | [Set up KDNET network kernel debugging manually | Microsoft Learn](https://learn.microsoft.com/en-us/windows-hardware/drivers/debugger/setting-up-a-network-debugging-connection). |
| 9 | Setting `busparams` is not necessary. |
| 10 | |
| 11 | ## With OpenVMM and WHP as Host |
| 12 | |
| 13 | Set up the VM for UEFI and VMBus depending on your use case and pass the |
| 14 | additional flag `--net consomme`: |
| 15 | |
| 16 | - **Without OpenHCL:** Pass the `--uefi` flags when starting OpenVMM. |
| 17 | - **With OpenHCL:** Ensure "UEFI Boot" and "VTL2 VMBus Support" are active |
| 18 | |
| 19 | ### Known Issues with KDNET on WHP |
| 20 | - KDNET currently only works with the `consomme` networking option in OpenVMM, |
| 21 | however `consomme` will create a new network adapter in the guest every time |
| 22 | OpenVMM is restarted. This can be safely ignored. |
| 23 | - KDNET will also connect with `--net vmnic:<ethernet switch id>`, but hangs |
| 24 | immediately after due to a yet undiagnosed bug in vmbusproxy. |
| 25 | - Quitting OpenVMM without shutting down the VM first will prevent the same |
| 26 | debugger instance from reconnecting to the guest on next boot. Relauch the |
| 27 | debugger to reconnect. |
| 28 | - When launching an OpenHCL VM with KDNET, `virt_whp::synic` will report a |
| 29 | constant stream of `failed to signal synic` errors for several seconds. These |
| 30 | don't appear to affect the VM's functionality and can be ignored. |
| 31 | |