Setup KDCOM for 2 Hyper-V VMs

How to use Hyper-V to debug using KdCOM from 2 VMs, one debugging the other.

Debuggee

Follow the setup here to setup a BCD profile for KdCom in the VM. Shutdown the VM and in a privileged prompt on the host (here assigned to COM1):

Set-VMComPort MyDebuggedVM  1 \\.\pipe\win7x64-kdcom

Debugger

Still on a privileged prompt on the host, choose a COM port number and connect it to the same pipe:

Set-VMComPort MyDebuggerVM 1 \\.\pipe\win7x64-kdcom

Boot the debugger and make WinDbgX listen to that port

windbgx -k com:pipe,port=\\.\com1,resets=0,reconnect

Enjoy

image