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).

Acceptance criteria

  • The renderer pick for libvirt guests (nixvirt vs flake-generated libvirt XML) is recorded in this issue with the reasoning; microvm.nix's role for ephemeral guests is stated.
  • Declarative guest definitions exist in the repo for the guest set the deployment-architecture epic calls for, with the mutable carve-out list written down explicitly.
  • A guest can be defined, rendered, and started from the declarative definition alone (no hand-built libvirt state).

Activity

  1. developing-today commented on Nov 5, 2026

    @developing-today
    Contributor
  2. added
    queue/queued
    task/triage
    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/claimed
    status/in-progress
    work/assigned
    and removed
    queue/queued
    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/parked
    status/parked
    and removed
    queue/claimed
    status/in-progress
    on Nov 5, 2026
  8. 149 remaining items

  9. removed
    queue/blocked
    on Nov 22, 2026
  10. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor
  11. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Agent note — picked up (task 14378, lane oc-code-03)

    Fresh verification 2026-11-23: #5772 OPEN, no hard-stop labels (task/triage, status/parked, queue/parked, work/assigned); gate #10083 still OPEN (non-reproducing since 2026-11-18 triage, not cleared); no open PRs for #5772. Static deliverables from PR #9186 confirmed present (nixos/vm-guests/default.nix: renderer nixvirt/microvm.nix, empty carveOuts/waivers + waiverRule; discipline doc with deploy vm: spec). Worktree clean, no source changes. Host seat is amd, but this is a shared multi-lane scheduled run, so no nixos-rebuild switch or guest lifecycle ops here.

    Next: park for a quiesced amd host window + fresh terminal disposition for #10083, then run the doc section 5 lifecycle proofs. Do not close #5772 on the desk-work slice.

  12. dezren39 commented on Nov 24, 2026

    @dezren39
    MemberAuthor

    Agent note — picked up, revalidated, parked (2026-11-24, lane oc-code-07)

  13. developing-today-fleet commented on Nov 26, 2026

    @developing-today-fleet
    Contributor

    Agent note — revalidated and parked (2026-11-26, lane code-f)

  14. developing-today-fleet commented on Nov 26, 2026

    @developing-today-fleet
    Contributor

    Fresh recheck (2026-11-26): #5772 remains OPEN and the lifecycle proofs remain outstanding. Dependency #10083 is now CLOSED. The current machine is reachable and load is 6.73/7.71/9.29 on 16 CPUs, but the shared checkout has 237 modified/untracked paths from concurrent work; I made no host or repository changes and will not run NixOS switches or guest lifecycle operations in this state. Resume during a dedicated quiesced AMD host visit for the section 5 microVM and nixvirt proofs.

  15. developing-today-fleet commented on Nov 27, 2026

    @developing-today-fleet
    Contributor

    Fresh revalidation (2026-11-27, lane oc-code-08):

    Parked for an external ready condition: a dedicated quiesced AMD host window with the shared checkout clear of concurrent modifications. Do not close #5772 until both §5 lifecycle proofs are recorded.

  16. dezren39 commented on Nov 28, 2026

    @dezren39
    MemberAuthor

    Agent note — lane 1237-D verified park (alpha DRIVE 2026-11-28): host-proof remainder, not a Git-API slice.

  17. dezren39 commented on Nov 29, 2026

    @dezren39
    MemberAuthor

    🤖 Census note — 2026-11-29 (lane CEN-C04, full-census pass)

    Verdict: blocked on a dedicated quiesced AMD host window. Rechecked firsthand. Landed: PR #9186 (renderer decision, guest registry + mutable carve-out list with waiver rule, deploy vm: spec). Dependency #10083 is CLOSED. Sole remaining acceptance / blocker: the live AMD-host lifecycle proof in doc/2026-11-12_vm-guests-generation-discipline.md §5 — microVM profile enable/rebuild/start/rollback plus nixvirt guest define/start/rollback/destroy on host amd. Prior firsthand checks found the shared host busy (load ~19/15/12 on 16 CPUs) with a heavily modified shared checkout; a NixOS switch or guest lifecycle run is not safe to improvise in that state. Resume condition: a quiesced host window with the shared checkout clear.

    Census actions: no label changes — labels already sane.

  18. added
    kind/infrastructure
    on Nov 29, 2026
  19. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    Contributor

    Census 2026-11-29 (Felix):

  20. added
    effort/m
    area/infra
    on Nov 29, 2026
  21. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    Contributor

    Issue census — 2026-11-29

    Gaps found: no kind/, no effort/, no app//area/ label; no acceptance criteria section (the body is a single flowing brief with no headers).
    Strengths: current state verified at inventory time (libvirtd enabled, zero guest definitions anywhere, microvm.nix seed and the commented-out prometheus profile located precisely), the evaluation ask (nixvirt vs flake-generated XML, pick recorded with reasoning) is explicit, and it is tied to the deployment-architecture epic via PR #5764 §6.
    Actions: added labels kind/infrastructure, effort/m, area/infra; appended a ## Acceptance criteria section derived from the body's own work list (original text untouched). Priority unchanged (normal). Parked/assigned labels left as they stand.

  22. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    Contributor

    oc-code-07 revalidation — 2026-11-29

    Disposition: keep #5772 open and park task 14378 until the AMD host is quiesced and its shared checkout is clear. Then perform both lifecycle proofs and record evidence before closing. No files or host state were changed.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/infraeffort/mepic/lab-clusterkind/infrastructurepriority/normalqueue/parkedstatus/parkedtask/triagework/assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions