For those who are getting newly introduced, much of the content on this blog is oriented to self hosting and homelab environments. In fact, I’ve already written a pretty darn good guide on docker.
As my tinkering evolves, I’m finding the need to create sandboxes to test things in. Which means virtualization, or the capability to make an Operating System run another Operating System. Which is perfectly doable on the fedora platform in the docker guide. But it would be nice to use a dedicated virtualization platform (referred to as a Hypervisor). So we’re gonna take a step back and think: how can we design our infrastructure with virtualization?
Here’s what we’re gonna accomplish:
- Setting up a Proxmox hypervisor (it’s not the only hypervisor, but it is generally a great choice for homelabbing)
- Creating a ubuntu based virtual NAS appliance, with network facing storage
- Creating a docker LXC debian container (gotta have docker!)
- Setting up Backups between two proxmox servers.
To follow this guide, you will need:
x86Devices (sorry raspberry pi folks)
- A separate data drive in the primary PC. Can be external if you like, but this is to make our virtual NAS appliance
Benefits of Virtualization
Actually, let’s take a second and say why we want virtualization. I thought docker fixes all these pesky virtualization problems! Who needs it? Well, even with docker, we would like virtualization for several reasons:
- Process Isolation. This is the big one. Just like docker, we like every component we work on to be in its nice, little separate package. Docker lets us do this, but not completely. Docker is still sharing kernel resources and relies on the operating system to stay consistent. With virtualization, we can choose whatever operating system we like!
- Network Isolation. Docker has capabilities to isolate the network, but it’s not as thorough or capable as a virtualization platform. If we want to sandbox something, we really want it sandboxed. No talking to anything else.
- Operating system snapshots. You can take full point in time snapshots of the OS, and roll it back whenever. For the whole thing! Snapshot your OS,
rm -rfyour virtual computer, and restore it like nothing happened. great for tinkering.
- High Availability. Docker is not highly available. You can’t take a docker machine and turn it off and have the services running on it still tick along. Kubernetes is highly available, but adds a great deal of complexity to containerization. A nice middle ground is a highly available virtualization platform running docker.
- Emulation. Docker’s not gonna let you run
armpackages on an
x86platform. Virtualization will!
- Easy Backups. Back in the docker guide, we leveraged
btrfsto perform a very robust backup of our docker containers. and that works (if you’re using
btrfsfilesystems everywhere). When you’re using a hypervisor, the tools to back up the entire operating system come along for the ride. Easy replication, easy backups.
Let’s Install Proxmox!