Luke Marshall

Starting Fresh: Proxmox

One thing that I didn’t make use of last time was a hypervisor. I just installed Ubuntu Server and threw everything I wanted to try out onto that. It kind of worked, but it also left me in an awkward position whenever I wanted to test out a new OS or run something more isolated. There was no separation of concerns at all.

Home Assistant was something that I originally wanted to run and play around with, however as I used the Docker install rather than the fully-fledged Home Assistant OS, which meant I didn’t get access to any of the Add-Ons. I thought I had the full thing, but I didn’t, and it turns out those Add-Ons are actually incredibly useful, integration for Octopus Energy who are my energy provider.

With that in mind, I thought it would be best to give Proxmox a go. It’s a proper hypervisor, it’s free (as long as you ignore the “No subscription” warning – shoutout to the Proxmox helper script which helps to get rid of that!), and it’s got a nice web UI so I don’t need to SSH into everything all the time.

I installed it on that old (well, 2018-ish…) HP laptop that I had already used as part of my original homelab setup. It’s not a powerhouse (i5-8250U, 8GB RAM) but it does the job. The casing is all plastic and incredibly flimsy; the screen and keyboard were literally popping out. The screen actually serves no purpose right now, so I decided to take it off and just had it running headless with a power cable and an Ethernet lead plugged in, flipping it upside-down and giving the fan has a bit more room to breathe. It’s not the prettiest solution but it works.

For now, the plan with Proxmox is to run non-critical stuff. The battery on this thing isn’t removable, so I’m definitely going to want to turn the laptop off occasionally, and I don’t care if I’m being paranoid… I have no idea how safe it is to run it 24/7 in its current state, and I don’t really feel like finding out the hard way! So really it’s just going to be for extra stuff that really needs its own VM or LXC container. I’m sure Home Assistant OS is a critical service to many people, but I just don’t have that many IoT devices in my house at the moment, so it’s not a big deal for me if it goes down occasionally. That actually makes it a good candidate for something I can practice migrating later on when I set up a more permanent VM host.

The old HP laptop, resting on a tool box for now…

The install

Installing Proxmox was actually pretty painless for the most part, just a case of flashing the ISO onto a spare USB stick using Rufus, connecting the laptop to my monitor via HDMI and following the prompts on screen to get through the install, before finally accessing it on my main laptop from the relevant internal IP address.

One annoying thing about Proxmox however is that it automatically creates an LVM volume, which makes it difficult to accurately monitor how much storage space is actually left, and it also means you don’t get access to the full drive. LVMs are great when you’re running lots of services and you’ve got loads of storage and want to slice it up neatly, or if you’re using multiple drives and need to be clever about how they’re split… but I only have one 128GB SSD and I’m barely going to be running anything on it. I’d rather just use the full thing and be able to clearly see my disk space and then allocate to my VMs accordingly based on what’s left.

Increasing the useable storage was easy thanks to this video from NetworkChuck – just a few clicks in the web UI and three commands to run in the terminal.

First, I removed the local-lvm volume from the storage list in the Proxmox web UI. Then I ran:

lvremove /dev/pve/data

That command deletes the logical volume called data, which Proxmox creates by default. It’s where it would have stored VM disks and stuff if I was using LVM for everything, but since I’m not using it, it makes more sense to me to just get rid of it and get some of that space back.

Then:

lvresize -1 +100%FREE /dev/pve/root

This takes all of that free space and adds it back to the root volume where Proxmox itself is installed.

Finally:

resize2fs /dev/mapper/pve-root

This one actually resises the filesystem inside that volume so that it can use the full size I just gave it. Without doing that, the space is technically assigned but the Proxmox still thinks it’s working with the smaller original size.

And that’s it. Now Proxmox is using the full 128GB on my SSD. Nice.

Now What?

I don’t fully understand all of the terminology in the Proxmox web UI yet, but I get the general idea, and I’ll figure the rest out as I go. It just looks like an incredibly powerful OS that I probably won’t ever even scratch the surface of!

I’ve not actually installed anything on it yet because I’m still planning out which services I want to run and where I want to run them, but at least it’s now there, ready and waiting. As mentioned above, Home Assistant OS will definitely go on here in its own VM so I can make full use of its features in a way that I couldn’t before. I might also set up a lightweight VM so I can test out Ansible before I make the step into using it for everything.

I also now have a good place to try out backups and snapshots properly, something which I just didn’t bother with at all last time. This time, I want to get into the habit of snapshotting things before major changes, even if I don’t have a full backup pipeline set up yet, so that when I’ve actually got data and services that I need to keep and/or recreate, I’m not up the proverbial without a paddle if it all goes wrong.

In short, it’s up, it’s working, and it feels like a solid base to build from. The next step is to actually get something running on it!