Pcornel
Browse topics
Options
Recent
Favorites
Linux · Technical reference

KVM

Direct answer

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.

When to use this

Use it when VMs are slow (no acceleration) or fail with "KVM not available".

First 30 seconds

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.

Operational verification

CPU extensions enabled → kvm module loaded → /dev/kvm → QEMU uses KVM acceleration

Evidence · next step

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
Platform / version applicability
linux
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

Platformlinux
Scope / prerequisiteUse it when VMs are slow (no acceleration) or fail with "KVM not available".
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

5 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

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 references

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.

observation · 1
Key points

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).

Key checks
  • virt-host-validate — host virtualization checks
  • virsh list --all — VMs and state
  • virsh dominfo <vm> — CPU, memory, autostart
  • virsh domiflist <vm> / domblklist <vm> — NICs and disks
  • lscpu | 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

RequirementCheck
CPU extensions (Intel VT-x, AMD-V)grep -E 'vmx|svm' /proc/cpuinfo
Enabled in firmwareOtherwise kvm_intel/kvm_amd fail to load: "disabled by bios"
Modules loadedlsmod | grep kvm
Access to /dev/kvmUsers in the kvm group, or libvirt

Performance features

FeatureEffect
virtio devicesParavirtual disk and network; far faster than emulated hardware
Huge pagesFewer TLB misses for memory-heavy guests
CPU pinningDedicated host cores for latency-sensitive VMs
host-passthrough CPU modelAll host CPU features visible to the guest (limits migration)
VFIO / PCI passthroughA physical device (NIC, GPU) given directly to a guest
Nested virtualizationVMs inside VMs (labs, CI)

Nested virtualization

StepCommand
Checkcat /sys/module/kvm_intel/parameters/nested (Y or 1)
Enable permanentlyoptions kvm_intel nested=1 in /etc/modprobe.d/kvm.conf, then reload the module
Give the guest the extensionCPU 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.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

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
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor doclinux current

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%
Technical changelog & impact

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.

Related reference impactReview these references after material technical changes when their shared boundary is affected.
Terminology layer

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.

Aliases that resolve here
kvm linuxkernel virtual machinekvm modules
Embedded reference data

Quick lookup tables

KVM operational reference

Topic-specific lookup boundaries, proof limits and next-step Evidence for KVM.

Lookup boundaryTopic-specific referenceOperational use
Scope / effective stateKVM 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 verificationPin 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 chainCPU VT-x/AMD-V → KVM kernel modules/device → permissions/capability → userspace VMM → vCPU execution → guestTrace requested/configured state through effective state to the observed workload result.
Failure boundaryKVM 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 evidenceCorrelated Linux container/virtualization evidence can establish this proof path: CPU VT-x/AMD-V → KVM kernel modules/device → permissions/capability → userspace VMM → vCPU execution → guestUse this observation only for the specific claim it actually supports.
Evidence limitIt 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 checkContinue 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 boundaryKVM
Topic pathVirtualization → KVM
Runtime stateKVM 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 chainCPU 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 boundaryKVM 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 ruleProve which configuration source owns the state, then prove that the running consumer loaded or generated the intended state.
Confirmation

Confirm action

Continue?