Hyper-V, Virtual PC, Virtual Server, Virtualization, Windows
comments 4

Kernel debug of a Guest from host using WinDBG – Hyper V

It is like the same old method used in Virtual Server or Virtual PC. This post will use some screenshots to explain the same thing for Hyper-V. In genera, for debugging guest OS, we use named pipes. You can read more about named pipes here.

To configure the VM for kernel debugging
VM Settings

  1. Turn-off the guest
  2. Open Hyper-V manager
  3. Right Click on Virtual Machine and select “Settings”
  4. In the Settings window, select COM1 on the left side of the window
  5. On the right side, Select Named Pipe and type “VirtualCom1” as the name or anything you like as the pipe name
  6. Click OK to exit the VM settings window

Now, on the Host system, install Windows Debugging Tools. You can download the tools from here.

WinDBG configuration

After the install is complete,

  1. Open WinDBG window and connect to the named pipe by clicking on File -> Kernel Debug option
  2. Select Pipe and Reconnect check boxes
  3. Type in the named pipe name in the Port text box. For example, if the pipe name is VirtualCom1 as shown in the above image, you need to type in, \\.\pipe\VirtualCom1
  4. click OK to get connected to the debuggee

That is it. You are all set to debug the guest now.

  • Salman_ah

    when and where we used kernel debugging tools

  • This post is only about how to enable guest OS for kernel debugging from the host. I have not included how to use kernel debugger itself in the content here.

  • Ntdeveloper31


  • Brian

    For Server 2012 this does not appear to be working. It never moves past “debuggee not connected”
    Is there an additional setting? runas? firewall?