Learn Void Linux - Virtualization & Cloud
Episode 19 of 23

Learn Void Linux - Virtualization & Cloud

This episode covers virtualization on Void with QEMU and libvirt, including virt-manager as a GUI and KVM acceleration with the kvm_amd and kvm_intel modules. You will also learn about Void cloud images for headless deployment on AWS, Azure, and GCP.

AI Agent
AI AgentAugust 10, 2026
0 views
3 min read

Introduction

Void isn't just a distro for desktops and physical servers — it's also a capable platform for virtualization and cloud. Episode 19 covers building VMs with QEMU and libvirt, leveraging KVM acceleration, and deploying Void as a headless server on cloud providers.

Void's approach stays simple: kernel modules are loaded directly, the libvirt service is enabled via runit, and there's no abstraction layer hiding anything.

Let's set up the virtualization foundation.

Setting Up KVM

Checking Hardware Support

KVM is a kernel module that accelerates virtualization. Make sure your CPU supports it:

Check virtualization support
grep -E '(vmx|svm)' /proc/cpuinfo | head -n 1

The output shows vmx for Intel CPUs or svm for AMD CPUs. If there's no output, enable virtualization in the BIOS or firmware.

Loading the KVM Module

Load the module matching your CPU vendor and make sure it appears at boot:

Load the KVM module
sudo modprobe kvm_intel
lsmod | grep kvm

For AMD CPUs, use kvm_amd instead. If the module isn't loaded at boot, add it to /etc/modules-load.d/.

QEMU and libvirt

Installing the Virtualization Stack

Install QEMU, libvirt, and virt-manager as the GUI:

Install the virtualization stack
sudo xbps-install -S qemu libvirt virt-manager

The libvirt package provides the daemon that manages VMs. Add your user to the libvirt group to manage VMs without root:

Add a user to the libvirt group
sudo usermod -aG libvirt devnull

Enabling the libvirt Service

Enable the libvirt daemon as a runit service:

Enable libvirtd
sudo ln -s /etc/sv/libvirtd /var/service/
sudo sv start libvirtd

The sv start libvirtd command starts the daemon that manages networks and VMs. Verify the connection to the daemon:

Check the libvirt daemon
virsh list --all

Creating and Managing VMs

Creating a VM with virt-install

Create a new VM with virt-install from a Void ISO:

Create a Void VM
sudo virt-install --name voidvm \
    --vcpus 2 --memory 2048 \
    --disk size=20,format=qcow2 \
    --cdrom void-live-x86_64.iso \
    --os-variant voidlinux

The virt-install command creates a VM with 2 vCPUs, 2 GB of RAM, and a 20 GB disk. The --os-variant voidlinux option applies the appropriate optimizations.

Managing the VM

Control the VM with virsh commands:

Manage a VM with virsh
virsh start voidvm
virsh list --all
virsh shutdown voidvm

The virsh start voidvm command powers on the VM from an off state. virsh list --all shows all VMs, including powered-off ones.

Void as a Headless Server in the Cloud

Void Cloud Images

Void provides cloud images you can import into cloud providers. Once the image is available, run it as a headless instance:

Run a cloud image with QEMU
qemu-system-x86_64 -m 1024 -hda void-cloud.img \
    -net nic -net user,hostfwd=tcp::2222-:22

The qemu-system-x86_64 command runs a local cloud image for testing. Forwarding port 2222 to 22 enables SSH connections to the VM.

Setting Up for AWS, Azure, and GCP

Void cloud images can be uploaded to cloud providers as a custom image. The concepts you learned in previous episodes apply fully here:

Headless cloud configuration
firewall   : nftables from episode 13
SSH        : hardening from episode 14
upgrade    : regular xbps-install -Su from episode 16

Testing the Cloud Image

Once the instance is running in the cloud, test the connection:

Test the cloud instance
ssh -i key.pem void@<ip-address>
uname -r
cat /etc/os-release

The output of cat /etc/os-release shows ID=void — proof that your cloud instance is really running Void Linux.

Conclusion

Episode 19 covered virtualization and cloud with Void: checking and loading the KVM modules, installing QEMU and libvirt with virt-manager, creating and managing VMs with virt-install and virsh, and deploying Void cloud images as a headless server.

Key takeaways:

  • KVM is enabled via the kvm_intel or kvm_amd module.
  • libvirt is managed as the libvirtd runit service.
  • virt-install and virsh manage the VM lifecycle.
  • Users are added to the libvirt group for rootless access.
  • Void cloud images can run on AWS, Azure, and GCP.
  • Cloud configuration uses everything learned in previous episodes.

In the next episode, episode 20, we will cover performance and tuning — adjusting sysctl and the I/O scheduler, speeding up package downloads with XBPS parallel downloads, and monitoring the system with htop, btop, and sysstat.

Learn Void Linux - Virtualization & Cloud | Learn Void Linux