Pcornel
Browse topics
Options
Recent
Favorites
Virtualization · Technical reference

KVM Troubleshooting

Direct answer

KVM troubleshooting checks each layer in turn: host CPU virtualization support, libvirt (virsh, journalctl -u libvirtd), the QEMU process log in /var/log/libvirt/qemu/, then the guest's own boot and logs.

When to use this

Use this topic when the symptom or planned change has been narrowed to KVM / QEMU → KVM Troubleshooting. Establish effective host/runtime state before changing configuration.

First 30 seconds

1. Read the QEMU log for start failures.

2. Check permissions (SELinux/AppArmor) on disk files.

3. Check storage pool and network active.

4. Use virt-host-validate.

5. Compare XML with working VM.

Operational verification

virsh action → libvirt → QEMU → KVM → guest

Context & applicabilityCommon mistakes · platform/version boundaries
Common mistakes
Common traps

A single log message or status is evidence of a condition, not root cause until timing and the failed dependency path explain the observed symptom.

Platform / version applicability
kvm-qemu
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.

Platformkvm-qemu
Key commandvirsh list --all
Scope / prerequisiteUse this topic when the symptom or planned change has been narrowed to KVM / QEMU → KVM Troubleshooting. Establish effe…
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.

1 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 Verification path Verify boundary

Symptom/time → scope/baseline → host/KVM → QEMU/libvirt → virtual device/backend → guest OS → workload → minimal change → verification

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
  • libvirt error ≠ libvirt root cause.
  • QEMU exit ≠ QEMU bug; backing storage, permissions, device or resource failures may trigger it.
  • VM Active ≠ guest healthy.
  • Temporary restart success ≠ durable fix.
Key checks
  • virsh domstate <vm> --reason — state
  • tail -100 /var/log/libvirt/qemu/<vm>.log — QEMU errors
  • journalctl -u libvirtd -u virtqemud --since -1h — daemon errors
ReferenceImportant terms & boundaries3 sections · depth on demand

What this shows and what it does not

A single log message or status is evidence of a condition, not root cause until timing and the failed dependency path explain the observed symptom.

In depth

Is KVM available at all?

$ grep -cE 'vmx|svm' /proc/cpuinfo          # > 0: CPU supports VT-x / AMD-V
$ lsmod | grep kvm
kvm_intel             409600  12
kvm                  1314816  1 kvm_intel
$ ls -l /dev/kvm
crw-rw---- 1 root kvm 10, 232 Nov 27 08:01 /dev/kvm
$ virt-host-validate qemu
  QEMU: Checking for hardware virtualization                 : PASS
  QEMU: Checking if device /dev/kvm exists                   : PASS
  QEMU: Checking for device assignment IOMMU support         : WARN (No ACPI DMAR table found, IOMMU either disabled in BIOS or not supported)
FindingCause
vmx/svm count 0Disabled in firmware, or running inside a VM without nested virtualisation
Module loads but /dev/kvm missingModule error — dmesg \| grep kvm (often "disabled by bios")
Permission denied on /dev/kvmUser not in kvm group (libvirt session mode)

What QEMU and libvirt think the host can do

The virsh manual documents capabilities and domcapabilities:

virsh domcapabilities --virttype kvm | grep -E '<mode name|<model'
virsh capabilities | grep -A3 '<host>'

These show supported CPU models, firmware, machine types and device models — useful when a VM definition copied from another host fails with "unsupported configuration".

Per-VM logs

PlatformLog
libvirt/var/log/libvirt/qemu/<vm>.log (QEMU command line and errors)
Proxmox VETask log of the start; qm showcmd <vmid> --pretty for the command line
Kerneldmesg / journalctl -k for KVM errors (kvm: ... emulation failure)

Typical KVM-level problems

  • KVM internal error. Suberror: 1 — emulation failure: guest executed an instruction KVM could not emulate — usually a guest or CPU-model mismatch; capture the log and try a different CPU model.
  • Guest clock drift: use kvm-clock in Linux guests and Hyper-V enlightenments in Windows.
  • Nested virtualisation needed (labs): cat /sys/module/kvm_intel/parameters/nested → Y, CPU model host.

*The KVM kernel module and device availability checks above are illustrative examples, not captured from a lab or production host.*

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

Method

ProblemCheck
Could not access KVM kernel moduleVT-x/AMD-V disabled in BIOS, kvm_intel not loaded
VM won't start (permission denied on disk)SELinux/AppArmor labels (restorecon, virt_image_t), file ownership qemu
Network down for bridged VMBridge membership, netfilter on bridge, VLAN tags
Slow VMEmulated devices, no cache=none, CPU model qemu64, host swapping
Migration failsCPU model, TLS/SSH, storage visibility
virt-host-validate
tail -50 /var/log/libvirt/qemu/vm1.log
ausearch -m avc -ts recent | grep qemu
Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
ReferenceConfiguration & state1 section · depth on demand

First commands

virsh list --all
virsh dominfo <vm> ; virsh domblklist <vm> ; virsh domiflist <vm>
journalctl -u libvirtd --since "1 hour ago"
less /var/log/libvirt/qemu/<vm>.log
virt-host-validate

Common causes: missing KVM support (/dev/kvm), permissions/SELinux on disk images, network bridge missing, disk image locked by another process.

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 dockvm-qemu current

Authoritative/upstream documentation reviewed for bounded claims in KVM / QEMU → KVM Troubleshooting. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.qemu.org/docs/master/ · confidence 94%
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 troubleshootingqemu troubleshootinglibvirt troubleshootingvm failed kvm
Embedded reference data

Quick lookup tables

KVM / QEMU → KVM Troubleshooting reference map

Fast operational boundaries and evidence limits for KVM / QEMU → KVM Troubleshooting.

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

Confirm action

Continue?