Cannot connect to serial0 / xterm.js

Razva

Renowned Member
Dec 3, 2013
250
10
83
Romania
cncted.com
Hey,

I can't connect to serial0 via xterm.js and I have no idea what I'm doing wrong. Yes, serial0 is already added and video output is set. Can you please give me a hint?

Here's /etc/pve/qemu-server/100.conf contents:

Code:
agent: enabled=1,fstrim_cloned_disks=1
boot: c
bootdisk: scsi0
cipassword: some_password
ciuser: root
ide2: local-lvm:vm-100-cloudinit,media=cdrom,size=4M
ipconfig0: ip=192.168.1.141/24,gw=192.168.1.1
memory: 1024
name: Copy-of-VM-debian11-ci
net0: virtio=8A:99:47:7F:DC:43,bridge=vmbr0,firewall=1,mtu=1500
numa: 1
onboot: 1
ostype: l26
scsi0: local-lvm:vm-100-disk-0,backup=1,discard=on,size=2G,ssd=1
scsihw: virtio-scsi-pci
smbios1: uuid=25528ca1-b106-4b0d-9c09-c2bd5b6217e6
vmgenid: 8267fe62-a734-4eb2-ac4d-ba2987b0784f
serial0: socket
vga: serial0

Here's the guest's /etc/default/grub contents:

Code:
GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT=""
GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,115200 earlyprintk=ttyS0,115200 consoleblank=0"
GRUB_TERMINAL="console serial"
GRUB_SERIAL_COMMAND="serial --speed=115200"

Unfortunately I'm getting this:

Code:
TASK ERROR: command '/usr/bin/termproxy 5901 --path /vms/100 --perm VM.Console -- /usr/sbin/qm terminal 100 -escape 0 -iface serial0' failed: exit code 1

And in the browser:

Code:
Connection failed (Error 500: Timeout while waiting for port '5901' to get ready!)

Any hints are highly appreciated! Thank you
 
Inside my Debian VM, I use:
GRUB_CMDLINE_LINUX_DEFAULT="console=tty0 console=ttyS0 consoleblank=0" GRUB_TERMINAL=serial and ran update-grub.
And the VM configuration uses (same as yours):
serial0: socket vga: serial0
And the xterm.js console viewer (PVE 7.0-11) works fine: it displays boot messages and console login works.
Maybe remove the 115200 bitrate settings? Maybe its a network issue; have you tried other viewers? Anything in the Proxmox Syslog?
 

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!