Physical serial port to VM

hekkevk

New Member
Dec 7, 2022
3
0
1
Hello,
I am trying to pass through a serial port to a VM with Ubuntu installed.
If I do
dmesg | grep tty
on the proxmox server I get this output:
1670431551047.png
So, correct me if I'm wrong, ttyS0 is my physical serial port.
If I try to pass it through to my VM with:
qm set 102 -serial0 /dev/ttyS1
the console to the VM gives me this and gets stuck on it:
1670431730822.png
What am I doing wrong? Does anyone have experience with this?

Thanks,

Hendrik
 
Last edited:
I added the serial port when it was stopped. When I boot it and press the "console" button of that VM, it hangs on "starting serial terminal on interface serial 1" where normally I should see the bios and the machine booting.
 
When I boot it and press the "console" button of that VM, it hangs on "starting serial terminal on interface serial 1" where normally I should see the bios and the machine booting.
So that is the problem. This would not work if you passthrough a physical serial port. You need to attach to the serial port from the outside in order to get the output of the VM. If you only want to have a virtual serial console that you can handle in side the PVE gui, just create a virtual serial port and then you can attach to it.
 
  • Like
Reactions: Stoiko Ivanov
So that is the problem. This would not work if you passthrough a physical serial port. You need to attach to the serial port from the outside in order to get the output of the VM. If you only want to have a virtual serial console that you can handle in side the PVE gui, just create a virtual serial port and then you can attach to it.
This does not really address the problem. We would like the VM to always have this serial port available at boot time.
My VM is Windows7_32bit and it seems, Windows is being assigned the serial port as console and does nothing.
Being Windows, one needs the console screen to do anything. And, for the software I intend to run, it's libraries
will fiddle with the 16550 USART registers (yes and set 5bit mode!!) so, a complete emulation of the 16450 or 16550
USART is required so the app "sees" a real 16450 USART on COM1 or COM2. (As done in "dosbox")
 
Upgraded to 8.0.3:
pve-manager/8.0.3/bbf3993334bfa916 (running kernel: 6.2.16-3-pve)

My Windows 7 32bit config has:
# Prolific USB to Serial
usb0: host=067b:2303,usb3=0
serial3: /dev/ttyS0
and Device Manager on my VM "sees" COM1: and COM2:

Now to test it with old Simoco radio config software.
 

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!