cat 'Working Xterm.js on an Alpinelinux VM under Proxmox.md'
Copy-pasting commands from another guide didn’t work. Can you please teach me how to get the Proxmox implementation of Xterm.js working on my Alpine Linux VM?
Hold my NoVNC console, I’m going in!
This post (well, the whole blog) is more like a notepad for myself, and I cannot recommend applying my fix/es for production use before consulting a professional. As always with my stuff, it works, but is probably not the best way to solve the problem.
Step 0. - Create or take a look at one of your existing Alpine Linux VM(s).
Note the VM ID (in my case it’s
Step 1. - Enable a serial console at boot.
By default, Alpine runs
sys extlinux as bootloader, we’ll need to enable a serial port there. For a freshly installed Alpine (3.10+) VM, these commands should do the trick.
If you’ve already made changes to your extlinux config, do the below alterations manually!!
sed -i 's/default_kernel_opts=\"/default_kernel_opts=\"console=ttyS0,115200 /' /etc/update-extlinux.conf sed -i 's/serial_port=/serial_port=0/' /etc/update-extlinux.conf
Step 2. - Allow logins from the newly created serial console.
We also need to make sure
/dev/ttyS0 is allowed to actually log in, otherwise we’ll just get our password refused:
sed -i 's/\#ttyS0\:\:/ttyS0\:\:/' /etc/inittab
Step 3. - Update the extlinux config to reflect your new changes.
Step 4. - Add a serial device to your VM.
SSH in to your Proxmox host and issue the
qm set <vmid> -serial0 socket command.
qm set 999 -serial0 socket
Since this is my guide and nothing ever goes wrong, you should see a:
update VM 999: -serial0 socket
(You could also use the WebUI: VM > Hardware > Add > Serial Port >
Step 5. - The finale (aka “rebooting your VM”)
Reboot the VM and you should see the magic of Xterm.js being enabled.
You know what the best part is?
That’s right, we can actually log in as well!
Enjoy your awesome js terminal with loads of nice features, such as copypasting, so you can follow more of my guides!