serial console to VM hangs after extended time away and is unrevocerable except on reboot

dtreth

New Member
Apr 19, 2026
3
0
1
So I followed this guide: https://pve.proxmox.com/wiki/Serial_Terminal for setting up a terminal system on my VM because I like the xterm.js for the containers a lot, and I even installed the xterm tools to make it resize and whatnot. It works pretty well, except for needing to login separately,but I accept that as a limitation of being a VM rather than a container.
However, If I use the terminal for a while, then I leave and, say, get some food, most of the time when I come back the terminal is hung and unrecoverable. I have tried a LOT of tinkering and log chasing to figure it out but I have no idea why it just "dies". Rebooting the VM always brings it back. However, this is a Samba AD DC and rebooting constantly is really bad.

Anyone with some expertise on this? I would be extremely appreciative.
 
Welcome, @dtreth
I don't know why it hangs. I'm just thinking out loudly how to bypass the issue...
I would log in to the VM by other means (e.g., ssh) and inspect the situation when the console is hung.
Then maybe restart getty (or whatever is servicing the console).

I know that it isn't the substantial solution (if it works at all), but at least it would let avoid rebooting the Samba DC.
 
Last edited:
I can tell you that I used the noVNC to inspect and restart the getty. I tried to ask Claude (I know...) for some advice and using systemd overrides to tell the service to reset didn't help. It seems like the emulates serial device itself is what breaks, but I really can't tell. I can post any logs anyone who might have some expertise might need to figure it out.

It's a debian VM that was originally a Bullseye TurnkeyLinux Samba AD DC, but I ripped out the turnkey stuff and upgraded to Trixie and still have the same issues. I have the qemu system agent, fwiw, don't know if it does anything with this.
 
No I haven't set up backups and snapshots yet because I am playing around and learning. I was going to set up backups today actually, haha.

But I can try to reverse the steps from the tutorial. Basically the only difference between what you wrote up and what I have is the extra dydtemd getty invocation.

But before I do that, I will note some things from th eTask list in the Proxmox UI: there was this error:

client connection: 127.0.0.1:59648
error reading from pty: Input/output error (os error 5)
TASK ERROR: command '/usr/bin/termproxy 5900 --path /vms/105 --perm VM.Console -- /usr/sbin/qm terminal 105 -escape 0' failed: exit code 1

And there were a couple open shells to VM 105 (that's the one) that had a "spinner" constantly. When I clicked on them to Stop they said (I cannot find the exact error right now) that the stop failed; received interrupt.

In the cluster log, however, these failures and lock ups aren't there.

After I killed the last of them I got the serial console back, so I think it's something on Proxmox's side holding onto things? I am not entirely sure.