Install Ubuntu on QEMU (ARM64)¶
In the description below we use QEMU invoked from the command line interface to launch an ARM 64-bit virtual machine. You could instead use a GUI based tool like Virt-Manager.
Prerequisites¶
To boot an ARM64 bit virtual machine you will need the following packages
qemu-system-arm – QEMU is used to emulate the ARM machine.
qemu-efi-aarch64 – EDK II is the reference implementation of the UEFI API.
The packages can be installed with the following commands:
sudo apt update
sudo apt install qemu-system-arm qemu-efi-aarch64
Installing Ubuntu¶
Download one of the supported images:
Server without desktop
Ubuntu 25.10 (Questing Quokka) images:
Ubuntu 24.04.4 LTS (Noble Numbat) images:
Desktop
Ubuntu 25.10 (Questing Quokka) images:
Copy the file to store EFI variables to the working directory:
cp /usr/share/AAVMF/AAVMF_CODE.fd .
This file is written to during the installation process.
Create the disk image onto which you will install Ubuntu; 16 GiB should be enough:
truncate -s 16G disk
Start the installer with:
qemu-system-aarch64 \ -M virt,gic-version=3 \ -m 4096 \ -smp 4 \ -cpu max \ -serial mon:stdio \ -device virtio-gpu-pci \ -device qemu-xhci \ -device usb-kbd \ -device usb-tablet \ -drive if=pflash,format=raw,unit=0,file=/usr/share/AAVMF/AAVMF_CODE.fd,readonly=on \ -drive if=pflash,format=raw,unit=1,file=AAVMF_VARS.fd \ -drive if=none,file=disk,format=raw,id=VIRTIO1 \ -device virtio-blk,drive=VIRTIO1,bootindex=1 \ -drive if=none,file=ubuntu-live-server-arm64.iso,format=raw,readonly=on,id=VIRTIO2 \ -device virtio-blk,drive=VIRTIO2,bootindex=2 \ -net nic,model=virtio \ -net user
Replace the ISO file name according to your download.
Some important options to use are:
- -accel kvm
Add this option to use KVM acceleration if your host is an ARM system that supports it.
- -cpu
controls the emulated CPU
- -M
selects the platform emulated by QEMU. Version 3 or higher of the ARM Generic Interrupt Controller (GIC) is needed if you want to emulate more than eight CPUs.
- -m
specifies the memory size
- -smp
specifies the number of CPUs
Follow the installation steps in Ubuntu Server installation tutorial or the Ubuntu Desktop installation tutorial.
Running Ubuntu¶
When running the installed image you won’t need to reference the ISO anymore:
qemu-system-aarch64 \
-M virt,gic-version=3 \
-m 4096 \
-smp 4 \
-cpu max \
-serial mon:stdio \
-device virtio-gpu-pci \
-device qemu-xhci \
-device usb-kbd \
-device usb-tablet \
-drive if=pflash,format=raw,unit=0,file=/usr/share/AAVMF/AAVMF_CODE.fd,readonly=on \
-drive if=pflash,format=raw,unit=1,file=AAVMF_VARS.fd \
-drive if=none,file=disk,format=raw,id=VIRTIO1 \
-device virtio-blk,drive=VIRTIO1,bootindex=1 \
-net nic,model=virtio \
-net user