QEMU
By QEMU Project
QEMU is an open-source machine emulator and virtualizer that can run guest operating systems for a different CPU architecture through full software emulation, or accelerate virtual machines on matching hardware by delegating CPU execution…
Definition
QEMU is an open-source machine emulator and virtualizer that can run guest operating systems for a different CPU architecture through full software emulation, or accelerate virtual machines on matching hardware by delegating CPU execution to a hypervisor such as KVM. It emulates a wide range of virtual devices, including disks, network cards, and graphics adapters, making it the userspace component most Linux-based virtualization stacks rely on.
Overview
Developers and system engineers sometimes need to run software built for hardware they don't physically have, such as testing an ARM-based embedded image on an x86 workstation, or booting an operating system without dedicated virtualization hardware. QEMU solves this by emulating an entire machine in software, translating instructions from the guest architecture to the host architecture at runtime. When run purely as an emulator, QEMU uses dynamic binary translation to convert guest CPU instructions into equivalent host instructions on the fly, which works across mismatched architectures but carries a performance cost. When the guest and host architectures match, QEMU can instead hand CPU execution off to a hardware-accelerated hypervisor like KVM, using its own code only to emulate the surrounding virtual devices such as storage controllers, network interfaces, and firmware, which is dramatically faster than full emulation. This dual role sets QEMU apart from KVM, which provides no device emulation on its own, and from dedicated hypervisors like Xen Project or VMware ESXi, which are built around fast native execution rather than cross-architecture emulation. QEMU is typically the piece users actually interact with, launching virtual machines and configuring their virtual hardware, even when KVM is doing the CPU-level work underneath. QEMU is widely used for cross-compiling and testing embedded and mobile software, for running legacy operating systems, for cloud platforms that need to boot guest images, and for security research where isolating and inspecting a suspicious binary in an emulated environment is valuable. Container build tools also use QEMU's user-mode emulation to build multi-architecture images on a single host, and developers frequently reach for it locally through wrapper tools that hide its command-line complexity behind a simpler interface for spinning up test virtual machines. Pure emulation without hardware acceleration is significantly slower than native or KVM-accelerated execution, which limits QEMU's use for latency-sensitive workloads when architectures don't match. Its command-line configuration is also complex, which is why most production deployments wrap it with a management layer such as libvirt rather than invoking QEMU directly. Because QEMU aims for broad architecture and device coverage, it is not the fastest option for any single narrow use case, and specialized tools, such as Firecracker for microVMs or dedicated cross-compilers for a single target, can outperform it within their narrower scope, so teams choosing between them typically weigh QEMU's generality against a narrower tool's speed for the specific workload at hand, and many production stacks end up using several of these tools together, each covering the part of the problem it handles best.
Key Features
- Emulates CPU architectures different from the host through dynamic translation
- Accelerates matching-architecture guests by delegating execution to KVM
- Emulates a broad catalog of virtual disks, network, and graphics devices
- Supports user-mode emulation for running single binaries across architectures
- Provides snapshotting of running virtual machine state
- Underpins multi-architecture container image builds through binfmt integration
- Works headless or with a graphical console for interactive guests
- Open source and scriptable through a monitor protocol and command line