Virtualization runs guests on the same CPU architecture at near-native speed. Emulation translates instructions from one architecture to another, which is slower but lets you run, for example, ARM software on an Intel or AMD server. This guide shows how to use QEMU emulation to run ARM on x86.
Before you start
- A Linux machine (a VPS works; emulation does not need KVM).
- Patience: emulated systems typically run several times slower than native.
Emulation vs virtualization
| Virtualization (KVM) | Emulation (QEMU TCG) | |
|---|---|---|
| Guest architecture | Same as host | Any supported |
| Speed | Near native | Much slower |
| Needs VT-x/AMD-V | Yes | No |
| Use | Production VMs | Testing, cross-builds, legacy systems |
See full vs paravirtualization for virtualization techniques.
Run a full ARM64 VM
sudo apt install -y qemu-system-arm qemu-efi-aarch64 qemu-utilsDownload an ARM64 cloud image (e.g. Ubuntu's noble-server-cloudimg-arm64.img), then:
qemu-img resize noble-server-cloudimg-arm64.img 20Gqemu-system-aarch64 -M virt -cpu max -smp 2 -m 2048 -bios /usr/share/qemu-efi-aarch64/QEMU_EFI.fd -drive if=virtio,file=noble-server-cloudimg-arm64.img -drive if=virtio,format=raw,file=seed.img -nic user,hostfwd=tcp::2222-:22 -nographicThe seed.img is a cloud-init NoCloud disk with your user and SSH key (create it with cloud-localds; see cloud-init user-data). Then ssh -p 2222 user@localhost.
Run single ARM binaries with qemu-user
sudo apt install -y qemu-user-static binfmt-supportbinfmt registers handlers so the kernel automatically runs foreign binaries through QEMU. Check:
ls /proc/sys/fs/binfmt_misc/ | grep qemuBuild multi-arch Docker images
With binfmt handlers installed, Docker Buildx can build ARM images on x86:
docker buildx create --use --name multidocker buildx build --platform linux/amd64,linux/arm64 -t registry.example.com/app:latest --push .Emulated builds are slow; native ARM builders are faster for large projects.
Troubleshooting
- "exec format error": binfmt handlers are not registered; reinstall
qemu-user-staticor run the binfmt setup container. - VM hangs at boot with no output: wrong firmware path or missing
-nographic/serial console. - Extremely slow: expected for emulation; reduce workload or use native hardware.
Frequently asked questions
Can KVM accelerate ARM guests on x86?
No. KVM only accelerates guests of the host's own architecture.
Is Apple's Rosetta the same idea?
It is also binary translation, highly optimised for one direction (x86 to ARM).
Should I run production ARM workloads emulated?
No, rent ARM hardware instead; see ARM servers explained.
