Use it to understand the VM process and disk images, or when a VM fails to start.
QEMU
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.
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.
libvirt starts a QEMU process → virtual devices → disk image and network backends → guest boots
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
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
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 · 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.
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.
qemu-img info <image>— disk image detailsvirsh list --all— VMs and statevirsh dominfo <vm>— CPU, memory, autostartvirsh domiflist <vm> / domblklist <vm>— NICs and diskslscpu | 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
| Format | Properties | Typical use |
|---|---|---|
| qcow2 | Thin provisioning, internal snapshots, backing files, compression | General VM disks |
| raw | Plain image; best performance; no features | Performance-critical disks, LVM/SAN volumes |
| vmdk, vhdx | VMware and Hyper-V formats | Import and export |
qemu-img for image work
| Task | Command |
|---|---|
| Create a thin image | qemu-img create -f qcow2 vm01.qcow2 40G |
| Inspect | qemu-img info vm01.qcow2 |
| Grow | qemu-img resize vm01.qcow2 +20G (VM shut off) |
| Convert from VMware | qemu-img convert -f vmdk -O qcow2 old.vmdk new.qcow2 |
| Create an overlay on a base image | qemu-img create -f qcow2 -b base.qcow2 -F qcow2 vm02.qcow2 |
| Check consistency | qemu-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.
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.
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
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
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%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.
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.
Quick lookup tables
QEMU operational reference
Topic-specific lookup boundaries, proof limits and next-step Evidence for QEMU.
| Lookup boundary | Topic-specific reference | Operational use |
|---|---|---|
| Scope / effective state | QEMU 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 verification | Pin 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 chain | QEMU invocation/definition → machine/CPU model → memory → block devices → NICs → KVM acceleration → guest firmware/boot → guest | Trace requested/configured state through effective state to the observed workload result. |
| Failure boundary | A 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 evidence | Correlated Linux container/virtualization evidence can establish this proof path: QEMU invocation/definition → machine/CPU model → memory → block devices → NICs → KVM acceleration → guest firmware/boot → guest | Use this observation only for the specific claim it actually supports. |
| Evidence limit | It 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 check | Continue 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 boundary | QEMU |
|---|---|
| Topic path | Virtualization → QEMU |
| Runtime state | QEMU 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 chain | QEMU 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 boundary | A 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 rule | Prove which configuration source owns the state, then prove that the running consumer loaded or generated the intended state. |