Categories
Uncategorized

Enabling serial console on Ubuntu in Proxmox

A serial port may be a bit old, but it sure can be handy when using a VM. Serial ports can be used to provide a terminal, without the overhead of having to maintain a GUI. Furthermore, because the serial port only passes text in two directions, you can scroll back (as suggested by this YouTube video) to earlier text.

Enabling a serial console in a Ubuntu VM running on Proxmox is reasonably straightforward, although the documentation seems to be a bit outdated. The part in Proxmox is straightforward, and can be done as described in the documentation: simply adding a serial port to the VM’s hardware suffices. The part involving the VM is somewhat more difficult, as the documentation seems to have been written for earlier versions of Ubuntu, which used upstart instead of systemd. Eventually, I found the solution in a blog post on the internet: it turns out systemd actually has this possibility built-in. The only thing that one has to do is to enable this built-in service. Assuming that one wants to make a serial console available on tty0, the following command can be used:

sudo systemctl enable --now serial-getty@ttyS0.service

And that’s all! After doing this, it becomes possible to use the xterm.js console in Proxmox, which seems to be quite useful (although I have not used it much just yet).

Leave a Reply

Your email address will not be published. Required fields are marked *