Skip to content
qibdo qibdo
Theme
Book a demo

Virtual machine lifecycle

A virtual machine is a stateful resource. How it moves between running, stopped, and suspended depends on the engine it runs on. On qibdo’s own engine, the platform manages the full lifecycle described below. On AWS, GCP, and Azure, a VM follows that provider’s native lifecycle.

stateDiagram-v2
  classDef primary fill:#e8e8ff,stroke:#1100ff,stroke-width:2px,color:#0e0d1a
  classDef danger fill:#ffe3e8,stroke:#ff002f,stroke-width:2px,color:#0e0d1a

  [*] --> Running: create
  Running --> Stopped: stop
  Stopped --> Running: start
  Running --> Suspended: suspend
  Suspended --> Running: resume
  Running --> Running: restart / reset
  Running --> Deleted: delete
  Stopped --> Deleted: delete
  Suspended --> Deleted: delete
  Deleted --> [*]

  class Running,Stopped,Suspended primary
  class Deleted danger

A VM reports its current state at any moment. Resting states are stable: a VM stays there until you ask for a change. Transient states are the brief in-between stages the platform reports while a change is in progress.

StateKindWhat it means
RunningRestingThe VM is running.
StoppedRestingThe VM is stopped but still exists.
SuspendedRestingThe VM’s state is saved to storage and can be resumed later.
DeletedTerminalThe VM has been removed.
SchedulingTransientPlacement is being decided.
CreatingTransientThe VM is being created.
StartingTransientBooting toward Running.
StoppingTransientShutting down cleanly toward Stopped.
SuspendingTransientSaving state toward Suspended.
ResumingTransientRestoring from Suspended toward Running.
RestartingTransientA graceful guest-OS reboot, from Running back to Running.
ResettingTransientA hard power cycle with no graceful shutdown, from Running back to Running.
RepairingTransientThe platform is recovering the VM.

Restart reboots the guest operating system gracefully; Reset forces a hard power cycle, the equivalent of pressing the reset button on a physical machine. Choose Reset only when a guest is unresponsive.

Every lifecycle action is asynchronous. Instead of returning the VM, an action returns an operation you can follow. The operation reports its type, a status (pending, running, done, or error), a completion percentage, and any errors or warnings. Poll the operation until it is done or error: a done operation means the VM reached the target state, and a failed one leaves the VM in its previous state and explains why.

Each action also has a precondition on the current state. You start a stopped VM, resume a suspended one, and stop, suspend, restart, or reset a running one. An action whose precondition is not met fails the operation and leaves the VM unchanged.