You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(vm): add --cold clone and --vm-id for disk-only cold migration
clone --cold boots a fresh VM from the snapshot's disk and discards the
saved CH state (state.json + memory ranges). The guest re-evaluates CPUID
at boot, so the clone survives hypervisor-version / CPUID changes that
fail a warm vm.restore (CpuidCheckCompatibility) — at the cost of losing
in-memory runtime state. The COW overlay is a standard guest-owned image
and stays valid across versions.
clone --vm-id reuses the source VM's ID instead of generating one, so a
managing controller (e.g. vk-cocoon) re-adopts the clone by its stored
VMID instead of treating it as an orphan and destroying it.
Threaded via a transient VMConfig.ColdBoot flag (mirrors OnDemand);
gated to Cloud Hypervisor at the CLI. Reuses the cold-boot primitive
(buildVMConfig -> buildCLIArgs -> launchProcess), extracted as launchFresh
and shared with startOne.
cmd.Flags().String("bridge", "", "use TAP-on-bridge instead of CNI (value is bridge device, e.g. cni0)")
300
300
cmd.Flags().Bool("no-direct-io", false, "disable O_DIRECT on writable disks (inherit from snapshot if not set)")
301
301
cmd.Flags().Bool("on-demand", false, "use UFFD on-demand memory loading for faster clone (CH only; snapshot file must remain on disk)")
302
+
cmd.Flags().Bool("cold", false, "clone the disk only and cold-boot the guest, discarding saved memory/vCPU state (CH only; survives hypervisor-version/CPUID changes that block warm restore)")
303
+
cmd.Flags().String("vm-id", "", "reuse this VM ID instead of generating one (preserves identity for controller re-adoption after a cold migration)")
302
304
cmd.Flags().Bool("pull", false, "auto-pull base image if not found locally (for cross-node clone)")
303
305
cmd.Flags().String("from-dir", "", "clone from a snapshot directory (must contain snapshot.json) instead of the local snapshot DB; mutually exclusive with positional SNAPSHOT")
0 commit comments