Quantcast
Channel: TechNet Blogs
Viewing all articles
Browse latest Browse all 34890

Enable Remote Kernel Mode Debugging on Hyper-V Virtual Machine

$
0
0
1) start an elevated command prompt and turn on debugging
bcdedit /debug on
2) configure debugger to use COM1
bcdedit /dbgsettings SERIAL DEBUGPORT:1 BAUDRATE:115200

3) reboot so boot loader can read new bcdstore settings

Now, we need to configure Hyper-V to redirect COM1 to TCP named pipe
1) Hyper-V -> VM settings -> COM1
change from "none" to "pipe name" and provide a descriptive name which we will use later in winbdg
Note: Please take a note of the named pipe path as we will use this later in windbg
  • Download and install the Debugging Tools for Windows from http://msdn.microsoft.com/en-us/windows/hardware/gg463009
  • Start 'WinDbg' and choose 'Run as administrator' (Windbg needs administrative rights to connect to the pipe)
    • In windbg open the File menu and choose 'Remote Stub'
    • Here we need 'Remote Stub' path (replace server=HYPERV1 by your Hyper-V hostname)
      • tcp:server=HYPERV1,port=10240
    • then go to 'Kernel Debug'-> COM
      • Enter a Baud Rate of 115200, to match the settings made in the VM and replace HYPERV1 by your Hyper-V hostname a.e.
        • \HYPERV1piperamaca160902-125416-VM693
Voila - To verify your debugger connection you can break in which should give you a kd> prompt. From here it's all yours 😊

Viewing all articles
Browse latest Browse all 34890

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>