Pcornel
Virtualization

KVM / QEMU

Cheat sheet · https://pcornel.dk/topic.php?topic=383

Back to the Topic

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 versions
  • virsh list --all — domains
  • virsh 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 list
virsh dominfo
virsh 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

BoundaryWhat to verifyEvidence limit
Definition/configExpected KVM / QEMU definition or configuration is presentConfigured state does not prove runtime behavior
RuntimeRelevant KVM/QEMU/libvirt object or process is active without matching errorsRuntime state does not prove dependencies or guest outcome
DependencyHost CPU/memory, storage, network or device backend required by this path is healthyLocal success does not prove the next boundary
AcceptanceOriginal guest/application test succeeds after the change or observationRequired 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

Confirmation

Confirm action

Continue?