Skip to content

vm-guests: renderer decision, guest registry + carve-out list, deploy vm: spec (#5772) - #9186

Merged
dezren39 merged 1 commit into
mainfrom
queue/14378-5772-vm-guests
Nov 13, 2026
Merged

dezren39 merged 1 commit into
mainfrom
queue/14378-5772-vm-guests

Conversation

@dezren39

@dezren39 dezren39 commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Implements steps 1, 4, and 5 of the #5772 execution plan (audit note on #5772, comment 6785960494). Steps 2-3 (the two host lifecycle proofs) remain, specced in the doc — they need a dedicated amd host visit (nixos-rebuild switch + real guest starts), not a registry change.

What lands

  • Renderer decision (recorded on VMs: declarative guest definitions (nixvirt / microvm.nix) + mutable carve-out list #5772 as well): libvirt class renders with nixvirt (domains/networks/pools as Nix data, one derivation graph with the guest config and image); fallback is flake-generated libvirt XML for a feature nixvirt cannot express, with the gap named in the guest entry. microvm.nix is confirmed for the ephemeral/agent class (already a flake input, prometheus already defined).
  • nixos/vm-guests/default.nix — pure-data guest registry + the mutable carve-out list (starts empty) + full-drift waiver list (also empty) with the waiver rule stated: data-only drift for carve-outs; OS-definition drift requires a named waiver with owner + reason + expiry. Also records the guest generation shape: {domain definition, flake-built disk image, NixOS source rev}, with data volumes attached to generations, never inside them. Prometheus is registered honestly as defined-not-enabled (microvm profile still commented out for amd).
  • Flake output vmGuests exposing that registry.
  • doc/2026-11-12_vm-guests-generation-discipline.md — decision rationale, generation shape, carve-out/waiver rule, the deploy vm:<name> integration spec (define/start, status, rollback, destroy with data volumes surviving unless --purge-data), and the exact remaining step-2/step-3 proof plan.

No host configuration changes: nothing is enabled, no profile is uncommented, no switch is implied by this PR.

Tests

  • nix-instantiate --eval --strict --json -E '(import ./nixos/vm-guests)' — pass; returns the registry with carveOuts: [], waivers: [].
  • nix eval .#vmGuests.renderer.libvirt --raw — pass, prints nixvirt (oracle: the flake output evaluates through the full flake).
  • nixfmt --check nixos/vm-guests/default.nix flake.nix — pass.

Refs #5772 — deliberately no closing keyword: the issue stays open for the step-2/3 lifecycle proofs.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@dezren39
dezren39 requested a review from a team as a code owner November 13, 2026 03:08
@coderabbitai

coderabbitai Bot commented Nov 13, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 9 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: af58f8e6-873d-496c-bbf7-6f7998e25f90
Commits

Reviewing files that changed from the base of the PR and between 0c50fad and ae26328.

Files selected for processing: 3

  • doc/2026-11-12_vm-guests-generation-discipline.md
  • flake.nix
  • nixos/vm-guests/default.nix
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-13T03:09:57.161655Z ae26328 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@dezren39
dezren39 merged commit 878f082 into main Nov 13, 2026
11 checks passed
@dezren39
dezren39 deleted the queue/14378-5772-vm-guests branch November 13, 2026 03:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant