First steps with Proxmox running on a Lenovo Tiny PC
This is very much a first steps post. I know I have barely scratched the surface of Proxmox, and I am sure that a lof of the things that I wrote here can be done better, but for now I just wanted to share my first impressions and first usecases of running Proxmox in my homelab.
Back in August I wrote how I tried to turn a Lenovo Thincentre Tiny M720q into a gaming PC.
How I bought a Tiny PC and turned it into a GPU workstation / gaming rig
This did not turn out well, I have not been using it much, and it was mostly taking up space on my desk, accompanied by a mess of cabling.
So, what else could I do with it?
For a long time now, I have been hearing about this Proxmox thing, and how it is popular in the homelab community as a tool to orchestrate VMs and containers. Trying it out has been on my todo list for way too long, and having a free tiny PC looked like the perfect opportunity.
My computing shelf. The Thinkcentre on the left is my Home Assistant box with a Zigbee dongle, and the right one is the new Proxmox node.
Preparing the Tiny to become a Proxmox machine
Switching the PC from a “gaming” setup to a homelabbing node was simple. I removed the GPU, and in its place I put back the SSD caddy with a 1TB 2.5” SSD from Lexar. I also reinstalled some minor parts like the back bracket. I did not put back the WiFi card with its antenna, because I don’t need it, and it would block the airflow which is already not great inside such a small chassis. I saw people on Reddit installing 40mm fans to the front of the case, but looking at the current temps, I don’t need them, at least for now.
With that, my PC has a 256GB M.2 drive for the system, which is a total overkill for Proxmox, and a 1TB drive for the virtual machines/containers. And with the GPU removed, its is once again totally quiet and cool.
Installation and configuration of Proxmox
For installation, I connected a screen, keyboard and mouse, hopefully for the last time. In times like this, I really miss having a proper KVM solution, but that is something for the future. I installed Proxmox in a typical fashion like any other Linux OS, from a USB drive.
After installation I run the “PVE Post install script” from the Proxmox VE Helper-scripts repo. Yes, I went through it first, I don’t like piping to bash scripts taken straight from the Internet without looking at them first.
The only other configuration that I did to my new Proxmox machine is setting up the storage.
I configured that second 1TB drive as a ZFS pool for use as a storage repository for the VMs and containers. Why ZFS? Because ZFS is great, and it fits nicely with the rest of my homelab. More on that later.
The only thing that was unclear for me and not mentioned in the installation docs was how to download the images for containers and VM, but this forum thread helped me out.
I created a few first containers, and I have to say, Proxmox is awesome, most things are so intuitive, simple, and quick. I especially like the ZFS support available out of the box, and the fact that by default every new container gets its IP address on the same network as the Proxmox host, something I was missing in LXD. The web UI is clear and powerful, and the advanced features are there, ready to be used, but not required at the beginning.
Migrating from LXD to Proxmox
For the last nine months or so I have been a big fan of running LXC containers in LXD, which is a container and VM orchestrator from Canonical. I have been running LXD on my NAS, and hosting on it services like Nextcloud or Forgejo. One of the downsides of this setup is that LXD and all its containers had to share RAM with other services like Jellyfin, and also with my large ZFS pools, and ZFS loves RAM like horses love oats (sorry, this is a joke for 30+ year old Polish people). The Tiny PC has 32GB of its own RAM which, the same as my NAS, so with separating the containers from my NAS I basically doubled the available amount of RAM, which is nothing to sneeze at, especially at the current RAM prices situation. Also, storing the containers on a separate PC, and backing them up to the NAS gives me another layer of data preservation.
For those reasons, and because Proxmox has been a joy to use from the first moments, I decided to move everything from LXD to Proxmox. I was hoping there was some easy, turn-key way to migrate LXC containers between those two services, but from all my searching it turned out that was not the case. I found some solutions, but they all felt very hacky and not to my taste, so I decided to go the long router and just start the containers from scratch, copying just the data like the Forgejo repositories or the Nextcloud files.
I started the migration with PiHole and Nextcloud. For those two services I used the community scripts that I took from the same repo as the post-install script mentioned at the beginning of this post. Thanks to them, setting them both was a breeze, and in moments I had two fresh containers running.
Then came the monitoring stack, consisting of Grafana and InfluxDB, and later Forgejo. Migrating Forgejo was easy, after I set up the new Forgejo container, I used the built-in migration feature to move all my repos from the old service to the new one.
I also used this opportunity to move services from other parts of my homelab into this Proxmox node, for example I moved Miniflux (an RSS reader) from my “dev” VPS to an LXC container here.
After migrating everything to Proxmox and allowing it to run for a few days to make sure there were no issues, I removed LXD from my NAS. My current direction of my homelab is to have a mostly dumb NAS, running there only the services that require direct access to a lot of storage and the GPU, like Jellyfin or Immich. Everything else goes to the Proxmox node.
Screenshot of the Proxmox web UI showing the list of running containers.
Backups
As I wrote above, the Proxmox services are stored on a ZFS pool on the Lenovo Tiny. How Proxmox is handling them is that each service is a separate ZFS dataset. My NAS’ storage is also ZFS based. By their powers combined, doing backups of the containers is a single command:
syncoid -r --skip-parent root@proxmox:thepool large-data/proxmox-backupsLet’s unpack that. Syncoid is an awesome tool for replication of ZFS datasets.
I am doing a “pull” style replication, the command is being run on the NAS, and it pulls the datasets from the Proxmox node to the NAS. thepool is the name of the Proxmox storage pool, and I am only pulling it’s children, so the datasets of the particular containers, and saving them under the large-data/proxmox-backups dataset, which is on a 4TB pool on my NAS. The NAS has the ssh keys to access the Proxmox node, so there is no need for any passwords and the like. And le voila por favor, one command and everything is backed up.
What I haven’t yet solved is backing up the configuration file of the Proxmox itself, that is the next step for the near future.
Gaming
Yes, I tried that too. I created a Kubuntu VM, and installed Steam on it, and tried gaming using Sunshine/Moonlight streaming.
Aaaaand yeah, no matter how many resources I gave to that VM, I got maybe 3FPS in Terraria. This is clearly not a PC for gaming, especially remote gaming. Pwning noobs and 360 no scopes (of course in Terraria) will have to wait.
Infrastructure as Code
I also started to look at keeping my containers as code in OpenTofu. OpenTofu has a Proxmox provider, and so I can define the containers configuration and have it automatically applied, just like the grownup sysadmins do.
I’m sure this will be a topic of an upcoming blog post.
Next steps
This is just beginning of my journey with Proxmox and I am fully aware there is still a lot to learn. Maybe one day I will but another Lenovo Tiny and try out clustering? Maybe I’ll do some advanced networking magic? Or maybe I’ll build a full size PC with a GPU, and move everything there and actually try some proper gaming? We will see. So far I have been enjoying Proxmox very much, and it is my go-to technology for trying out new things.
Thanks for reading, and enjoy your holidays, however you spend them!