KVM
Cheat sheet · https://pcornel.dk/topic.php?topic=3789
Answer
KVM turns Linux into a virtualization host by using CPU virtualization extensions and kernel interfaces for vCPU execution, memory mappings and interrupt/device acceleration while QEMU remains the userspace VMM/device model.
Remember
- KVM enabled in the kernel ≠ a specific QEMU VM using KVM acceleration.
- CPU virtualization extensions present ≠ enabled in firmware or usable by the kernel.
- KVM accelerates guest execution but does not replace QEMU device models or backing storage/network paths.
- Near-native CPU execution ≠ near-native application performance when memory, I/O or scheduling is constrained.
First checks
lsmod | grep kvm— kvm and kvm_intel/kvm_amdls -l /dev/kvm— device presentvirt-host-validate qemu— host readiness
Verify in this order
CPU VT → kvm module → /dev/kvm → QEMU
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 → KVM reference map
| Boundary | What to verify | Evidence limit |
|---|---|---|
| Definition/config | Expected KVM / QEMU → KVM 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=3789