Yesterday's blog prompted some questions about how to set up a debugger for a Windows OS running in a Hyper-V VM. I was surprised that I wasn't able to find good, publicly available, Microsoft issued documentation for this configuration.
The first step is to configure the Windows OS in the VM to enable a kernel debugger on COM1. One would use these same steps if you were preparing the OS to be debugged using a null modem cable. Hyper-V will allow us to redirect the COM port so that we don't need such a cable.
Next, configure Hyper-V to redirect the COM1 port to a named pipe. We will use this pipe in place of a traditional null modem cable.
After the OS and the VM are configured for debugging, we need to connect a debugger.
To test the debugger connection in windbg, from the ‘Debug’ menu choose ‘Break’. This should cause the server to break into the debugger and display a kd> prompt. Please note that breaking into the debugger will cause the OS running in the VM to halt until you tell the debugger to go, the OS will appear to be hung during this time. The command 'g' followed by Enter will tell the debugger to ‘go’ causing the VM to resume operation.
What would be the drop down settings as shown for Hyper-V settings, if I am using the above on VmWare Workstation 8.0.1
[You may want to ask VMWare, they likely have their own set of steps for configuring a kernel debugger. I do not know what the appropriate configuration is for VMWare Workstation.]
host OS win 8.1+ guest host Windows 2012 SRV.
Debugger on host stays in
Waiting to reconnect...
[Is it a gen 2 VM? See http://blogs.msdn.com/b/ntdebugging/archive/2013/10/24/debugging-a-generation-2-virtual-machine.aspx]