A VM on Proxmox is created with a graphical display by default. This is nice for beginners and installing OS with graphical interface, but it can be more optimal than that!
I've been migrating VM console view to SPICE because it supports local "remote desktop"-like interface. I would click on "Console" button, download a .vv file, and open the file to access the console in a RDP-like session. This is nice, but this is still a graphical interface.
This is where the xterm.js serial terminal view comes in. This is a text-based console, so it should save a lot of bandwidth if I might need to access the virtual console while limited on internet speed.
Serial Console Setup
These show how I enabled serial console per OS. Regardless of the VM's OS, the VM must have a serial port hardware attached.
Here is Proxmox's wiki article on using serial terminal.
- On Proxmox, open up the VM view
- Hardware > Add dropdown > Serial Port
- Add it. Keep port number
0 unless the VM has existing ports.
Installing an OS over a serial console is possible, but I have not done it yet. I've been enabling serial console to use with xterm.js retroactively. When I get to doing this, I'll update this.
Next steps are OS-dependent.
Debian and Ubuntu
In addition to terminal console access, kernel logs will be available during boot when serial console is enabled on grub.
- Update
/etc/default/grub. These are my usual settings, and all I added is a value to GRUB_CMDLINE_LINUX (originally an empty string):
GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,115200n8"
- note the second console entry:
console=ttyS0,115200n8. The number after ttyS depends on the added serial port number. If serial0 hardware is added on Proxmox, use ttyS0.
- there's no benefit of adding the entries to
GRUB_CMDLINE_LINUX_DEFAULT. The one with DEFAULT applies on normal mode only, while the one without applies on both normal mode and recovery/rescue mode.
- Run
update-grub
- Reboot
OPNsense
There's a web GUI option to change default terminal. See the official documentation.
Home Assistant OS
Home Assistant latched onto the console automatically.