Proxmox what I installed

Following on my general post about Proxmox here’s a list of specific things I installed on my new home LAN server. As always this blog is mostly written for my own notes, but maybe other folks will find it interesting where I ended up.

Proxmox hypervisor

In general the idea is to customize the Proxmox host itself as little as possible, all my stuff should be going in guest operating systems. But Proxmox itself is a full Debian system with super cow powers and you can install other stuff. I kept it to a minimum just for administering the hypervisor:

  • apt install stress-tui stress-ng lm-sensors hwinfo joe sudo
  • Tailscale so I can access the management GUI from anywhere
  • The user “nelson” with my usual environment. Not really necessary.

I hand-mounted a USB disk of my media files by editing /etc/fstab. Proxmox seems to have no tool for managing USB disks. It doesn’t even automount them although I bet there’s some Debian thing you can install for that. As always be sure to use nofail in the fstab so it’ll boot without the disk.

I also wrote a script that uses pct list and pct exec to run a command in each container to print out their IP address. It’s kinda hard to find all your guest images in Proxmox’ UI if you’re using DHCP to assign addresses. (I wonder if there’s a way to get Proxmox to manage DHCP for its guests. Part of me wants a separate subnet for all the Proxmox hosted stuff.)

Ubuntu VM: old server clone (240GB, only 30GB used.)

My old server is virtualized now, see this blog post. I plan to migrate everything out of here and shut it down eventually but it’s real nice to not have to do that all at once.

Hacking container: Ubuntu template (1.4GB)

I have one container that’s just for general hacking projects. I suspect I’ll rebuild this from time to time other than preserving my home directory. I used the Proxmox Ubuntu template to make it, making sure to turn DHCP on. It’s unprivileged (which breaks ping). Here’s some stuff I did after install:

  • locale-gen en_US.UTF-8
  • apt install joe avahi-daemon git zip unzip rsync openssl webp ripgrep pigz python3 python-is-python3 python3-venv python3-dev pkg-config build-essential sqlite3 keychain curl
  • tailscale: have to enable tun access in Proxmox to make this work
  • My usual home directory environment.

Plex container: tteck (4.6GB)

I installed the Plex media server using tteck’s Proxmox helper scripts. These are a set of shell scripts to install a container in an OS and then the apps. Not sure why they don’t just distribute a template instead. I chose Ubuntu 22.04 instead of Debian and then it installed whatever Plex itself needs.

My media files are on the USB drive I mounted on the host OS. I used a bindmount to make the directory available in the container. Note that bindmounts break Proxmox’ snapshot mechanism, but backups still work.

The resulting image works great. Intel QuickSync, the GPU accelerator for transcoding, just worked with no effort on my end. Plex itself is easy to set up. I configured Plex to not run scans, intro detection, etc every night so it wouldn’t use all that CPU and disk I/O. But those jobs work fine.

4.6GB seems huge. over half of that is in Plex cache directories that were generated after it started running. I only gave this container 8GB, I wonder if it’ll run itself out.

Unifi container: tteck (2.1GB)

The Ubiquiti device management controller. Another tteck script, with Debian 12 this time. Also installed Tailscale myself. Ubiquiti’s system requires you migrate devices from an old controller to a new one which is fairly simple, basically making a backup of the config and copying it over. The actual migration process is a little scary, if it goes badly you might have to hard reset your devices.

Samba container: Alpine template (0.07GB)

A network fileserver for my music files, for Sonos. I did this one fully manually, starting with the Alpine 3.18 template. it was really easy, basically just apk add smb. I had to bindmount the media drive just like Plex. I wrote a new config file from scratch, smb.conf gets a lot more readable if you remove the hundreds of lines of comments from it. Dimly remembered the special downgrades Sonos requires to work (unix extensions = no).

Docker VM: manually (32GB not all used)

I set up a Debian VM to run Docker and Portainer using these instructions. I wanted to see how Portainer worked but I don’t know that I’ll keep using it. It’s not even running right now.

Monitoring container: TBD

The main thing left in my old server’s VM is a bunch of custom scripts I wrote to log monitoring data. I set this up a couple of year ago with Telegraf + InfluxDB + Grafana and it works well. So well I keep adding monitoring hacks without being careful about it, so now it’s a bit of a hairball.

I think the migration path is to set up Debian or Ubuntu on a new container, then install Telegraf + InfluxDB + Grafana there. Then somehow migrate all my Influx data and Grafana configs over. And all my monitoring scripts in Telegraf. That’ll let me turn off the VM versions of those things without much data loss.

But I’m sorely tempted to also improve things as I move them. Productize the monitoring scripts a bit so next time I move them it’s simpler. And maybe move off of Influx to TimescaleDB (a Postgres extension). That’d be more fun and having the VM working gives me time to do that.

I’m also unclear whether I should set up a separate container for each monitoring process, plus an extra for influx + grafana, and write the data with a network socket. That’s maximal containerization but seems like overkill, I probably won’t bother.

Backups and snapshots

One annoyance: there’s no tool for backing up the Proxmox server itself. Most people say “eh, just reinstall” but it’d sure be nice to have a copy of the configuration. Some folks have hacked things by copying off the config files with a script.

Proxmox does have backup tools for VMs and containers which are basically filesystem copies. I’m not certain how hard they are to restore but the web GUI has a “restore” button so presumably push-button. There’s a nice set of backup options trading off consistency vs disruption. If you stop the guest entirely you can make a cleaner backup but you don’t have to. Backups can be run manually or scheduled.

Proxmox also has “snapshots” which not only capture disk state but also memory. This seems to work great with a VM; I could snapshot, rollback, and my running processes are back in the old state. There’s also snapshots for containers but they don’t work as well. Bindmounts disable them entirely. And the restore of a container is not confidence inspiring; it took 30+ seconds and only restored file state, not memory or running processes. That all makes sense given what a container is, but makes me wonder whether container snapshots are useful.

Note that a backup run in “snapshot” mode is a different thing from a “snapshot”.