Categories
System Administration

Linux Lab

I’m going to discuss a set up for a simple Linux home lab. There’s already plenty of existing articles and tutorials about this kind of stuff and everyone has their own preferences, but this is my personal take and the things I like to work on.

This post isn’t meant to be a “HOWTO build a home lab”, more an example of what I have running at the moment to give you some ideas. Don’t get too hung up on the exact Operating Systems and tools I have installed. The whole point of a lab is to be able to explore and experiment. Try different tools, try different Linux distributions, and learn to do things on your own.

My current lab consists of the following machines, but this can change as I find other things to explore and work on.

My main machine is a fairly standard Fedora Linux workstation on my laptop. I install a lot of additional things like programming tools and whatnot, but it’s not a super customised system. The main things I have installed are Podman for running containers, and virt-manager for running virtual machines.

In virt-manager I have a few VMs to work with, but these can change. If I break one I can easily delete it and start again, or if I want to try a different OS I can.

  1. A Fedora Linux VM
  2. AlmaLinux
  3. CentOS 9 Stream
  4. Red Hat Enterprise Linux
  5. Windows 10

I don’t use the Windows 10 VM a lot, but it’s there if I need it. The virtual machines I have in virt-manager running on my laptop I usually have them installed as a Workstation or Server with GUI, to have the full desktop.

I also have Minikube installed so that I can experiment with containers and Kubernetes.

Now for the servers.

I have 2 old computers set up running Proxmox that I run some servers on. These let me run things even when my laptop is closed and I can host things in my home network that other devices can access if I want to. I don’t have any fancy storage attached to these, it’s literally just the machines connected together in Proxmox. One of the machines is an old laptop, and the other is a repurposed desktop PC strung together on the network.

I’m not using the full capabilities of Proxmox, but I can migrate VMs between nodes and share the resource usage, which is all I need.

Now, my homelab isn’t as well configured as I’d like it to be, but for the most part it gives me something to play with. The only services I have running permanently is a Debian Linux server running PiHole, and I have a Minecraft server on AlmaLinux for the kids (and me) to play with.

I have a couple of other Linux machines, one is running FreeIPA to give me a RHEL-like authentication server, similar enough to AD but still Linux-based. This isn’t going to be super complex, just set up enough to have a centralised authentication server where I can create a few standard user accounts.

And I have an app server and an NFS server. The NFS server is only used for me to share stuff between my virtual machines. The app server has a few Web Apps that I experiment with.

There’s plenty of space left in Proxmox and I usually spin up virtual machines for testing things like migrating Linux machines, or Ansible Automation Platform.

Of course you can install whatever Applications/Databases/Services you want.

Setup

I’m running the server virtual machines in Proxmox. I won’t go into setting up Proxmox here, but if you don’t have it already or don’t want to use it, any virtualisation solution will work, such as VirtualBox, VMware, etc. You just need somewhere to build Linux servers that you can connect to remotely. Preferably something you own or control, rather than a cloud solution.

I’ve created a template VM running AlmaLinux, it’s only fairly small. I went with the basic 1 CPU, 1GB RAM and I think 32GiB storage just to keep the resource usage down. I don’t have a huge Proxmox lab to throw massive servers on.

If you need help installing Linux you can read the instructions here. Any RHEL based Linux distribution will be similar. Just make sure you can connect to the machine over the local network. For the software selection I chose the “Minimal” option for just a basic Linux install.

I’d recommend once you’ve installed the first virtual machine, convert the vm to a template so that you can clone it for the other machines, rather than having to reinstall all the time. In Proxmox you can right click the vm and click ‘Convert to template’.

I built one virtual machine with AlmaLinux, converted that to a template, and then cloned the template into the 3 machines I’m building. This way the template stays in the default installation.

That’s pretty much it. It’s a simple lab, but it gives me the ability to run a whole bunch of virtual machines and containers to host whatever I want.