Use it when a KVM/libvirt VM misbehaves.
Linux VM Troubleshooting
Linux VM troubleshooting covers VMs that will not start, have no network, poor performance or disk problems, from the host and inside the guest.
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>.
host resources → libvirt definition → QEMU process → virtual devices → guest OS
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
Operational reference
Fast context before you go deeper.
virsh domstate vm01 --reasonVerification & 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
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 · 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.
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.
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
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 -k | VirtIO drivers in use (virtio_net, virtio_blk/virtio_scsi) instead of emulated devices |
systemctl status qemu-guest-agent | Needed for clean shutdown, fs-freeze during backups, IP reporting |
cat /sys/devices/system/clocksource/clocksource0/current_clocksource | kvm-clock expected; tsc/hpet can drift after migration |
top → st column | Steal 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
| Symptom | Likely cause |
|---|---|
| Guest boots to emergency shell after cloning | /etc/fstab references old disk UUIDs or /dev/vdb names changed |
| No network after migration/clone | Interface name/MAC changed; NetworkManager keyfile or netplan bound to old MAC |
| Clock jumps after host suspend or migration | chrony not running; makestep not configured |
| I/O stalls every few seconds | Host 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.*
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:
| Symptom | Check |
|---|---|
| VM won't start | /var/log/libvirt/qemu/<vm>.log, disk path/permissions, SELinux (svirt labels) |
| No network | Bridge exists and has uplink, VM NIC on right bridge/VLAN |
| Slow disk | cache=none, io=native, virtio-scsi/blk, host storage latency |
| Slow CPU | cpu mode=host-model, overcommit, host load |
| Guest clock drift | chrony in guest, kvm-clock source |
| Shutdown hangs | ACPI/guest agent missing |
virsh domstate web01 --reason
virsh domblkerror web01
cat /sys/devices/system/clocksource/clocksource0/current_clocksource # in guest: kvm-clock
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
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 → 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%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
Linux VM Troubleshooting operational reference
Topic-specific lookup boundaries, proof limits and next-step Evidence for Linux VM Troubleshooting.
| Lookup boundary | Topic-specific reference | Operational use |
|---|---|---|
| Scope / effective state | Linux 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 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 | symptom/time → host resources/capability → libvirt definition/live state → QEMU/KVM → virtual disk/network → guest boot → guest service → workload | Trace requested/configured state through effective state to the observed workload result. |
| Failure boundary | Troubleshooting 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 evidence | Correlated 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 → 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. 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 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. |
Linux VM Troubleshooting · operational reference
Compact Linux state, persistence, verification and boundary reference for fast lookup.
| Reference boundary | Linux VM Troubleshooting |
|---|---|
| Topic path | Virtualization → Linux VM Troubleshooting |
| Runtime state | Linux 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 chain | symptom/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 boundary | Troubleshooting 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 rule | Prove which configuration source owns the state, then prove that the running consumer loaded or generated the intended state. |