Post-virtualization thoughts
Phew, my physical to virtual server migration using Proxmox mostly worked. I’ve now moved my main life server, the one I’ve been maintaining or evolving over 25+ years, for the first time into a VM. And it mostly works! Some collected thoughts after the fact.
Checkpoints and backups at the VM level are nice. Really looking forward to that.
This plan of virtualizing a server by first making one giant VM is nice. I can now hive off services to run in specific containers or VMs at my leisure.
Jeff N talked me into trying ZFS on the Proxmox host and so far I’m glad for it. ZFS seems complicated to me but Proxmox is clearly built to take advantage of it. Checkpoints already work better than on BTRFS.
I’m still working out where stuff should live and how it should be shared once I start containerizing services. The obvious thing is to put the primary home for everything in a ZFS pool maintained by the Proxmox server itself (just with ZFS, no Ceph.) My home directory, my Music library, my Video library, a place for backups. Share to containers via bindmounts. Sharing to VMs is harder. I think NFS is the best solution for now until virtiofs in Proxmox is a bit more finished.
Yes, I said NFS. Ugh. I’ve got it working with an NFS server on the Proxmox host itself and the VM mounting it. Setting up automount gave me bad flashbacks to the 1990s, although of course systemd has its own way of doing things. But NFS implies a lot of overhead. Also the confusion of user ID mappings. I’ve never really administered NFSv4 which has some nice things but I may gouge my eyeballs out of I have to set up Kerberos. OTOH I’m really not comfortable letting anything on my LAN mount stuff with root privileges. A work in progress.
Syncthing is working OK in the VM right now. Syncthing is peer to peer but I think of it as hub-and-spoke, with this server being the hub. I think I want to hive that Syncthing hub off to its own container. I see myself possibly also setting up a separate Syncthing instance in some containers or VMs but that sure seems dumb. More work in progress.
Syncthing + NFS is scary. The risk is that NFS is unreliable, so the directory for a synced folder might disappear. And in a bad case Syncthing might interpret that as a command “Delete all the files” and propagate that to all the clients. This really happens in practice and is very bad. They have a sentinel file to protect against this, the .stfolder. I still can’t help but think that syncthing is best run on a local filesystem and not a networked one.
I’ve got Plex running in a VM. Right now it doesn’t have access to the Intel GPU, so it can’t do hardware acceleration of transcoding with Quicksync. There’s ways to make that work but I think I should prioritize moving Plex first into a container, the tteck scripts work with hardware transcoding.
Backups are a big question mark. I’ve generally used rsnapshot but that requires root access to work well, since it’s setting file ownership. And root access to NFS is a no. I’m thinking of switching to Restic for backups instead. How this will work depends a bit on my “who should own what files” question.
I also want to make VM and container backups in Proxmox itself, separate from my personal data. And I’d like to back up the Proxmox server configuration itself; it’s crazy there’s no tool for that.
I need to rethink using RAM for tmpfs in the VM. Also using a swapfile. It’s all working but I bet it’s not optimal.