Pcornel
Virtualization · Virtual Machine Lifecycle

VM State

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

Back to the Topic

Answer

VM state is a VM's current power and runtime condition — running, powered off, suspended or saved, paused, or in transition such as migrating. Operations like snapshots, migration and hardware changes depend on that state.

Remember

  • Some actions need power off.
  • Transitional states block changes.
  • Stale locks show wrong state.

First checks

  • virsh domstate <vm> --reason — state and reason
  • qm status <vmid> --verbose — Proxmox state
  • Get-VM <vm> | fl State,Status,Uptime — Hyper-V state

Commands

qm status 120 --verbose
virsh domstate web01 --reason
virsh domstate --reason vm01
qm status 101 --verbose

Verify in this order

request/event → state transition → reported state

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.

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

Confirmation

Confirm action

Continue?