Philippe's blog

Building a budget home lab

P.Leclercq in Security    2023-08-18   lab  technology 

article header image

Building a budget home lab

Thanks to the evolution of the technology over the past two decades, building a budget home lab with enough power to run corporate applications is possible. With affordable hardware, virtualization software and open source solutions, you can transform a corner of your home office into a realistic testing ground.

My requirements

  • 20 virtual machines (VM) on disk
  • 4 or 5 concurrently active VM
  • Mini desktop footprint and power consumption
  • Low noise
  • Life span >= 7 years
  • Tests only, no production
  • Low maintenance
  • Price < 300€ excl. VAT (US $325) for hardware, free (as in beer) software

Hardware

Even the workstation class processors from 4 or 5 past generations with multicore and virtualization capabilities are sufficient to support the desired target infrastructure. Between Intel and AMD, you have a vast choice. Check Amazon or your preferred second hand hardware store. You can often find refurbished mini-PCs like Lenovo ThinkCentre, HP EliteDesk, Fujitsu Esprimo Q920 with Intel i5, 16 GB RAM, 256 GB SSD for less than 200€. Intel NUC are also of course prime candidates, but usually more expensive.

For the RAM, aim to at least 16 GB to accommodate 4 or 5 running VMs. The more the better, of course.

For storage, a reasonable solution is a 2TB external USB drive for VM, ISO, snapshots and backup storage. This choice also ensures portability and recoverability of your VMs, should you move it to another machine. Of course, the VM performance will suffer from the USB 3 transfer rate compared to SATA or SSD storage, but if you don’t use these for production or I/O very intensive tasks, it should suffice to complete your tests. You can find 2TB external USB disks in reputable brands for 55 to 65€.

Software

The most obvious choice for an enterprise class hypervisor would be the free VMWare ESXi. However, the hardware compatibility list for workstations is rather limited and older machines are quickly excluded from support, and it is proprietary, so you are at the mercy of VMWare’s (and Broadcom’s) politics.

Xen is also a contender, but the management tool (Xen Orchestra) is an additional component to be installed in a VM, and it is based on CentOS, while I am rather a Debian user.

I set my choice on Proxmox, which installs on top of Debian Linux, has an included web management interface, and is based on KVM/Qemu, which gives you the ability to emulate processors other then Intel x64 (ARM for example), and natively supports Linux containers (LXC/LXD) that have a much smaller footprint than VMs. There is a small downside to it: the prepackaged VMs you find on the web are rarely made for Proxmox, so you usually have to first convert and import them in the hypervisor, but the needed tools are present in Proxmox and the process is easy.

Final system

So, here is my desktop test “data center”.

Mini server with USB disk

  • Refurbished Fujitsu Esprimo Q20, i5 4590T, 16 GB Ram, 240 GB SSD, 1 Gb/s Ethernet, and a 2 TB Western Digital USB 3 disk.
  • Blueprint: 100 cm2 (15.5 square inches).
  • Cost: 165€ + 62€ (excl. VAT)
  • Runs Debian 11 bullseye with Proxmox 7.4-16.
  • Has 2 Linux containers and 10 VM installed for the moment, and there is still a lot of free space.
  • Simultaneously runs, for example, 1 Kali Linux, 2 Windows 2022 servers and a Debian guest running a full ELK stack.
Home   Top