.
As mentioned in the Serial Terminal wiki [0], you can configure a VM's serial console to listen on a local TCP port instead of the default socket:
Tested with an AlmaLinux VM:
Check the article Set Up a Serial Terminal and/or Console in Red Hat [2] for more information.
Note:
You need to configure the entire serial section using the argument lines as shown above, which means you don't need to add the socket via the GUI.
Again Note:
Telnet is not secure, it sends data (including your passwords) in plain text over the network. To keep your system safe, always leave the host setting as 127.0.0.1 so it can only be accessed from inside the Proxmox machine itself. Never use this on a public network.
[0] https://pve.proxmox.com/wiki/Serial_Terminal
[1] https://manpages.debian.org/trixie/qemu-system-x86/qemu-system-x86_64.1.en.html
[2] https://access.redhat.com/articles/3166931#config910
.
As mentioned in the Serial Terminal wiki [0], you can configure a VM's serial console to listen on a local TCP port instead of the default socket:
By doing this, the Proxmox VE host exposes the VM's serial console through a raw TCP socket bound to the configured TCP port, which you can connect to using tools like telnet, nc, or socatQemu also supports binding the emulated serial port to a telnet server. Look for the -chardev parameter in the qemu-kvm manual page. (With proxmox you would then use the "args:" parameter in vm.conf to specify extra args.) This would allow you to telnet to your host on a specific port to get a serial console. As with every telnet traffic remember that nothing is encrypted, so I wouldn't do this in a production setup.
Tested with an AlmaLinux VM:
- Manually edit the VM configuration and add the following parameter:
See man qemu [1] for the details about -chardev.Bash:root@pve:~# cat /etc/pve/qemu-server/100.conf args: -chardev socket,id=serial0,host=127.0.0.1,port=5555,server=on,wait=off,telnet=on -serial chardev:serial0 ...
- Test to connect via telnet:
Bash:root@pve ~# telnet 127.0.0.1 5555 Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. AlmaLinux 8.10 (Cerulean Leopard) Kernel 4.18.0-553.76.1.el8_10.x86_64 on an x86_64 Activate the web console with: systemctl enable --now cockpit.socket test1-alma login:
- The full vm config for reference:
Bash:root@pve ~# cat /etc/pve/qemu-server/100.conf args: -chardev socket,id=serial0,host=127.0.0.1,port=5555,server=on,wait=off,telnet=on -serial chardev:serial0 boot: order=scsi0;net0 cores: 2 cpu: x86-64-v2-AES memory: 4096 meta: creation-qemu=10.0.2,ctime=1755527854 name: test1-alma-18-65 net0: virtio=AA:XX:XX:XX:XX:F4,bridge=vmbr0,firewall=1 numa: 0 onboot: 1 ostype: l26 scsi0: local-zfs:vm-100-disk-0,iothread=1,size=12G scsihw: virtio-scsi-single ...
Check the article Set Up a Serial Terminal and/or Console in Red Hat [2] for more information.
Note:
You need to configure the entire serial section using the argument lines as shown above, which means you don't need to add the socket via the GUI.
Again Note:
Telnet is not secure, it sends data (including your passwords) in plain text over the network. To keep your system safe, always leave the host setting as 127.0.0.1 so it can only be accessed from inside the Proxmox machine itself. Never use this on a public network.
[0] https://pve.proxmox.com/wiki/Serial_Terminal
[1] https://manpages.debian.org/trixie/qemu-system-x86/qemu-system-x86_64.1.en.html
[2] https://access.redhat.com/articles/3166931#config910
.
Last edited: