Two windows guests communicating via serial console (COMn)

serialuser

Member
Mar 25, 2020
2
0
6
44
Hi,

My objective is to use one windows guest as a windows 10 kernel debugger (windbg is what i am using), and another one as debuggee (also Windows 10), I can't manage to make this work under (latest, just installed) proxmox.

The standard setup is to have COM port of debugger redirected to a pipe/file/socket, and connect to it with debuggee. I tried to setup a "network debug" but it has failed (network is OK, but maybe this is too "hardware" for it to work in a virtualized network.

I could create serial port / serial0 hardware for both VMs, but then I can't "bind" them together to access one guest from the other guest. I'd like to bind them with socket for exemple, or a file, whatever works.

I found many articles about connecting to ONE linux guest with console/terminal, but no success with this whatsoever.

Can anyone help ?

Thank you
 
You can use socat on the host to connect the two serial ports for your VM. See the answer I gave in this thread.
 
Download MSEdge on Win10 1809 VM from Microsoft.

Convert VMWare VM to ProxMox

On ProxMox;

I created one VM, then cloned it after installing the following:

Before being able to write a driver, head to the Windows Driver Kit (WDK) page and follow the steps outlined on your host/dev machine:

  • Install Visual Studio 2022 and select the Desktop development with C++ workload.
  • Install the Windows 11 SDK.
  • Install the Windows 11 WDK.
  • WinDBG Preview (From the Microsoft Store)
Disk space is going to be a bit tight, so if you are so inclined, do some research on expanding the drive size from 40 GB to 80 GB or so.

SSH to ProxMox and do the following:

Code:
Code: Provided by Stefan_R

# 101 ID of first VM
# 102 ID of second VM

# add the serial ports
qm set 101 -serial0 socket
qm set 102 -serial0 socket

# start both VMs
qm start 101
qm start 102

# connect the two serial ports on the host
# install and run "byobu" first to leave this running in a session
# even if your SSH session to your ProxMox server closes...
apt install byobu
byobu
socat UNIX-CLIENT:/var/run/qemu-server/101.serial0 UNIX-CLIENT:/var/run/qemu-server/102.serial0

On Debuggee:

Code:
C:\>bcdedit /debug on
The operation completed successfully.

C:\>bcdedit /dbgsettings serial debugport:1 baudrate:115200
The operation completed successfully.

C:\>bcdedit /set testsigning on
The operation completed successfully.

Run regedit as Administrator and go to HKLM\SYSTEM\CurrentControlSet\Control\Session Manager. Create a new Key called Debug Print Filter and within that, a new DWORD Value. Give it the name DEFAULT and a value of 8. This will allow Windows to generate kernel debug messages, which are disabled by default.

On Debugger (with WinDbg Preview):

Select File | Attach to Kernel, select the COM tab, then uncheck Pipe, check Reconnect, Resets = 0 (or desired), Baud Rate = 115200, Port = COM1, check or uncheck Break on Connection as desired. Click OK.

windbg-setup-for-proxmox.png

On Debuggee:
Reboot. It will hang at the Window icon for a few seconds, but you should start to see messages appearing in the Command tab of WinDBG.

Credit: Stefan_R, xalicex, Rasta Mouse / ZeroPoint Security
 
Last edited:
  • Like
Reactions: UdoB

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!