Mar 17, 2025
Advanced QEMU Options on macOS: Accelerate ARM64 Virtualization
Explore advanced QEMU options for ARM64 on macOS, including CPU optimization, acceleration techniques, and network configuration for seamless virtualization.
Author

Subject Matter Expert

Book a call
Table of Contents
QEMU is a versatile and powerful emulator that allows you to run various operating systems and architectures on your host system. In this article, we will dive into advanced QEMU options, with a specific focus on acceleration techniques, using qemu-system-aarch64 as our base command. This command is used for emulating the ARM64 architecture and is a popular choice for working with ARM-based systems. This tutorial is intended for macOS with Apple Silicon chips.
Prerequisites:
Before we explore advanced QEMU options, ensure you have the following prerequisites in place:
A working installation of QEMU.
Basic knowledge of QEMU commands and usage.
A compatible ARM64 guest image (e.g., an ARM64 Linux distribution).
A bootable Alpine Linux image for use as the guest operating system in QEMU.
A VARSTORE image (varstore.img) for persistent storage.
QEMU's EFI image for UEFI-based virtual machines.
If you lack any of these prerequisites, you can obtain them by following the instructions in the provided link: "Creating a Lightweight Alpine Linux Virtual Machine on macOS with QEMU."
The following QEMU command is a powerful and feature-rich example that can be used to create and run a virtual machine with specific configurations. Let's break down each part of the command to understand its purpose:
Explanation of Command Parts:
qemu-system-aarch64:
- Specifies the QEMU binary for the aarch64 (ARM64) architecture.
-cpu max:
- Sets the CPU model to 'max,' which makes use of the host's maximum available CPU features.
-smp 4:
- Configures the number of virtual processors to 4, allowing for multi-threaded execution.
-accel hvf:
- Specifies the acceleration mode 'hvf' (Hardware Virtualization Framework), suitable for macOS host systems.
-M virt:
- Sets the machine type to 'virt,' which is a versatile platform used for virtualization.
-m 4G:
- Allocates 4 GB of RAM for the virtual machine.
-nographic:
- Disables graphical output, making it suitable for text-based or headless operation.
-drive if=pflash,format=raw,file=QEMU_EFI.img:
- Configures the first drive as a flash memory device with the provided QEMU EFI firmware image.
-drive if=pflash,file=varstore.img:
- Adds another drive for persistent storage using the specified VARSTORE image.
-drive if=virtio,file=alpine.img:
- Attaches a virtual drive using the VirtIO interface, with 'alpine.img' as its content. Please note that 'alpine.img' refers to the previously prepared Alpine Linux image.
-netdev user,id=eth0,hostfwd=tcp::2222-:22:
- Sets up a virtual network device ('eth0') and forwards host port 2222 to port 22 within the virtual machine, facilitating SSH access.
-device virtio-net-pci,netdev=eth0:
- Defines a VirtIO-based network device and associates it with the 'eth0' network device.
Conclusion:
Unlocking the advanced concepts in QEMU empowers you to create and manage highly customizable virtual machines, tailored to your specific requirements. By understanding and manipulating these command-line options, you can harness the full potential of QEMU for your development, testing, or legacy system emulation projects. Experiment and explore, and see how QEMU can elevate your virtualization endeavors to new heights.
Related Articles.
More from the engineering frontline.
Dive deep into our research and insights on design, development, and the impact of various trends to businesses.

Apr 23, 2026
From Manual Testing to AI-Assisted Automation with Playwright Agents
This blog discusses the value of Playwright Agents in automating workflows. It provides a detailed description of setting up the system, as well as a breakdown of the Playwright Agent’s automation process.

Apr 14, 2026
The Keyboard Bounce of Death: Handling Inputs on Complex React Native Screens
Fix the React Native ‘Keyboard Bounce of Death.’ Learn why inputs jump and how to build smooth, production-ready forms with modern architecture.

Apr 9, 2026
From RFPs to Revenue: How We Built an AI Agent Team That Writes Technical Proposals in 60 Seconds
GeekyAnts built DealRoom.ai — four AI agents that turn RFPs into accurate technical proposals in 60 seconds, with real-time cost breakdowns and scope maps.

Apr 6, 2026
How We Built an AI System That Automates Senior Solution Architect Workflows
Discover how we built a 4-agent AI co-pilot that converts complex RFPs into draft technical proposals in 15 minutes — with built-in conflict detection, assumption surfacing, and confidence scoring.

Apr 6, 2026
AI Code Healer for Fixing Broken CI/CD Builds Fast
A deep dive into how GeekyAnts built an AI-powered Code Healer that analyzes CI/CD failures, summarizes logs, and generates code-level fixes to keep development moving.

Apr 2, 2026
A Real-Time AI Fraud Decision Engine Under 50ms
A deep dive into how GeekyAnts built a real-time AI fraud detection system that evaluates transactions in milliseconds using a hybrid multi-agent approach.