Skip to content

inspector: snapshot a running x86 guest to a directory and restore it #574

Open

Description

@lexoliu

A Helios guest can only cold-boot. QEMU can save a running machine to a file and start another from it (migrate file: and -incoming, present in QEMU 8.2.2); the inspector drives neither.

Scope

  • helios-inspector vm … snapshot <dir>: prepares the guest (R4), stops it, migrates to <dir>/state, copies the data disk and firmware variables beside it, and writes a manifest of everything a restore must reproduce.
  • helios-inspector vm --restore <dir> <session-command>: starts QEMU from the manifest with -incoming defer, loads the state, continues the guest and runs the session.
  • Refusals before anything runs, each naming its reason: an architecture whose machine has no generation ID (aarch64, riscv64), a device QEMU cannot migrate (virgl, rutabaga, virtio-snd on a QEMU that marks it unmigratable), a guest that reports no generation ID.
  • smoke-x86-64 snapshots a guest and restores it twice.

Done when

  • The smoke step proves that state written before the snapshot is read back in both restored copies, the generation advanced in each, wasi:random output differs between the two copies, the wall clock is within 5 s of the host, and the host share answers after restore.
  • --restore against a manifest whose kernel or bootfs differs from the checkout refuses before starting QEMU.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions