Pcornel
Browse topics
Options
Recent
Favorites
Linux · Technical reference

QEMU

Direct answer

QEMU is the user-space emulator that runs each VM as a process, providing virtual hardware (disks, NICs, display) and using KVM for CPU acceleration. Disk images are usually qcow2 or raw.

When to use this

Use it to understand the VM process and disk images, or when a VM fails to start.

First 30 seconds

1. ps -ef | grep qemu — VM process running?

2. VM log: /var/log/libvirt/qemu/<vm>.log.

3. Disk: qemu-img info <image> — format, virtual and actual size, backing file.

4. Corruption: qemu-img check <image> (VM off).

5. Resize: qemu-img resize, then grow inside the guest.

Operational verification

libvirt starts a QEMU process → virtual devices → disk image and network backends → guest boots

Evidence · next step

For Virtualization → QEMU, continue with the first unproven Topic check: Pin exact host, runtime/hypervisor, object identity, source revision/image/definition and failing workload. If that boundary is healthy, advance to the adjacent check: Read back effective runtime state including process, namespace/resource or virtual-hardware boundaries. Preserve the same host/time/identity scope and rerun the original workload before accepting recovery.

Continue only after interpreting the current observation.
Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
linux
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

Platformlinux
Scope / prerequisiteUse it to understand the VM process and disk images, or when a VM fails to start.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

5 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Operational evidence path Verify boundary

QEMU invocation/definition → machine/CPU model → memory → block devices → NICs → KVM acceleration → guest firmware/boot → guest

Healthy evidence: the expected QEMU process has intended machine, CPU, memory, block/network devices and acceleration and the guest boots correctly

Step 2 Verification and output interpretation Verify boundary

Verification chain. QEMU invocation/definition → machine/CPU model → memory → block devices → NICs → KVM acceleration → guest firmware/boot → guest

Step 3 Commands Verify boundary
qemu-system-x86_64 --version
qemu-img info disk.qcow2
Step 4 Failure modes and next checks Narrow the fault

Suspicious evidence: process exists with fallback emulation, wrong disk/NIC/firmware, device errors or guest boot failure

A live QEMU process does not show the intended devices, acceleration mode or guest workload are correct.

Step 5 Common mistakes Narrow the fault
  • Running qemu without KVM acceleration.
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points

Each running VM is a qemu-kvm/qemu-system process on the host. qcow2 supports snapshots and thin provisioning; raw is faster. Check images with qemu-img info and qemu-img check.

Key checks
  • qemu-img info <image> — disk image details
  • virsh list --all — VMs and state
  • virsh dominfo <vm> — CPU, memory, autostart
  • virsh domiflist <vm> / domblklist <vm> — NICs and disks
  • lscpu | grep -i virtualization — hardware virtualization support
ReferenceImportant terms & boundaries5 sections · depth on demand

What this shows and what it does not

A live QEMU process does not show the intended devices, acceleration mode or guest workload are correct.

In depth

QEMU: virtual hardware and disk images

QEMU provides the virtual machine itself: CPU model, memory, firmware, disks and network devices. The QEMU documentation describes two modes:

  • System emulation models a whole machine. The CPU can be emulated, or the guest can run directly on the host CPU with a hypervisor such as KVM.
  • User-mode emulation runs individual programs built for another architecture, for example ARM binaries on an x86 host. The CPU is always emulated in this mode.

Disk image formats

FormatPropertiesTypical use
qcow2Thin provisioning, internal snapshots, backing files, compressionGeneral VM disks
rawPlain image; best performance; no featuresPerformance-critical disks, LVM/SAN volumes
vmdk, vhdxVMware and Hyper-V formatsImport and export

qemu-img for image work

TaskCommand
Create a thin imageqemu-img create -f qcow2 vm01.qcow2 40G
Inspectqemu-img info vm01.qcow2
Growqemu-img resize vm01.qcow2 +20G (VM shut off)
Convert from VMwareqemu-img convert -f vmdk -O qcow2 old.vmdk new.qcow2
Create an overlay on a base imageqemu-img create -f qcow2 -b base.qcow2 -F qcow2 vm02.qcow2
Check consistencyqemu-img check vm01.qcow2

Backing files

An overlay image stores only the changes relative to its backing file. Many VMs can share one base image. But the base must never change while overlays depend on it, or the overlays become corrupt.

Running QEMU directly (without libvirt)

That's useful in labs and for testing. On servers, libvirt normally generates the command line.

host$ qemu-img create -f qcow2 /var/lib/libvirt/images/lab01.qcow2 20G
host$ qemu-img info /var/lib/libvirt/images/web01.qcow2
image: /var/lib/libvirt/images/web01.qcow2
file format: qcow2
virtual size: 40 GiB (42949672960 bytes)
disk size: 7.9 GiB
backing file: /var/lib/libvirt/images/base-ubuntu24.qcow2
host$ qemu-system-x86_64 -enable-kvm -m 2048 -smp 2 -cpu host \
    -drive file=/var/lib/libvirt/images/lab01.qcow2,if=virtio \
    -cdrom ubuntu-24.04-live-server-amd64.iso -nic user,model=virtio-net-pci -nographic
host$ qemu-aarch64-static ./hello-arm64
host$ sudo qemu-img check /var/lib/libvirt/images/web01.qcow2
No errors were found on the image.

Reading qemu-img info

The 40 GiB virtual disk uses only 7.9 GiB on the host, because qcow2 allocates space as it's written. It also depends on a shared base image. Thin provisioning makes it possible to overcommit storage, so monitor the host's free space. A full host disk pauses or corrupts the guests.

Documented example, not captured output.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

How it works at runtime

QEMU is part of Virtualization → QEMU. QEMU is the userspace virtual machine monitor/device model that can use KVM acceleration and owns the process-level VM execution boundary.

Runtime state ownership and mechanics. Containers isolate processes with namespaces/cgroups and a layered filesystem while sharing the host kernel; KVM/QEMU virtual machines provide virtual hardware to a guest with stronger kernel separation.

Topic-specific state model. QEMU is the userspace virtual machine monitor/device model that can use KVM acceleration and owns the process-level VM execution boundary.

Quick reference

QEMU usage outside libvirt — quick tests and image tools:

qemu-img create -f qcow2 test.qcow2 20G
qemu-system-x86_64 -enable-kvm -m 4096 -smp 2 -cpu host -drive file=test.qcow2,if=virtio -cdrom debian.iso -boot d -nic user,model=virtio-net-pci
qemu-img info --backing-chain disk.qcow2
qemu-img convert -p -O qcow2 disk.vmdk disk.qcow2

-nic user gives simple NAT networking without root; production VMs use libvirt-managed bridges. QEMU without -enable-kvm falls back to software emulation (TCG), which is very slow.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

Limits and how it fails

Primary failure point. A live QEMU process does not show the intended devices, acceleration mode or guest workload are correct.

Snapshot/image existence is not a verified backup.

ReferenceConfiguration & state1 section · depth on demand

Configuration, persistence and lifecycle

Distribution/platform context. QEMU owns userspace VMM/device emulation; libvirt may generate/manage its effective invocation.

Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor doclinux current

Authoritative/upstream documentation reviewed for bounded claims in Virtualization → QEMU. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://docs.kernel.org/virt/kvm/index.html · confidence 94%
Technical changelog & impact

What changed and what may be affected

Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.

Related reference impactReview these references after material technical changes when their shared boundary is affected.
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
qemu linuxqemu kvmvirtual machine monitor linux
Embedded reference data

Quick lookup tables

QEMU operational reference

Topic-specific lookup boundaries, proof limits and next-step Evidence for QEMU.

Lookup boundaryTopic-specific referenceOperational use
Scope / effective stateQEMU is the userspace virtual machine monitor/device model that can use KVM acceleration and owns the process-level VM execution boundary.Establish exactly what this Topic owns before crossing into another subsystem.
Fast verificationPin host + object identity + source image/definition → verify host/runtime capability → read back effective process/namespace/cgroup or virtual-hardware state → verify storage/network attachments → verify guest/container readiness → repeat original workload + regression check.Use the shortest evidence path first; a fast check is a boundary test, not blanket proof.
Verification chainQEMU invocation/definition → machine/CPU model → memory → block devices → NICs → KVM acceleration → guest firmware/boot → guestTrace requested/configured state through effective state to the observed workload result.
Failure boundaryA live QEMU process does not prove the intended devices, acceleration mode or guest workload are correct.Stop broad troubleshooting at the first boundary that is not supported by evidence.
Positive evidenceCorrelated Linux container/virtualization evidence can establish this proof path: QEMU invocation/definition → machine/CPU model → memory → block devices → NICs → KVM acceleration → guest firmware/boot → guestUse this observation only for the specific claim it actually supports.
Evidence limitIt does not independently prove unobserved clients, names, identities, routes, sessions, backends or time periods. A live QEMU process does not prove the intended devices, acceleration mode or guest workload are correct.Do not promote a local success signal into end-to-end or adjacent-dependency proof.
Next troubleshooting checkContinue from the first unproven runtime boundary, capture adjacent host/object/resource/attachment evidence, make only the demonstrated persistent change, then repeat the original workload plus a regression check.Continue to the next unresolved boundary while preserving the original test condition.

QEMU · operational reference

Compact Linux state, persistence, verification and boundary reference for fast lookup.

Reference boundaryQEMU
Topic pathVirtualization → QEMU
Runtime stateQEMU is the userspace virtual machine monitor/device model that can use KVM acceleration and owns the process-level VM execution boundary.
Fast checks- Pin exact host, runtime/hypervisor, object identity, source revision/image/definition and failing workload. - Read back effective runtime state including process, namespace/resource or virtual-hardware boundaries. - Trace storage and network attachments plus readiness from the real client or dependent workload path. - Apply the smallest persistent change, then repeat the original workload and an adjacent regression check.
Verification chainQEMU invocation/definition → machine/CPU model → memory → block devices → NICs → KVM acceleration → guest firmware/boot → guest Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return/regression → explicit Evidence boundary.
Failure boundaryA live QEMU process does not prove the intended devices, acceleration mode or guest workload are correct. Boundary chain: process/context → userspace configuration → kernel subsystem/resource → device/network/filesystem dependency → effective state → original workload.
Persistence ruleProve which configuration source owns the state, then prove that the running consumer loaded or generated the intended state.
Confirmation

Confirm action

Continue?