Howto connect to VM serial console from CLI of PVE host

stefws

Renowned Member
Jan 29, 2015
302
4
83
Denmark
siimnet.dk
Wondering if it is somehow possible from a CLI of a PVE node to connect to a running VM's serial console like with libvirt and virsh console?
 
Okay found this archived link that help me to connect to a migrate VM with a serial console by adding args to the vm.conf before starting the VM:

Here is the line we added to the VM's .conf file:
args: -serial tcp:0.0.0.0:1000+VMID,server,nowait

eg. for VM ID = 100:
args: -serial tcp:0.0.0.0:1100,server,nowait

then telnet to your node's IP port 1100 will give you the console.

Only issue is telnet won't allow me to parse INTR etc. to remote side ie. the serial console, thus hard to interrupt CLIs do vim/nano edit etc.
if only ... telnet line mode would work...
 
Found this better for local CLI access using minicom:

in vm.conf:

args: chardev socket,id=serial0,path=/var/run/qemu-server/106.console,server,nowait -serial chardev:serial0

then restart your VM and use minimum to connect to the console socket:

minicom -D unix\#/var/run/qemu-server/106.console

bingo so much better than telnet :)
 

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!