[SOLVED] How to configure serial / terminal to connect to a VM guest from the PVE host?

fibo_fr

Member
Apr 21, 2014
40
2
8
Remoulins, France
I still have problem to configure networks for my guests VMs: the console (from web) has lots of limtations.

So I was hoping I could connect from the host to the guest VM by a simple qm terminal xxx, but I all get is the prompt:
starting serial terminal on interface serial0 (press control-O to exit)
but then nothing happens whatever I type... until I type control-O to en the connection

On the guest machine, I have enabled (thru the web admin console) the serial ports 0 and 1 (and rebooted of course)
what else should I do on the guest VM?
 
You must configure operation system in guest VM to use serial console.

P.S. What limitations in web console block you to configure networks in guests VMs?
 
1 - B-) I happen to use frequently the Linux reboot command.

2 - Currently I have a mix of 4.4 and 5.1 hosts. because some prod VMs and CTs are waiting a favorable time. Consequently some hosts have only VNC for shell access with WebUI. VNC without copy paste is a nightmare with my French keyboard.

3 - So usually I work with VMs in ssh only.
BUT that implies that the network is configured... which cannot be done with ssh
So I'm looking for a connection interface other than ssh and WebUI shell

4 - for some reason, I'm currently replicating one existing VM. Duplication is done by qmrestore to a different VMID
After the duplication I have to set up the network.

5 - I was hoping / investigating if QM TERMINAL from the host would give me command-line access.
BUT I am still unsuccessful, hence my question.

NB: the legacy WM I am replicating happens to be Ubuntu desktop. With (grr) network manager. I will change that to Ubuntu server as soon as I can securely have additional machines for test and standby backups.
So for now Ubuntu desktop (14.04) is a given, not a changeable item
 
Hi,
Thx for your answer help, even if you were in a somewhat sarcastic mood...

Not sure I understood the pun about restart / reboot. No problem.

Before even posting the question, I had done my homework and had read the wiki article. however it is in fact useless if the ttyS do not exist yet

I was thinking this was a proxmox problem, so did not explore the ubuntu side.
The Ubuntu link you provide does in fact solve the problem (creating ttyS0.conf, etc): MERCI
 
Last edited:
I updated the Proxmox wiki page with the Ubuntu info, so that all the information is there.
My update might need some changes to be coherent with the grub part of the wiki page
 
I was working on this with an Ubuntu 18.04 guest and found this thread. What I discovered is neither the Proxmox Serial Terminal setup nor the Ubuntu Serial Console instructions were sufficient. It seems that both assume init instead of systemd, the latter of which, I understand, Ubuntu adopted several releases ago. These instructions from a generous poster helped me configure the serial console on Ubuntu 18.04. I hope it helps someone else.
 
  • Like
Reactions: Tmanok
I use this when I need to connect to a VM through the console for whatever reason. What I'd like to know, is possible to use this to install VM's?

Normally when I create a VM, it opens up in VNC, and I can't find any way to get it to open in the serial console - even if I create the serial port upon VM creation. No matter what, it boots in VLC only.
 
I use this when I need to connect to a VM through the console for whatever reason. What I'd like to know, is possible to use this to install VM's?
In theory it should be in some cases. It depends on your OS installer...
Normally when I create a VM, it opens up in VNC, and I can't find any way to get it to open in the serial console - even if I create the serial port upon VM creation. No matter what, it boots in VLC only.
It's not enough to just create a serial port on the VM. That is like installing on a physical PC that just happens to have a serial port - it will not automatically be used instead of the screen and keyboard. You have to find out if your installer supports a serial console and how to activate it.

For Ubuntu, for example, it seems you have to modify your installer image. Try to google <your OS/distro> serial console install.
 
For Debian, I think all you need to do is hit esc, then add ":install console=ttyS0" at the boot prompt. Problem is I don't see the boot prompt in proxmox.
 
Actually the explanation in https://ubuntuforums.org/showthread.php?t=2343595 also works for Debian. Problem is it has a lot of funny characters in it like [ ] which doesn't work with VNC, at least not with a danish keyboard.

Luckily all you need to do is login to VNC and start the process /sbin/getty -L 115200 ttyS0 vt102 - after that you can qm terminal <VMID> to the VM.
 

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!