Pcornel
Browse topics
Options
Recent
Favorites
Linux · Technical reference

Linux VM Troubleshooting

Direct answer

Linux VM troubleshooting covers VMs that will not start, have no network, poor performance or disk problems, from the host and inside the guest.

When to use this

Use it when a KVM/libvirt VM misbehaves.

First 30 seconds

1. virsh start <vm> error and /var/log/libvirt/qemu/<vm>.log.

2. Network: virsh domiflist <vm>; bridge up; guest IP.

3. Performance: virsh domstats <vm>, host top, virtio in use?

4. Host disk space for images: df -h /var/lib/libvirt/images.

5. Console: virsh console <vm>.

Operational verification

host resources → libvirt definition → QEMU process → virtual devices → guest OS

Evidence · next step

For Virtualization → Linux VM Troubleshooting, 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
Key commandvirsh domstate vm01 --reason
Scope / prerequisiteUse it when a KVM/libvirt VM misbehaves.
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

symptom/time → host resources/capability → libvirt definition/live state → QEMU/KVM → virtual disk/network → guest boot → guest service → workload

Healthy evidence: host and guest evidence identify one first failing step and the corrected VM passes boot/readiness plus original workload and regression checks

Step 2 Verification and output interpretation Verify boundary

Verification chain. symptom/time → host resources/capability → libvirt definition/live state → QEMU/KVM → virtual disk/network → guest boot → guest service → workload

Step 3 Commands Verify boundary
virsh domstate vm01 --reason
journalctl -u libvirtd
tail /var/log/libvirt/qemu/vm01.log
Step 4 Failure modes and next checks Narrow the fault

Suspicious evidence: restarting VM/daemon masks cause, running state is mistaken for readiness, or guest-local success ignores external storage/network/client path

Step 5 Common mistakes Narrow the fault
  • Ignoring the per-VM qemu log.
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

Read the VM's QEMU log first. No network → bridge/virbr0 and the guest NIC driver. Slow → missing KVM acceleration, non-virtio devices, or host overcommit. Disk full on the host stops thin-provisioned VMs.

Key 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

Troubleshooting is resolved only when the first failed VM boundary is confirmed and the original workload succeeds after minimal correction.

In depth

Inside the guest vs. around it

A Linux VM problem is either a guest problem (kernel, services, file systems) or a virtual-hardware problem (devices, host resources). Look at both sides in the same time window.

# virsh dominfo web01
State:          running
CPU(s):         4
Max memory:     8388608 KiB
Used memory:    8388608 KiB
# virsh domstats web01 --vcpu --block --balloon
# virsh domblkerror web01
No errors found
# virsh console web01            # serial console — works even when networking is down

The virsh manual documents these domain commands; domblkerror and domstate --reason are the quickest way to see that a guest is paused because of storage errors.

Guest-side checks with virtualisation in mind

Check (inside the guest)Why it matters in a VM
lsmod \| grep virtio / lspci -kVirtIO drivers in use (virtio_net, virtio_blk/virtio_scsi) instead of emulated devices
systemctl status qemu-guest-agentNeeded for clean shutdown, fs-freeze during backups, IP reporting
cat /sys/devices/system/clocksource/clocksource0/current_clocksourcekvm-clock expected; tsc/hpet can drift after migration
top → st columnSteal time = host CPU contention
dmesg \| grep -iE 'virtio\|blk_update_request\|I/O error'Virtual disk errors passed up from the host

Serial console as the safety net

Enable a serial console in the guest so virsh console works without network:

# in the guest
systemctl enable --now serial-getty@ttyS0.service
grubby --update-kernel=ALL --args="console=tty0 console=ttyS0,115200"     # RHEL family

On Debian/Ubuntu set GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,115200" and run update-grub.

Typical VM-specific failures

SymptomLikely cause
Guest boots to emergency shell after cloning/etc/fstab references old disk UUIDs or /dev/vdb names changed
No network after migration/cloneInterface name/MAC changed; NetworkManager keyfile or netplan bound to old MAC
Clock jumps after host suspend or migrationchrony not running; makestep not configured
I/O stalls every few secondsHost storage latency — compare guest iostat -x 1 with the host

*The virsh domain statistics and disk-error response illustrate guest inspection from the hypervisor; they were not collected from a running VM.*

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

Linux VM Troubleshooting is part of Virtualization → Linux VM Troubleshooting. Linux VM Troubleshooting isolates failures from host virtualization capability through libvirt/QEMU/KVM, virtual storage/network and guest boot/readiness to the original workload.

Topic-specific state model. Linux VM Troubleshooting isolates failures from host virtualization capability through libvirt/QEMU/KVM, virtual storage/network and guest boot/readiness to the original workload.

Method

Linux VM troubleshooting:

SymptomCheck
VM won't start/var/log/libvirt/qemu/<vm>.log, disk path/permissions, SELinux (svirt labels)
No networkBridge exists and has uplink, VM NIC on right bridge/VLAN
Slow diskcache=none, io=native, virtio-scsi/blk, host storage latency
Slow CPUcpu mode=host-model, overcommit, host load
Guest clock driftchrony in guest, kvm-clock source
Shutdown hangsACPI/guest agent missing
virsh domstate web01 --reason
virsh domblkerror web01
cat /sys/devices/system/clocksource/clocksource0/current_clocksource   # in guest: kvm-clock
Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

Limits and how it fails

Primary failure point. Troubleshooting is resolved only when the first failed VM boundary is confirmed and the original workload succeeds after minimal correction.

Snapshot/image existence is not a verified backup.

ReferenceConfiguration & state1 section · depth on demand

Configuration, persistence and lifecycle

Distribution/platform context. Linux VM Troubleshooting owns host-to-guest isolation and hands off to KVM, QEMU, libvirt, Storage, Networking or guest OS Topics once identified.

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 → Linux VM Troubleshooting. 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.

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
linux vm troubleshootingkvm vm troubleshootinglibvirt troubleshooting
Embedded reference data

Quick lookup tables

Linux VM Troubleshooting operational reference

Topic-specific lookup boundaries, proof limits and next-step Evidence for Linux VM Troubleshooting.

Lookup boundaryTopic-specific referenceOperational use
Scope / effective stateLinux VM Troubleshooting isolates failures from host virtualization capability through libvirt/QEMU/KVM, virtual storage/network and guest boot/readiness to the original workload.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 chainsymptom/time → host resources/capability → libvirt definition/live state → QEMU/KVM → virtual disk/network → guest boot → guest service → workloadTrace requested/configured state through effective state to the observed workload result.
Failure boundaryTroubleshooting closes only when the first failed VM boundary is proven and the original workload succeeds after minimal correction.Stop broad troubleshooting at the first boundary that is not supported by evidence.
Positive evidenceCorrelated Linux container/virtualization evidence can establish this proof path: symptom/time → host resources/capability → libvirt definition/live state → QEMU/KVM → virtual disk/network → guest boot → guest service → workloadUse 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. Troubleshooting closes only when the first failed VM boundary is proven and the original workload succeeds after minimal correction.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.

Linux VM Troubleshooting · operational reference

Compact Linux state, persistence, verification and boundary reference for fast lookup.

Reference boundaryLinux VM Troubleshooting
Topic pathVirtualization → Linux VM Troubleshooting
Runtime stateLinux VM Troubleshooting isolates failures from host virtualization capability through libvirt/QEMU/KVM, virtual storage/network and guest boot/readiness to the original workload.
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 chainsymptom/time → host resources/capability → libvirt definition/live state → QEMU/KVM → virtual disk/network → guest boot → guest service → workload Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return/regression → explicit Evidence boundary.
Failure boundaryTroubleshooting closes only when the first failed VM boundary is proven and the original workload succeeds after minimal correction. 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?