Installing QEMU
QEMU must be installed on the host before you can run a MicroVM. This article covers installation on various platforms and how to verify that the MicroVM machine type is available.
Installation on Ubuntu/Debian
# Update package index
sudo apt update
# Install QEMU with all target architectures
sudo apt install qemu-system-x86 qemu-system-arm qemu-utils
# Verify installation
qemu-system-x86_64 --version
For the latest version from the official repository:
# Add the QEMU PPA (optional, for newer versions)
sudo add-apt-repository ppa:canonical-server/server-backports
sudo apt update
sudo apt install qemu-system-x86
Installation on Fedora/RHEL
# Fedora
sudo dnf install qemu-kvm qemu-img
# RHEL/CentOS/AlmaLinux
sudo dnf install qemu-kvm qemu-img
# Verify
qemu-system-x86_64 --version
Installation on Arch Linux
# Install full QEMU
sudo pacman -S qemu-full
# Or just QEMU for x86_64
sudo pacman -S qemu-system-x86
Installation on macOS (via Homebrew)
# Install QEMU via Homebrew
brew install qemu
# Verify
qemu-system-x86_64 --version
Note: On macOS, KVM is not available. QEMU runs with TCG (software emulation), so performance is slower than on Linux with KVM.
Verify MicroVM Support
After installation, make sure the microvm machine type is available:
# Check all supported machine types
qemu-system-x86_64 -machine help | grep microvm
# Output:
# microvm Microvm (x86) (default, accelerated)
# microvm Microvm (x86) (no accelerator)
KVM Installation (Linux)
KVM is required for optimal MicroVM performance:
# Check whether the hardware supports virtualization
egrep -c '(vmx|svm)' /proc/cpuinfo
# Output > 0 means it is supported
# Install KVM
sudo apt install qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils
# Add the user to the libvirt group (so it can run without sudo)
sudo adduser $USER libvirt
sudo adduser $USER kvm
# Apply group changes (or log out/log in)
newgrp libvirt
newgrp kvm
# Verify KVM
ls -l /dev/kvm
# There should be permission for your user
Full Verification
# Check the QEMU version
qemu-system-x86_64 --version
# Check KVM availability
ls -l /dev/kvm
# Check the microvm machine type
qemu-system-x86_64 -machine help 2>&1 | grep microvm
# Check available targets
qemu-system-x86_64 -target help 2>&1 | head -5
Directory Structure
After installation, the important files are located at:
/usr/bin/qemu-system-x86_64 # Main binary
/usr/share/qemu/ # Firmware, BIOS, ROM files
├── bios-256k.bin # SeaBIOS
├── kvmvapic.bin # KVM VAPIC
├── linuxboot.bin # Linux boot firmware
└── ...
/etc/qemu/ # Configuration (if any)
Installation from Source
For the latest features or a custom build:
# Install dependencies
sudo apt install build-essential ninja-build libglib2.0-dev \
libpixman-1-dev zlib1g-dev libfdt-dev
# Clone QEMU
git clone https://gitlab.com/qemu-project/qemu.git
cd qemu
# Build
mkdir build && cd build
../configure --target-list=x86_64-softmmu
make -j$(nproc)
# Install
sudo make install
Installation Troubleshooting
"permission denied: /dev/kvm"
# Add the user to the kvm group
sudo usermod -aG kvm $USER
# Log out and log in again
The microvm machine type does not appear
# Make sure the qemu-system-x86 package is installed (not just qemu-user)
sudo apt install qemu-system-x86
QEMU version is too old
MicroVM requires QEMU >= 4.0. For older distributions, consider installing from source or using Flatpak/Snap.