The Pragmatic Addict

Host VMs on your Raspberry Pi with qemu

Background

I’ve had great success using qemu on my x86_64 machines hosting various Windows servers, development environments etc. After some research Raspberry Pi does support kvm, though most of the solutions out there use libvirt which is nice but I prefer something a bit more bare bones.

Install qemu

sudo apt-get install qemu-system-arm

Download the Debian ISO installer

wget "https://ftp.debian.org/debian/dists/stable/main/installer-arm64/current/images/netboot/mini.iso"

Create your hard disk image

qemu-img create -f qcow2 debian.qcow2 50G

Create debian-qemu.sh

#!/bin/bash

exec qemu-system-aarch64 -machine virt,accel=kvm -cpu host -m 1G  \
    -bios /usr/share/qemu-efi-aarch64/QEMU_EFI.fd \
    -display gtk,grab-on-hover=on,zoom-to-fit=off \
    -device virtio-gpu-pci \
    -device qemu-xhci -device usb-kbd -device usb-tablet \
    -drive if=virtio,format=qcow2,file=debian.qcow2 \
    -cdrom mini.iso

Start your VM!

bash ./debian-qemu.sh

Notes


Created: 2025-10-15 Modified: 2025-10-15