With their disposable nature, easier recovery provisions, and terrific isolation capabilities, virtual machines are versatile enough to fit any workload. Plus, you can choose between a couple of options when deploying virtual machines. For casual users, you can run them on your daily driver via Type-2 hypervisors, while hardcore home labbers have the option of deploying them on dedicated home servers using powerful virtualization platforms.
Better yet, modern hypervisors can run most of the popular operating systems inside VMs – including FreeBSD distros and even Hackintosh setups. However, my home lab primarily utilizes Linux-based virtual machines, and here are some of the best distros I host inside virtualized environments.
Alpine Linux
An ultralight distro that barely consumes any resources
Compared to their GUI-heavy counterparts, minimal distributions are a little more complicated to set up. However, their superior customizability and lightweight nature make up for this drawback, and they’re especially useful when you’re on an underpowered server or need to run multiple virtual guests without choking the underlying host. Requiring just 128MB of RAM, Alpine Linux has a tiny footprint on most x86_64 processors.
Despite its CLI-heavy nature, it’s also fairly easy to install on most hypervisors, and you can arm it with most of the popular packages without breaking a sweat. Since it relies on musl instead of glibc, Alpine has extremely low memory consumption, though the lack of glibc implementation can make it difficult to use this ultralight distro for normal desktop tasks.
Fedora CoreOS
Perfect for running containers inside VMs
Fedora’s CoreOS is a popular distribution for running containerized applications on cloud platforms, though it works just as well in home lab environments. While its 2GB RAM and 2 v-core requirements make it heavier than Alpine Linux, Fedora CoreOS still has a fairly minimal footprint. On the containerization front, CoreOS ships with Docker and Podman, so you can choose between the all-popular runtime or go for its pod-based, daemonless counterpart.
Since it's immutable by nature, you get better security, atomic updates, and easier recovery for your container tasks. But if you want more packages for your CoreOS VM, you can use the all-powerful rpm-ostree image system to install more apps. Similar to NixOS’ central nix.conf file, CoreOS lets you customize certain aspects of the distro using Butane configuration files.
Arch Linux
Easier to tinker with in a virtualized environment
Between its uber-complex setup procedure and rolling release nature, Arch is infamous in the Linux ecosystem for its seemingly steep learning curve. While I’ve yet to encounter too many stability issues on my Arch Linux rigs, I have run into the occasional broken apps and weird bugs during my tinkering experiments. While these issues weren’t distro-breaking by any means, randomly encountering package conflicts and buggy GUI elements can get rather annoying.
Running Arch Linux inside a virtual machine was a neat solution. Not because it stopped these weird issues, but because snapshots and rollbacks are extremely easy on VMs. In fact, I currently use an Arch VM as a dev machine, and it works as well for my computing projects as it does for my Linux experiments.
Debian
Stable enough for most VM projects
Ask anyone in the tinkering community, and most folks will call Debian the most vanilla of all distributions. Me? I don’t consider that a problem, as Debian trades the bells and whistles of other popular Linux distributions for an extremely stable base, compatibility with general-purpose packages, and beginner-friendly setup process.
Sure, it may not have the quirky nature of any of the other distros on this list, but it’s perfect for virtualization experiments where you want the underlying distribution to remain as stable as possible. While I’ve switched to Fedora CoreOS as my primary container-hosting virtual machine, I use Debian VMs to run everything from Ansible playbooks to GitLab experiments.
Whonix
A pair of virtual machines for privacy-conscious folks
Rather than featuring images designed for bare-metal installation, Whonix is meant to run inside virtual environments. And yes, the plural version of virtual machine, as this distribution deploys two VMs to increase security and safeguard your privacy.
The Whonix-Gateway VM is responsible for routing all your traffic to the privacy-first Tor network, allowing you to harness its IP cloaking, no-log architecture, and multi-relay setup. Meanwhile, the Whonix-Workstation instance works similarly to a general-purpose VM. Besides being built on a hardened version of Debian, Whonix-Workstation relies on boot clock randomization, stream isolation, account separation and other security features to further reduce the chances of hackers spying on your activity.
Which distros do you run inside virtual machines?
Besides the options on this list, I’ve got a handful of other operating systems I typically run inside virtual machines. There’s good ol’ FreeBSD, which offers a breath of fresh air from the Linux ecosystem. Since I’m a bit apprehensive about using the experimental Haiku OS on a bare-metal setup, I use a VM whenever I want to tinker with it. Meanwhile, DietPi is a decent alternative to Alpine Linux if you want a minimal distribution that’s more beginner-friendly. Then there’s my cursed ESXi VM running inside Proxmox, which works surprisingly well thanks to nested virtualization, the SATA storage interface, and the VMware vmxnet3 Network Adapter.
