Use it as the entry point for running or troubleshooting VMs on a Linux host.
Virtualization
Linux virtualization with KVM uses the kernel as a hypervisor, QEMU to emulate devices, and libvirt (virsh, virt-manager, Cockpit) to manage VMs, storage pools and networks.
1. lscpu | grep Virtualization and ls -l /dev/kvm.
2. systemctl status libvirtd (or virtqemud).
3. virsh list --all — VM state.
4. Network and storage: virsh net-list, virsh pool-list.
5. Logs: /var/log/libvirt/qemu/<vm>.log.
CPU virtualization → kvm module → QEMU process per VM → libvirt manages → network/storage attached
For Virtualization, 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.
virshPrimary Commands
Configuration and operational commands for this Topic.
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 virtualization capability → host kernel/KVM → QEMU/libvirt definition → virtual CPU/memory/storage/network → guest boot → guest readiness → workload
Healthy evidence: host capabilities and virtualization stack create the intended VM hardware/state and the guest reaches expected service/workload behavior
Step 2 Commands Verify boundary
virsh list --all
lscpu | grep Virtualization
lsmod | grep kvm
Step 3 Verification and output interpretation Verify boundary
Verification chain. CPU virtualization capability → host kernel/KVM → QEMU/libvirt definition → virtual CPU/memory/storage/network → guest boot → guest readiness → workload
Step 4 Failure modes and next checks Narrow the fault
Suspicious evidence: VM is running while wrong virtual hardware, boot media, storage/network attachment or guest readiness causes failure
A defined/running VM is not evidence that guest services, storage, networking or application behavior are correct.
Step 5 Common mistakes Narrow the fault
- Nested virtualisation expectations without enabling it.
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.
Subtopics
Go one level deeper into this subject.
KVM exposes Linux kernel virtualization facilities using hardware extensions and provides the execution foundation commonly consumed by QEMU/libvirt.
Subtopic QEMUQEMU is the userspace virtual machine monitor/device model that can use KVM acceleration and owns the process-level VM execution boundary.
Subtopic libvirtlibvirt provides a management API and persistent domain definition layer over hypervisors such as QEMU/KVM, with separate persistent and live state.
Subtopic Linux VM TroubleshootingLinux VM Troubleshooting isolates failures from host virtualization capability through libvirt/QEMU/KVM, virtual storage/network and guest boot/readiness to the original workload.
virsh 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
A defined/running VM is not evidence that guest services, storage, networking or application behavior are correct.
In depth
Virtualization on Linux: KVM, QEMU and libvirt
Linux virtualization usually means three layers working together. The QEMU documentation describes QEMU as a generic, open-source machine emulator and virtualizer:
- System emulation provides a complete virtual machine: CPU, memory and devices.
- QEMU can use a hypervisor such as KVM, so the guest runs directly on the host CPU instead of being emulated.
- User mode emulation runs programs built for another CPU architecture.
The kernel documentation covers KVM itself: its API, architecture support (x86, ARM, s390, PowerPC, LoongArch), nested virtualization and confidential-computing features. libvirt manages both, with tools such as virsh.
Who does what
| Layer | Role |
|---|---|
| KVM (kernel module) | Uses CPU virtualization extensions (Intel VT-x, AMD-V) to run guest code at near-native speed |
| QEMU | Provides the virtual hardware (disks, NICs, firmware) and runs each VM as a process |
| libvirt (libvirtd / virtqemud) | Defines, starts and stops VMs; manages networks and storage; offers an API |
| virsh, virt-manager, Cockpit | User interfaces to libvirt |
Checking a host
| Check | Command |
|---|---|
| CPU support | grep -cE 'vmx|svm' /proc/cpuinfo |
| KVM loaded and usable | lsmod | grep kvm, ls -l /dev/kvm |
| Overall readiness | virt-host-validate |
| Nested virtualization | cat /sys/module/kvm_intel/parameters/nested |
Storage and network choices
| Area | Common choices |
|---|---|
| Disk images | qcow2 (snapshots, thin), raw (performance), LVM volumes |
| Disk bus | virtio-blk or virtio-scsi (paravirtual, fast) |
| Network | A NAT network (default), a Linux bridge to the LAN, macvtap |
| NIC model | virtio-net |
host$ grep -cE 'vmx|svm' /proc/cpuinfo
16
host$ lsmod | grep -E '^kvm'
kvm_intel 413696 4
kvm 1314816 1 kvm_intel
host$ sudo virt-host-validate qemu | head -4
QEMU: Checking for hardware virtualization : PASS
QEMU: Checking if device /dev/kvm exists : PASS
QEMU: Checking for cgroup 'cpu' controller support : PASS
host$ ps -o pid,rss,args -C qemu-system-x86_64 | cut -c1-120 | head -3
host$ sudo virsh list --all
Each VM is a process
On the host, every running VM is a qemu-system-* process. Host tools such as top, ps and cgroups therefore see its CPU and memory use directly. Its virtual disks are ordinary files or block devices.
Documented example, not captured output.
How it works at runtime
Virtualization is part of Virtualization. Linux Virtualization covers hardware-assisted VM execution from host CPU/kernel capability through KVM/QEMU/libvirt configuration, virtual hardware and guest boot to workload acceptance.
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. Linux Virtualization covers hardware-assisted VM execution from host CPU/kernel capability through KVM/QEMU/libvirt configuration, virtual hardware and guest boot to workload acceptance.
Quick reference
Virtualization on Linux hosts is KVM (kernel) + QEMU (device emulation) managed by libvirt (virsh, virt-manager, Cockpit) or by platforms like Proxmox VE and OpenStack.
lscpu | grep -i virtualization
lsmod | grep kvm
virt-host-validate
virsh list --all
Inside a guest, systemd-detect-virt and hostnamectl show the hypervisor. Install qemu-guest-agent and VirtIO drivers (built into Linux kernels) for clean shutdowns, filesystem freeze and performance.
Limits and how it fails
Primary failure point. A defined/running VM is not evidence that guest services, storage, networking or application behavior are correct.
Containers share the host kernel, so kernel/module constraints differ from VMs. Snapshot/image existence is not a verified backup.
ReferenceConfiguration & state1 section · depth on demand
Configuration, persistence and lifecycle
Distribution/platform context. Linux Virtualization owns the Linux host execution layer; the broader Virtualization domain owns platform-independent architecture and operations.
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. 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
Virtualization operational reference
Topic-specific lookup boundaries, proof limits and next-step Evidence for Virtualization.
| Lookup boundary | Topic-specific reference | Operational use |
|---|---|---|
| Scope / effective state | Linux Virtualization covers hardware-assisted VM execution from host CPU/kernel capability through KVM/QEMU/libvirt configuration, virtual hardware and guest boot to workload acceptance. | 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 virtualization capability → host kernel/KVM → QEMU/libvirt definition → virtual CPU/memory/storage/network → guest boot → guest readiness → workload | Trace requested/configured state through effective state to the observed workload result. |
| Failure boundary | A defined/running VM is not proof that guest services, storage, networking or application behavior are correct. | 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 virtualization capability → host kernel/KVM → QEMU/libvirt definition → virtual CPU/memory/storage/network → guest boot → guest readiness → workload | 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. A defined/running VM is not proof that guest services, storage, networking or application behavior are correct. | 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. |
Virtualization · operational reference
Compact Linux state, persistence, verification and boundary reference for fast lookup.
| Reference boundary | Virtualization |
|---|---|
| Topic path | Virtualization |
| Runtime state | Linux Virtualization covers hardware-assisted VM execution from host CPU/kernel capability through KVM/QEMU/libvirt configuration, virtual hardware and guest boot to workload acceptance. |
| 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 virtualization capability → host kernel/KVM → QEMU/libvirt definition → virtual CPU/memory/storage/network → guest boot → guest readiness → workload Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return/regression → explicit Evidence boundary. |
| Failure boundary | A defined/running VM is not proof that guest services, storage, networking or application behavior are correct. 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. |