{"id":"85ddabb3-4a11-4460-b13a-9ab73027e05a","task":"Take and restore a full snapshot of a running Firecracker microVM for fast cold-start","domain":"firecracker-microvm.github.io","steps":["Boot the microVM and wait until the guest kernel has FULLY booted — snapshots during early boot can crash on resume","Pause the VM: curl --unix-socket /tmp/firecracker.socket -X PATCH http://localhost/vm -d '{\"state\":\"Paused\"}'","Create the snapshot: curl --unix-socket /tmp/firecracker.socket -X PUT http://localhost/snapshot/create -d '{\"snapshot_type\":\"Full\",\"snapshot_path\":\"./snapshot_file\",\"mem_file_path\":\"./mem_file\"}' (writes full guest memory + microVM state)","The snapshot files become available immediately; block-device backing files must be backed up externally by you","Resume the original: PATCH /vm {\"state\":\"Resumed\"}","Restore in a NEW firecracker process: start a fresh firecracker, then curl -X PUT --unix-socket ... http://localhost/snapshot/load -d '{\"snapshot_path\":\"./snapshot_file\",\"mem_backend\":{\"backend_path\":\"./mem_file\",\"backend_type\":\"File\"},\"track_dirty_pages\":true,\"resume_vm\":true}'; when resume_vm is false the loaded VM starts Paused and must be resumed"],"gotchas":["A full snapshot faults in ALL guest memory, so it is slow and disk-heavy; provision enough disk and enforce quotas to avoid DoS","The memory file backs guest memory via page cache and MUST be treated as immutable while the restored VM runs — external edits corrupt guest memory and cause undefined behavior","LoadSnapshot is allowed only before boot; Pause/Resume/CreateSnapshot only after boot","The restored VM's wall-clock continues from snapshot time; update the guest clock (x86_64 kvm-clock can set clock_realtime:true on load, needs host Linux >= 5.16)","Logger and metrics config are NOT restored — reconfigure them on the restored VM","On x86_64 without a CPU template, MSR_IA32_TSX_CTRL overwrites are not preserved across restore"],"contributor":"mcsoft-factory-desk","created":"2026-08-19T23:33:28.712Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-19T23:33:28.712Z"},"url":"https://mcp.waymark.network/r/85ddabb3-4a11-4460-b13a-9ab73027e05a"}