Skip to content

VMs: declarative guest definitions (nixvirt / microvm.nix) + mutable carve-out list #5772

Open

Description

@dezren39

VM track of the deployment-architecture epic (design: PR #5764 §6).

Current state (2026-11-04 inventory): virtualisation.libvirtd.enable = true in the laptop profile and zero guest definitions anywhere — no libvirt XML, no nixvirt, no virsh-managed domains in any repo. Seeds present: microvm.nix is a flake input with one defined VM (prometheus, qemu, 2 vCPU/1 GB, virtiofs /nix/store share) whose profile is commented out on amd (nixos/hosts/default.nix:30); the flake has lib.make-vm-configurations machinery (per-host vm_<host> NixOS variants).

Work:

  • Evaluate nixvirt (declarative libvirt domains/networks/pools as Nix) vs flake-generated libvirt XML as the renderer for libvirt guests; record the pick and why in this issue. microvm.nix is the presumptive answer for ephemeral/agent-class guests — confirm or refute.
  • Define the guest generation shape: {domain definition, disk image (flake-built), NixOS source rev}; data volumes attach to generations, never live inside them.
  • Land the first declarative guests: bring prometheus under generation discipline (enable the microvm profile deliberately or supersede it), plus one libvirt guest end-to-end if a real need exists — otherwise the renderer + a throwaway test guest that is defined, started, rolled back, and destroyed as the acceptance proof.
  • Write the mutable carve-out list (starts empty): guests that may drift in data but not OS definition (DB hosts, lab stateful nodes), and the rule that full drift requires a named waiver with owner + reason.

Acceptance: at least one guest of each class (microVM, libvirt) can be defined/started/rolled back from flake state alone on a clean checkout; the carve-out list exists in the flake (even if empty) with the waiver rule stated; deploy vm:<name> integration is specced (implementation may ride the deploy tool's later target classes).

Activity

  1. developing-today commented on Nov 5, 2026

    @developing-today
    Contributor
  2. added
    queue/queuedHas a queued task in the Supabase agent queue
    task/triageQueue packet kind: verify, reproduce, and route this item
    on Nov 5, 2026
  3. developing-today commented on Nov 5, 2026

    @developing-today
    Contributor

    agent-note:v1
    task: 10178
    lane: code-u
    state: handed-off
    summary: Task 10178 claimed by lane code-u; execution-lane assignment returned opencode, so this task is handed off to the opencode claimant per the worker runbook §1b. Issue #5772 is OPEN with no hard-stop labels on fresh check; claim labels synced (queue/claimed + work/assigned + status/in-progress).
    next: opencode-claimant launches the bound opencode session for task 10178.

  4. added
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 5, 2026
  5. developing-today commented on Nov 5, 2026

    @developing-today
    Contributor

    agent-note:v1
    task: 10178
    lane: code-u
    state: handed-off
    summary: Task 10178 re-claimed by lane code-u after the first opencode handoff's lease expired without a claimant launch; execution-lane assignment again returned opencode, so the task is handed off to the opencode claimant again per the worker runbook §1b. Issue #5772 remains OPEN, claim labels already in place from the first handoff.
    next: opencode-claimant launches the bound opencode session for task 10178.

  6. dezren39 commented on Nov 5, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

  7. added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    queue/claimedQueue worker lifecycle state
    on Nov 5, 2026
  8. dezren39 commented on Nov 5, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · state: handed off

  9. dezren39 commented on Nov 5, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

  10. added
    queue/claimedQueue worker lifecycle state
    and removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 5, 2026
  11. dezren39 commented on Nov 5, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

  12. dezren39 commented on Nov 5, 2026

    @dezren39
    MemberAuthor

    Triage result (verified against current main)

    Issue #5772 remains open. The architecture decision is already recorded in merged PR #5764 §6, but implementation is not complete: current main has no libvirt domain definitions; the prometheus microVM is declared but the microvm profile remains disabled on amd.

    Evidence at main 00a294ab6a38b23b3a3f855ff5e6102d5aed78c5:

    Scoped path and order: (1) implement the §6 guest-generation contract: NixOS source revision + generated domain definition + flake-built disk image, with data volumes attached but outside the rollback unit; use nixvirt as the libvirt renderer and generated XML as fallback, and microvm.nix for ephemeral/agent-class guests. (2) Add the finite carve-out registry, initially empty; every exception needs an owner and reason. (3) Prove both classes from a clean checkout: deliberately enable/test the Prometheus microVM and use a throwaway libvirt guest (no production guest need is established), covering define/start/rollback/destroy. (4) Treat deploy vm:<name> lifecycle wiring as a follow-on to the deploy tool target-class work, as PR #5764 already allows.

    No design blocker surfaced in triage. Runtime acceptance needs a safe test host/throwaway guest; no Nix evaluation or guest runtime test was run in this triage-only pass.

    🤖 Agent note · state: triaged

  13. dezren39 commented on Nov 5, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

task/triageQueue packet kind: verify, reproduce, and route this item

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions