Repository navigation
doc: describe the default SHA-256 snapshot block identity - #460
Merged
Pedro Henrique Penna (ppenna) merged 1 commit intoOct 10, 2026
Merged
Conversation
The snapshot sharing chapter described caller-authenticated storage generations as the common identity path and whole-file SHA-256 as optional. The pinned OpenVMM records and verifies SHA-256 by default and uses a storage generation only when capture opts in. Correct the identity section, and mark the storage control plane and transport guidance as Proposed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The documentation accurately reflects the referenced implementation and existing design chapters.
0 open findings
What changed in this PR
Corrects snapshot block identity documentation to match OpenVMM’s implemented behavior.
Changes:
- Documents SHA-256 as the default capture and restore policy.
- Clarifies opt-in generation identity semantics.
- Marks unimplemented storage and transport guidance as proposed.
| File | Description |
|---|---|
doc/design/snapshot-sharing-and-host-storage.md |
Corrects snapshot identity and admission behavior. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Pedro Henrique Penna (ppenna)
deleted the
doc-sync/snapshot-block-identity
branch
October 10, 2026 01:54
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The "Snapshot identity and admission" section of the snapshot sharing and host storage design chapter had the implemented behavior backwards. It called a caller-authenticated storage generation "the common trusted-storage path" and whole-file SHA-256 "optional", and it said restore never rereads block bytes. In the pinned OpenVMM, SHA-256 is the default: capture hashes every bound sandbox block, and restore hashes them again. Storage generations are opt-in. The section also mixed implemented behavior with storage control-plane and transport guidance that is not implemented, without marking that guidance Proposed.
This PR corrects the section to match the implementation and moves the unimplemented guidance under a Proposed subsection. Other chapters, such as
snapshot-and-restore.mdandmachine-and-device-abi.md, already describe this correctly, so the new text links to them instead of repeating them.Changes
doc/design/snapshot-sharing-and-host-storage.md, "Snapshot identity and admission":sha256is the default identity policy.generationapplies only with--snapshot-block-identity generation --snapshot-generation-id <32-HEX>.openvmm/openvmm/openvmm_entry/src/cli_args/microvm.rs(SnapshotBlockIdentityClihas#[default] Sha256; capture validation runsunwrap_or(Sha256)and requires the generation ID exactly whengenerationis selected)sha256, capture hashes each bound block, and restore hashes each one again and rejects a mismatch. Before, the section said restore "does not reread every logical block byte".openvmm/openvmm/openvmm_entry/src/storage_builder/microvm.rs(file_sha256at capture and inrestore_snapshot_block_contract);openvmm/openvmm/openvmm_helpers/src/snapshot/microvm.rs("snapshot sandbox block topology or identity doesn't match the requested machine")openvmm_helpers/src/snapshot/microvm.rs("mixed identity policies", "do not share one storage generation", nonzero generation checks); Guidesnapshot_format.mdcli_args/microvm.rsdoc comment; Guideuser_guide/openvmm/snapshots.md("it does not authenticate bytes by itself")doc/design/snapshot-and-restore.md("standalone NVX snapshot import are not supported"); generation IDs come only from the caller's--snapshot-generation-id(cli_args/microvm.rs)The existing text on sealed-snapshot immutability, clones, and the single-use resume claim is unchanged; it matches
resume.claimhandling inopenvmm_helpers/src/snapshot/restore.rs.OpenVMM SHA:
f4566bab0a30324de0a2ac292a65d0081ba319e0(the pinnedopenvmmgitlink atorigin/devdd9744a8b490599a411152a7359f68f2798f9baf).Follow-ups
These are out of scope for this one-topic PR:
doc/openvmm-upstream-roadmap.mdmaps fork commits only up to2728f33ea. The current pin is 134 fork commits further on, including time ABI, CPU profile, multi-share virtio-fs, generation-bound snapshot, and egress selector work. Remapping them into the upstream PR plan needs maintainer judgment about classification.scripts/setup/README.mdis contributor documentation outsidedoc/. Moving it means updating links indoc/setup.md, and open PR Adopt bind-once microVM image slots #406 already touchesdoc/setup.md.doc/design/time-abi.mdacceptautoon restore so it agrees withconfiguration-boundary.md. That file is still touched by open PRs test-microvm: pause and resume a microVM through OpenVMM state control #405 and Adopt bind-once microVM image slots #406, so I left it alone.Validation
python -m unittest scripts.test_nvx_tools.CliTests scripts.test_performance.PerformanceTests: Ran 110 tests, OK (skipped=1).doc/design.md(22 files). Every relative link and anchor resolves, the changed file has one H1 and balanced code fences, anddoc/design.mdlinks every chapter indoc/design/. Result: OK.git diff --check: clean.python scripts/nvx.py verify: source tree and submodule metadata are consistent.doc/design/snapshot-sharing-and-host-storage.md, so CI classifies it as documentation-only.