Debugging a live Windows kernel in the cloud, where you normally can't
To test our debugger tooling against a running Windows kernel, we needed a machine to debug. Cloud VMs don't offer that. So we put Windows inside a VM inside a cloud VM, and had the inner one send its debug traffic out as ordinary network packets.
Most of what we look at is a crash dump: a snapshot of memory taken after something went wrong. But some problems only show up on a running system, and the tools that read dumps can also drive a live kernel debugger. We contribute to one of those tools, the open-source mcp-windbg, which lets an AI assistant run Microsoft's debuggers. Its tests for live kernel debugging had never run anywhere but on a developer's desk, because the automated tests have no machine to debug.
Why a cloud VM won't do
Windows kernel debugging over the network (KDNET) works by having the kernel itself talk to a debugger on another machine, through a network card. That needs a network card Windows' debug transport supports, set up from the inside before Windows starts. On a cloud VM, the network card is whatever the provider's hypervisor presents, and we found no supported way to use it for kernel debugging on Google Cloud.
Hyper-V solves this on Microsoft's side with a synthetic debugger: the guest kernel hands its debug packets to the hypervisor, and the hypervisor puts them on the wire. The guest never touches a network card. We don't control Google's hypervisor, but we can run our own.
A hypervisor we do control
Google Cloud allows nested virtualization on its Intel machine types, so a Linux VM there can run QEMU with hardware acceleration. QEMU has emulated Hyper-V's synthetic debugger since 2022, in a device called hv-syndbg. Windows sees what looks like Hyper-V and uses its debug channel, and QEMU forwards each packet as plain UDP from the Linux host to wherever the debugger runs.
The Windows guest's debug traffic never touches a network card. QEMU sends it from the Linux VM, so to the cloud network it is just traffic between two of our own VMs.
The first time the guest booted, the Linux host was sending debug packets within seconds:
14:01:55.063135 ens4 Out IP 10.164.15.235.44724 > 10.164.0.13.50000: UDP, length 374
14:01:58.078603 ens4 Out IP 10.164.15.235.44724 > 10.164.0.13.50000: UDP, length 374
Microsoft's kernel debugger on the second VM picked them up and broke into the running kernel within a few seconds. Both of mcp-windbg's live-kernel test scenarios passed, against Windows Server 2022 and Windows Server 2025.
The licence detail that changed the build
Our first version took a shortcut. It booted Google's own Windows Server image inside QEMU, because that image was already on hand. That image is licensed to run on Google's VMs, and inside our own QEMU it no longer is on one. So we rebuilt the test machines from Microsoft's Windows Server evaluation copies, which run for 180 days and are meant for trying Windows out. The debugger VM still uses Google's image, because it runs where that licence applies. If you build something like this, the same rule holds: a cloud's Windows image belongs on that cloud.
What the AI assistant did with it
With the rig running, we gave Claude Code the debugger through mcp-windbg and asked it to triage a crash dump, then work the live machine. On the dump it found the cause in the code itself: the function zeroes a register and then writes the value 42 through it, a deliberate null-pointer write in a test program. On the live kernel it attached, read the exact Windows build and listed every running process. In a restricted mode we have proposed upstream, it was refused only .shell and .kdfiles, two commands that mode blocks on purpose. The whole session took 19 turns and cost $0.46.
And then it timed out
Listing every process on a live kernel over this link takes about a minute. When the assistant asked for that list over HTTP, it got The operation timed out. The debugger was fine and finished the job. The AI client had simply stopped waiting.
Two limits were behind it. The server sent nothing until a command finished, and the client gives up on a request that stays silent for about 60 seconds. Fixing that exposed a second limit: the client also drops a call that reports no progress for five minutes. So the server now streams its answer and says "still running" every 30 seconds, and a six-minute command comes back. The next call on a session that is still busy also says what it is waiting for, instead of guessing.
| A tool call that runs for | Before | After |
|---|---|---|
| about 1 minute | timed out after about 62 seconds | returns |
| 5 to 12 minutes | timed out | returns |
These fixes and the scripts that build the rig are proposed upstream as #167, #168 and #169. With the scripts, anyone can rerun the live-kernel tests on Google Cloud or on any Linux machine with KVM.
What we took from it
The debugger was never the hard part. The hard part was getting a running Windows kernel to talk to it, somewhere we could rebuild on demand. One layer of virtualization we control solved that, together with the right licence. The surprise was in the AI client: limits that stay invisible on short commands decide whether a real debugging session works at all.
Have a crash dump you can't explain?
We're taking five design partners: three months free, an engineer's review included, and a 20-minute call each month to tell us what the reports got right and wrong.
See the termsOr email us about what you're debugging.