Skip to content

host: check snapshot restore compatibility - #1443

Merged
Pedro Henrique Penna (ppenna) merged 1 commit into
feature/nvx-refactorfrom
esaurez/issue1102-sl212c-20261110-6789d491
Nov 10, 2026
Merged

Pedro Henrique Penna (ppenna) merged 1 commit into
feature/nvx-refactorfrom
esaurez/issue1102-sl212c-20261110-6789d491

Conversation

@esaurez

@esaurez Enrique Saurez (esaurez) commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Part of #1102. Adds only SL2.12c snapshot restore compatibility checks on
the strict reader merged in #1440. This does not implement VM restoration.

Current integration

This PR directly targets feature/nvx-refactor.

  • Head: d9cd276aa7c02eeb5c9536ceeeff60e1cf1f8463
  • Tree: d68930a8dcfd5fdcbd728d12a30ada312011d70e
  • Sole parent: cf5f91467c050f1e9508403964b1b4546e2724ab
  • OpenVMM pin: 14dc4116ec7e57567633c4b7b07892aca3a58522

The original published head was
df8ddc4899adceadf42a53f5b3677e1f084a7e75, whose actual parent and
recorded premerge reader target were
797d300557e54644f0a8e66ba729de0dcf1884fb.
Only this PR's own compatibility commit was replayed onto the merged
reader. No old reader or producer history was replayed.

The rebase was conflict-free: range-diff is 1 = 1, with unchanged patch ID
9b9f4144b87f17b9d43f1930421c470473eb8373 and 7 changed paths
(831 insertions, 16 deletions). All four own compatibility Rust files and
their imported compatibility dependencies are byte-identical to the
qualified original source. Incoming integration changes are preserved.
The original pre-preparation remote lease was used for the push.

Changes

Snapshot::accepts(&VmConfig, &Runtime, &HostTime) checks a layered restore's
CPU and memory bounds/alignment, requested disk geometry, captured NIC and
boot-console attachment, runtime identity/backend/profile, and time eligibility.
Compatibility refusals are Unsupported, an ineligible time is Unavailable,
and requested disk I/O failures remain Io.

Snapshot::nic returns only the checked captured address and presence.
An unnamed restore address inherits it; each restore supplies its own network
policy. Metadata is retained by the existing strict parse; neither accessor
reopens snapshot entries or runtime artifacts.

The shared CPU-profile matching helper preserves capture-class behavior.
No capture creation, snapshot writer, store implementation, migration, guest
change, VMM argument change, or pending producer-launcher fix is included.

Measured scope: 188 core lines in 3 counted files; 7 changed paths.
All existing tests and fixtures retain their assertions. The original
test-change check reported 0 existing-test changes and 26 additions.
Focused cases cover resource boundaries, independent mismatches, sparse-file
geometry, NIC policy independence, boot-console policies, default/host CPU
requests, runtime identity, time eligibility, nonblocking FIFO refusal, and
no reopened snapshot or runtime paths.

Qualification and review provenance

The original local execution evidence remains bound to df8, tree
5388b0541940768c50e55039b1ea485d09fc8f90, not relabeled as new execution
on d9cd.

The applicable Linux matrix completed 40 checked commands and the Windows
matrix completed 32, including focused compatibility tests, formatting,
warnings-denied Clippy modes, all-feature/default/no-default tests, docs,
Rust 1.89, artifact bundling, and applicable runtime-adapter configurations.
Linux also checked both-platform API snapshots, macOS, and guest binaries.
Layout, Markdown, and test-change checks passed. Focused results were
89 passed on Linux and 87 on Windows. The initially ignored Linux
foreign-owner case was separately executed against its normally compiled,
hash-bound df8 test binary: 1 passed, 0 failed, 0 ignored.
These are this consumer's historical results, not inherited parent results.

The exact-df8 CI run 42849764558
passed 34 jobs with 9 explicit skips. The reader's exact-4b296
CI run 42864099975
passed; the merged reader cf5f914 has exactly that qualified tree.
Neither run is a new current-head or joint-consumer qualification.

The historical df8
NFV reviewer run 42849764403
failed before review in "Capture immutable PR changes as data":
ImportError: cannot import name 'context_input' from 'nfv_workflow.repository_context'.
This tooling failure is disclosed, not waived or reported as a successful review.

GitHub Copilot's df8 review recommended approval and reported no active
issues; it was a comment, not formal approval or a review of d9cd.
An already-completed optional static native review of the exact d9cd
replay also found no issues. No new local matrix or review was requested
solely for this clean, unchanged rebase.

Current-head automatic CI and review results are separate and remain tracked
on this PR. Draft-skipped jobs are not a full CI pass. No new runtime or
capture/restore proof, formal approval, merge, or auto-merge is claimed.
SL2.13 and SL2.14 remain separate unfinished scopes.

@esaurez Enrique Saurez (esaurez) added the tests-modified Changes existing tests, test data, or test wiring label Nov 10, 2026
@github-actions github-actions Bot removed the tests-modified Changes existing tests, test data, or test wiring label Nov 10, 2026
@esaurez
Enrique Saurez (esaurez) marked this pull request as ready for review November 10, 2026 15:57
@esaurez
Enrique Saurez (esaurez) marked this pull request as draft November 10, 2026 15:57
@esaurez
Enrique Saurez (esaurez) requested a balanced review from Copilot November 10, 2026 16:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The review identifies no active issues with the snapshot restore compatibility checks and related API updates.

No open issues 🎉

What changed in this PR

Adds snapshot restore compatibility checks on top of the strict reader from #1440, advancing #1102 without implementing VM restoration.

Changes:

  • Adds Snapshot::accepts to check resources, disk geometry, NIC and console configuration, runtime compatibility, and time eligibility.
  • Adds Snapshot::nic for the checked captured address, retains attachment metadata, and shares CPU-profile matching logic.
  • Adds focused compatibility tests, documents the contract, and updates both public API snapshots.
File Description
nvx-rs/​src/​host/​snapshot/​tests.rs Adds compatibility, error classification, and no-reread coverage.
nvx-rs/​src/​host/​snapshot/​manifest.rs Retains parsed attachments for compatibility checks.
nvx-rs/​src/​host/​snapshot/​key.rs Extracts shared CPU-profile matching logic.
nvx-rs/​src/​host/​snapshot.rs Implements compatibility checks and the captured NIC accessor.
nvx-rs/​README.md Documents compatibility requirements and error behavior.
nvx-rs/​public-api/​windows.txt Records the new public methods on Windows.
nvx-rs/​public-api/​linux.txt Records the new public methods on Linux.

Review effort: Balanced

@esaurez
Enrique Saurez (esaurez) force-pushed the esaurez/issue1102-sl212b-20261110-6789d491 branch from 797d300 to 4b29646 Compare November 10, 2026 17:15
Base automatically changed from esaurez/issue1102-sl212b-20261110-6789d491 to feature/nvx-refactor November 10, 2026 17:39
@github-actions github-actions Bot added the tests-modified Changes existing tests, test data, or test wiring label Nov 10, 2026
@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

This pull request changes no existing test

Relocated unchanged: 0; added: 26. Compared the merge base cf5f91467c05 with d9cd276aa7c0.

Check requested VM geometry, captured attachments, runtime identity and restore-time eligibility against retained snapshot metadata. Expose the checked NIC address without freezing the restore network policy or reopening snapshot entries.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6789d491-7d13-4929-bc64-4edfec93ba60
@esaurez
Enrique Saurez (esaurez) force-pushed the esaurez/issue1102-sl212c-20261110-6789d491 branch from df8ddc4 to d9cd276 Compare November 10, 2026 18:35
@github-actions github-actions Bot removed the tests-modified Changes existing tests, test data, or test wiring label Nov 10, 2026
@esaurez
Enrique Saurez (esaurez) requested a balanced review from Copilot November 10, 2026 18:38
@esaurez
Enrique Saurez (esaurez) marked this pull request as ready for review November 10, 2026 18:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain for the snapshot compatibility checks and validated NIC accessor.

No open issues 🎉

Review effort: Balanced

@ppenna
Pedro Henrique Penna (ppenna) merged commit 4192cfd into feature/nvx-refactor Nov 10, 2026
88 checks passed
@ppenna
Pedro Henrique Penna (ppenna) deleted the esaurez/issue1102-sl212c-20261110-6789d491 branch November 10, 2026 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants