In this step-by-step tutorial, I'll teach you how to create and run ARM64 (AArch64) virtual machines using QEMU on any Linux system. Whether you're on an Intel/AMD x86 machine or native ARM64 hardware like a Raspberry Pi 5, this guide has you covered.
⚡ *What You'll Learn:*
How to install QEMU for ARM64 on Ubuntu, Debian, Fedora, and Arch
The difference between emulation (TCG) and hardware acceleration (KVM)
Full command breakdown for qemu-system-aarch64
UEFI firmware setup for ARM64 using qemu-efi-aarch64 / edk2-aarch64
How to use Quickemu for the easy, automated method
Performance optimization tips and troubleshooting
📌 *Timestamps:*
0:00 - What you'll learn
1:30 - ARM64 vs x86 explained
3:00 - Installing QEMU for ARM64
4:30 - Creating ARM64 VM on x86 (Emulation)
7:00 - Booting your installed VM
9:00 - ARM64 VM on ARM64 host (KVM acceleration)
11:30 - Quickemu easy method
13:00 - Troubleshooting & performance tips
📋 *Quick Commands:*
Check your architecture:
uname -m
Install QEMU ARM64 (Ubuntu/Debian):
sudo apt install qemu-system-arm qemu-utils qemu-efi-aarch64
Create a virtual disk:
qemu-img create -f qcow2 arm64-vm.qcow2 20G
Boot ARM64 VM on x86 (Emulation):
qemu-system-aarch64 -machine virt,gic-version=3 -cpu cortex-a72 -accel tcg,thread=multi -smp 4 -m 4096 -drive if=pflash,format=raw,file=efi.img,readonly=on -drive if=pflash,format=raw,file=varstore.img -drive file=arm64-vm.qcow2,format=qcow2,if=virtio -cdrom ubuntu-24.04-live-server-arm64.iso -device virtio-net-pci,netdev=net0 -netdev user,id=net0 -vnc :1
Boot ARM64 VM on ARM64 host (KVM Acceleration):
qemu-system-aarch64 -machine virt,accel=kvm,gic-version=host -cpu host -smp 4 -m 4096 -drive if=pflash,format=raw,file=/usr/share/AAVMF/AAVMF_CODE.fd,readonly=on -drive if=pflash,format=raw,file=varstore.img -drive file=arm64-vm.qcow2,format=qcow2,if=virtio -device virtio-net-pci,netdev=net0 -netdev user,id=net0 -nographic
Quickemu method (Easiest):
sudo add-apt-repository ppa:flexiondotorg/quickemu
sudo apt update && sudo apt install quickemu
quickget ubuntu 24.04 arm64
quickemu --vm ubuntu-24.04.conf
🐛 *Common Fixes:*
"Network backend not compiled" → Use distro QEMU package, not custom build
"KVM not available" → Check BIOS virtualization + run: ls /dev/kvm
UEFI boot fails → Locate firmware: find /usr -name "*AAVMF*" 2>/dev/null
⚡ QUICK REFERENCE ⚡
Detect your architecture:
uname -m
🔹 On x86/AMD64 (slow emulation):
qemu-system-aarch64 -machine virt -cpu cortex-a72 -accel tcg -m 4G -cdrom ubuntu.iso -vnc :1
🔹 On ARM64 (fast KVM):
qemu-system-aarch64 -machine virt,accel=kvm -cpu host -m 4G -nographic
🔹 Easiest method (Quickemu):
quickget ubuntu 24.04 arm64 && quickemu --vm ubuntu-24.04.conf
💡 *Use Cases for ARM64 VMs:*
Test ARM64 software without owning ARM hardware
Cross-compilation and CI/CD pipelines
Embedded Linux development
Running Raspberry Pi OS in a VM
Cloud-native development (AWS Graviton, Azure Cobalt)
🛠 *My Setup:*
Host: Ubuntu 24.04 / Fedora 40
QEMU version: 8.2+
Guest: Ubuntu Server 24.04 ARM64
❓ *Questions?* Drop your questions below 👇 and I'll help out.
*Links/Sources:*
Raspberry Pi logo from the link below.
https://www.raspberrypi.com/trademark...
QEMU logo source
https://commons.wikimedia.org/wiki/Fi...
#QEMU #ARM64 #AArch64 #VirtualMachine #KVM #Linux #Ubuntu #RaspberryPi #DevOps #Virtualization #Homelab #TechTutorial #OpenSource #CommandLine #SysAdmin