KVM / QEMU
Cheat sheet · https://pcornel.dk/topic.php?topic=383
Answer
Separate the stack into Linux host/kernel, KVM accelerator, QEMU process and machine/device model, libvirt management state, backing storage/network/device resources, guest OS and workload.
Remember
- KVM is not the whole virtual machine manager; it is a Linux kernel virtualization facility used by userspace such as QEMU.
- QEMU can run with KVM acceleration or with software emulation such as TCG; QEMU running does not by itself prove KVM acceleration is active.
- libvirt domain state is management-plane state and does not prove guest or application health.
- A VM problem can originate below QEMU in host CPU, memory, storage, networking, kernel or device assignment.
First checks
virsh version— libvirt and QEMU versionsvirsh list --all— domainsvirsh capabilities | head -30— host capabilities
Commands
virsh- The primary libvirt CLI for inspecting and managing domains, networks, storage and host capabilities. Prefer read-only …
virsh list --all- Local state
virsh listvirsh dominfovirsh domiflist
Verify in this order
libvirt API → QEMU process → KVM → guest
Where it usually breaks
First mismatch in management intent → host/cluster capability → hypervisor runtime/task → virtual resource/device → guest state → workload-visible read-back; preserve identity/native error/pre-state before mutation.
KVM / QEMU reference map
| Boundary | What to verify | Evidence limit |
|---|---|---|
| Definition/config | Expected KVM / QEMU definition or configuration is present | Configured state does not prove runtime behavior |
| Runtime | Relevant KVM/QEMU/libvirt object or process is active without matching errors | Runtime state does not prove dependencies or guest outcome |
| Dependency | Host CPU/memory, storage, network or device backend required by this path is healthy | Local success does not prove the next boundary |
| Acceptance | Original guest/application test succeeds after the change or observation | Required for end-to-end closure |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=383