Pcornel
Virtualization · KVM / QEMU

KVM

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

Back to the Topic

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_amd
  • ls -l /dev/kvm — device present
  • virt-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

BoundaryWhat to verifyEvidence limit
Definition/configExpected KVM / QEMU → KVM 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=3789

Confirmation

Confirm action

Continue?