Setting a serial device in VM's hardware forces xtermjs console instead of novnc console

JJi

New Member
Sep 11, 2020
3
0
1
47
Helsinki, Finland
Hello everybody.
Apologies if this question has been brought up before. I did a search but couldn't find any answer to this particular problem I'm facing.

So, I have a Proxmox 6.2 up and running, and a VM running Windows.
I have manually setup a serial device (serial0) /dev/ttyS0 to give the VM straight access to my server's physical serial port.

If I try opening up the server's console using the right-click menu, it opens up console window, but not the one expected. It's attempting to access a serial connection of some sort, causing it to fail with "Connection failed (code: 1006)" and a single line of text that reads: "unable to find a serial interface"

The URL that's being opened in the console window is:
https://<server name>:8006/?console=kvm&xtermjs=1&vmid=<ID number>&vmname=<VM name>&node=<Proxmox server name>&cmd=

Other VM's that don't have a serial port set up at all, the console opens up as expected and its URL looks like this:
https://<server name>:8006/?console=kvm&novnc=1&vmid=<ID number>&vmname=<VM name>&node=<Proxmox server name>&resize=off&cmd=

Note the bold+italic text that shows the difference.
I can access the correct console by modifying the URL with &novnc=1 in the address bar to point to the VM that has serial device set, but that's a kind of a dirty "hack".

Steps to reproduce this behavior is as follows:
1. Power off the VM.
2. Modify VM's config file, manually adding a serial device (serial0) that points to /dev/ttySx
3. Power on the VM.
4. Attempt to access the VM console from the right-click menu. It should fail.

Removing the serial device will give you a novnc console.
Does this count as expected behavior or a bug of some sort? This behavior didn't occur in Proxmox VE 5.x.
 
what is your 'default' console set in the datacenter options? and what is your pveversion -v ?
 
In the datacenter options, Console Viewer is "Default (xterm.js)". This was left untouched when I upgraded from PVE 5 to 6.

pveversion -v gives the following information:
Code:
proxmox-ve: 6.2-1 (running kernel: 5.4.41-1-pve)
pve-manager: 6.2-11 (running version: 6.2-11/22fb4983)
pve-kernel-5.4: 6.2-6
pve-kernel-helper: 6.2-6
pve-kernel-5.3: 6.1-6
pve-kernel-5.4.60-1-pve: 5.4.60-2
pve-kernel-5.4.55-1-pve: 5.4.55-1
pve-kernel-5.4.44-2-pve: 5.4.44-2
pve-kernel-5.4.44-1-pve: 5.4.44-1
pve-kernel-5.4.41-1-pve: 5.4.41-1
pve-kernel-5.4.34-1-pve: 5.4.34-2
pve-kernel-4.15: 5.4-12
pve-kernel-5.3.18-3-pve: 5.3.18-3
pve-kernel-5.3.18-2-pve: 5.3.18-2
pve-kernel-4.15.18-24-pve: 4.15.18-52
pve-kernel-4.15.18-12-pve: 4.15.18-36
ceph-fuse: 14.2.11-pve1
corosync: 3.0.4-pve1
criu: 3.11-3
glusterfs-client: 5.5-3
ifupdown: 0.8.35+pve1
ksm-control-daemon: 1.3-1
libjs-extjs: 6.0.1-10
libknet1: 1.16-pve1
libproxmox-acme-perl: 1.0.5
libpve-access-control: 6.1-2
libpve-apiclient-perl: 3.0-3
libpve-common-perl: 6.2-2
libpve-guest-common-perl: 3.1-3
libpve-http-server-perl: 3.0-6
libpve-storage-perl: 6.2-6
libqb0: 1.0.5-1
libspice-server1: 0.14.2-4~pve6+1
lvm2: 2.03.02-pve4
lxc-pve: 4.0.3-1
lxcfs: 4.0.3-pve3
novnc-pve: 1.1.0-1
proxmox-mini-journalreader: 1.1-1
proxmox-widget-toolkit: 2.2-12
pve-cluster: 6.1-8
pve-container: 3.2-1
pve-docs: 6.2-5
pve-edk2-firmware: 2.20200531-1
pve-firewall: 4.1-2
pve-firmware: 3.1-3
pve-ha-manager: 3.1-1
pve-i18n: 2.2-1
pve-qemu-kvm: 5.1.0-1
pve-xtermjs: 4.7.0-2
qemu-server: 6.2-14
smartmontools: 7.1-pve2
spiceterm: 3.1-1
vncterm: 1.6-2
zfsutils-linux: 0.8.4-pve1
 
oh sorry, can you also post the vm config? (qm config ID)
 
Dominik, i have the same:

Code:
# qm config 101
agent: 1
bootdisk: scsi0
cores: 8
cpu: Skylake-Client
ide2: none,media=cdrom
memory: 30720
name: rk3s01
net0: virtio=<mac>,bridge=vmbr0,firewall=1
numa: 0
ostype: l26
scsi0: local-zfs:vm-101-disk-0,discard=on,size=32G,ssd=1
scsi1: local-zfs:vm-101-disk-1,discard=on,size=600G,ssd=1
scsihw: virtio-scsi-pci
serial0: socket
smbios1: uuid=<some-uuid>
sockets: 1
startup: order=2,up=60
vga: qxl
vmgenid: <some-id>

EDIT: Manualy selecting NoVNC/Spice works for me
 
oh sorry, can you also post the vm config? (qm config ID)

No problem, Here's the output:
Code:
balloon: 2048
boot: cd
bootdisk: scsi0
cores: 2
description: Wx Data Acquisition Server
hotplug: usb
keyboard: fi
localtime: 1
memory: 4096
name: <Redacted>
net0: virtio=<Redacted>,bridge=vmbr0
numa: 1
ostype: win10
sata0: none,media=cdrom
scsi0: datastore-xigmanas-zraid10-nfs:104/vm-104-disk-0.qcow2,cache=writethrough,discard=on,size=80G
scsihw: virtio-scsi-pci
serial0: /dev/ttyS0
smbios1: uuid=<Redacted>
sockets: 1
vga: std
 
yeah i can see why .. we detect a serial console and use xtermjs by default, maybe we should only do that if the display is also selected as the serial terminal?
a setting per vm? i am not sure.. could you open a bug report here: https://bugzilla.proxmox.com
it's better to discuss this issue there
 

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!