Hypervisor — your own private cloud.
A hypervisor is a machine that runs other machines. Instead of one OS per box, you run many — each isolated, each with its own kernel, each thinking it has the hardware to itself. This is how every cloud provider works. Now it's your turn.
What you'll build
KVM + QEMU + libvirt on ZFS
Linux's built-in hypervisor (KVM) with QEMU for hardware emulation and libvirt for management. VMs stored as ZFS zvols — block devices backed by ZFS. This means your VMs get snapshots, compression, and cloning for free.
The recipe
# Start with a kldload server install, then:
# Install hypervisor packages
kpkg install qemu-system-x86 libvirt-daemon-system virtinst \
ovmf bridge-utils virt-manager
# Enable and start libvirt
systemctl enable --now libvirtd
# Create a ZFS dataset for VM storage
kdir -o compression=lz4 /srv/vms
# Create a zvol for your first VM (40GB thin-provisioned)
zfs create -V 40G -s rpool/srv/vms/my-first-vm
# Install a VM from ISO
virt-install \
--name my-first-vm \
--ram 4096 --vcpus 4 \
--disk /dev/zvol/rpool/srv/vms/my-first-vm \
--cdrom /srv/isos/debian-13-netinst.iso \
--os-variant debian13 \
--network default \
--graphics vnc
# Snapshot before doing anything risky
zfs snapshot rpool/srv/vms/my-first-vm@clean-install
# Clone the VM instantly (CoW — uses zero extra space)
zfs clone rpool/srv/vms/my-first-vm@clean-install rpool/srv/vms/my-second-vm
What you'll learn
Hardware virtualization
How KVM uses CPU extensions (VT-x/AMD-V) to run guest kernels at near-native speed. Why QEMU handles device emulation. How libvirt ties it all together.
Storage virtualization
Why zvols beat qcow2 for VM storage. How thin provisioning works. Why copy-on-write cloning makes golden images practical. How ZFS snapshots give you instant VM rollback.