Pcornel
Virtualization · KVM / QEMU

KVM/QEMU Virtual Machine

Cheat sheet · https://pcornel.dk/topic.php?topic=3794

Back to the Topic

Answer

Distinguish definition, QEMU process, vCPU/memory execution, virtual devices/backends, guest boot state and application state. Each layer can be healthy while the next fails.

Remember

  • Defined domain ≠ running VM.
  • Running QEMU process ≠ guest booted.
  • Guest agent responsive ≠ application healthy.
  • Clean shutdown request ≠ confirmed guest shutdown.

First checks

  • virsh dumpxml <vm> — domain XML
  • virsh dominfo <vm> — summary
  • virsh domstate <vm> --reason — state

Commands

virsh dominfo <vm>
Read current VM Lifecycle state for a bounded verification step.

Verify in this order

domain XML → QEMU process → guest

Where it usually breaks

First mismatch in management intent → host/cluster capability → hypervisor runtime/task → virtual resource/device → guest state → workload-visible read-back; preserve identity/native error/pre-state before mutation.

KVM / QEMU → Virtual Machine reference map

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

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=3794

Confirmation

Confirm action

Continue?