Use it when VMs are slow (no acceleration) or fail with "KVM not available".
KVM
KVM (Kernel-based Virtual Machine) is the Linux kernel module (kvm_intel or kvm_amd) that uses CPU virtualization extensions so guests run at near-native speed.
1. lscpu | grep -E 'vmx|svm|Virtualization'.
2. lsmod | grep kvm — kvm_intel/kvm_amd loaded?
3. ls -l /dev/kvm — present, group kvm?
4. Nested: cat /sys/module/kvm_intel/parameters/nested.
5. virt-host-validate — summary.
CPU extensions enabled → kvm module loaded → /dev/kvm → QEMU uses KVM acceleration
For Virtualization → KVM, 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
CPU VT-x/AMD-V → KVM kernel modules/device → permissions/capability → userspace VMM → vCPU execution → guest
Healthy evidence: CPU extensions, KVM modules and device access support accelerated guest execution for the intended VMM
Step 2 Verification and output interpretation Verify boundary
Verification chain. CPU VT-x/AMD-V → KVM kernel modules/device → permissions/capability → userspace VMM → vCPU execution → guest
Step 3 Commands Verify boundary
lsmod | grep kvm
virt-host-validate
Step 4 Failure modes and next checks Narrow the fault
Suspicious evidence: modules are loaded but nested virtualization, permissions, CPU model, host resource pressure or userspace VMM prevents usable guest execution
Step 5 Common mistakes Narrow the fault
- Virtualisation disabled in firmware.
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.
Enable VT-x/AMD-V in firmware. Inside a VM, nested virtualization must be enabled on the outer host. Users need access to /dev/kvm (kvm group).
virt-host-validate— host virtualization checksvirsh 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
KVM module/device availability shows host virtualization capability, not that a particular VM definition or guest workload is healthy.
In depth
KVM: the kernel hypervisor
KVM (Kernel-based Virtual Machine) turns the Linux kernel into a hypervisor. The kernel's KVM documentation covers the API used by user-space tools such as QEMU, and the architectures KVM supports: x86, ARM, s390, PowerPC and LoongArch. It also covers features such as nested virtualization, halt polling, VFIO device assignment, and confidential computing (Intel TDX, AMD SEV).
Requirements
| Requirement | Check |
|---|---|
| CPU extensions (Intel VT-x, AMD-V) | grep -E 'vmx|svm' /proc/cpuinfo |
| Enabled in firmware | Otherwise kvm_intel/kvm_amd fail to load: "disabled by bios" |
| Modules loaded | lsmod | grep kvm |
Access to /dev/kvm | Users in the kvm group, or libvirt |
Performance features
| Feature | Effect |
|---|---|
| virtio devices | Paravirtual disk and network; far faster than emulated hardware |
| Huge pages | Fewer TLB misses for memory-heavy guests |
| CPU pinning | Dedicated host cores for latency-sensitive VMs |
host-passthrough CPU model | All host CPU features visible to the guest (limits migration) |
| VFIO / PCI passthrough | A physical device (NIC, GPU) given directly to a guest |
| Nested virtualization | VMs inside VMs (labs, CI) |
Nested virtualization
| Step | Command |
|---|---|
| Check | cat /sys/module/kvm_intel/parameters/nested (Y or 1) |
| Enable permanently | options kvm_intel nested=1 in /etc/modprobe.d/kvm.conf, then reload the module |
| Give the guest the extension | CPU mode host-passthrough |
host$ dmesg | grep -i -E "kvm|vmx" | head -3
kvm_intel: VMX not supported by CPU 0
host$ dmesg | grep -i "disabled by bios"
kvm: disabled by bios
host$ ls -l /dev/kvm
crw-rw----+ 1 root kvm 10, 232 Nov 28 08:59 /dev/kvm
host$ cat /sys/module/kvm_intel/parameters/nested
Y
host$ echo "options kvm_intel nested=1" | sudo tee /etc/modprobe.d/kvm.conf
host$ sudo perf kvm stat live -d 5 2>/dev/null | head
"disabled by bios"
This message means the CPU supports virtualization, but it's turned off in the firmware settings. Enable "Intel Virtualization Technology", "VT-x" or "SVM Mode" in the firmware setup and reboot. Without it, VMs either fail to start, or fall back to slow full emulation.
Documented example, not captured output.
How it works at runtime
KVM is part of Virtualization → KVM. KVM exposes Linux kernel virtualization facilities using hardware extensions and provides the execution foundation commonly consumed by QEMU/libvirt.
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. KVM exposes Linux kernel virtualization facilities using hardware extensions and provides the execution foundation commonly consumed by QEMU/libvirt.
Quick reference
KVM host preparation:
grep -cE 'vmx|svm' /proc/cpuinfo
modprobe kvm_intel # or kvm_amd
ls -l /dev/kvm
dnf install @virtualization # RHEL family
apt install qemu-kvm libvirt-daemon-system virtinst bridge-utils # Debian/Ubuntu
usermod -aG libvirt,kvm alice
Enable VT-x/AMD-V (and VT-d/AMD-Vi for passthrough) in firmware. Tune hosts with tuned-adm profile virtual-host, hugepages for memory-heavy VMs, and the performance CPU governor for latency-sensitive guests.
Limits and how it fails
Primary failure point. KVM module/device availability shows host virtualization capability, not that a particular VM definition or guest workload is healthy.
Snapshot/image existence is not a verified backup.
ReferenceConfiguration & state1 section · depth on demand
Configuration, persistence and lifecycle
Distribution/platform context. KVM owns kernel virtualization capability; QEMU owns device emulation/process execution and libvirt owns management abstraction.
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 → KVM. 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
KVM operational reference
Topic-specific lookup boundaries, proof limits and next-step Evidence for KVM.
| Lookup boundary | Topic-specific reference | Operational use |
|---|---|---|
| Scope / effective state | KVM exposes Linux kernel virtualization facilities using hardware extensions and provides the execution foundation commonly consumed by QEMU/libvirt. | 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 | CPU VT-x/AMD-V → KVM kernel modules/device → permissions/capability → userspace VMM → vCPU execution → guest | Trace requested/configured state through effective state to the observed workload result. |
| Failure boundary | KVM module/device availability proves host virtualization capability, not that a particular VM definition or guest workload is healthy. | 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: CPU VT-x/AMD-V → KVM kernel modules/device → permissions/capability → userspace VMM → vCPU execution → 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. KVM module/device availability proves host virtualization capability, not that a particular VM definition or guest workload is healthy. | 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. |
KVM · operational reference
Compact Linux state, persistence, verification and boundary reference for fast lookup.
| Reference boundary | KVM |
|---|---|
| Topic path | Virtualization → KVM |
| Runtime state | KVM exposes Linux kernel virtualization facilities using hardware extensions and provides the execution foundation commonly consumed by QEMU/libvirt. |
| 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 | CPU VT-x/AMD-V → KVM kernel modules/device → permissions/capability → userspace VMM → vCPU execution → guest Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return/regression → explicit Evidence boundary. |
| Failure boundary | KVM module/device availability proves host virtualization capability, not that a particular VM definition or guest workload is healthy. 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. |