qemu-vm.nix module + migrate openclaw + dev VM shell (ADR-0018, PR1) #160

Closed
opened 2026-06-14 14:52:40 +02:00 by dominik.polakovics · 0 comments

ADR: https://git.cloonar.com/Cloonar/nixos/src/branch/main/docs/adr/0018-dev-self-managed-qemu-vm.md

First slice of the dev → self-managed QEMU VM migration (ADR-0018). Pure Nix, dry-build-gated, worktree→PR — no runtime cutover. Safe to land: it only adds a module, refactors openclaw, and boots an idle temp VM; the running dev microvm is untouched.

  • Add utils/modules/qemu-vm.nix exposing cloonar.vms.<name>: state-dir tmpfiles, a <name>-init oneshot (download Ubuntu cloud image → qcow2 + resize → regenerate cloud-init seed ISO), and a <name>.service (tap-up on the server bridge → qemu → tap-down). Options: mac / ip / mem / vcpu / diskSizeG / autostart / cpuWeight / cloudInit (sshKeys / packages / runcmd / writeFiles). Model on hosts/fw/vms/openclaw/default.nix.
  • Migrate openclaw onto cloonar.vms.openclaw — the two-consumer proof. Behaviour unchanged: same .97.61, MAC, 2 G / 2 vcpu, opt-in start, the setup-openclaw runcmd.
  • Add cloonar.vms.dev on a temp .97.16 + temp MAC, autostart, 100 G, cpuWeight. The old microvm keeps .97.15.

Split from #159.

ADR: https://git.cloonar.com/Cloonar/nixos/src/branch/main/docs/adr/0018-dev-self-managed-qemu-vm.md First slice of the dev → self-managed QEMU VM migration (ADR-0018). Pure Nix, dry-build-gated, worktree→PR — no runtime cutover. Safe to land: it only adds a module, refactors openclaw, and boots an idle temp VM; the running dev microvm is untouched. - [ ] Add `utils/modules/qemu-vm.nix` exposing `cloonar.vms.<name>`: state-dir tmpfiles, a `<name>-init` oneshot (download Ubuntu cloud image → qcow2 + resize → regenerate cloud-init seed ISO), and a `<name>.service` (tap-up on the `server` bridge → qemu → tap-down). Options: `mac` / `ip` / `mem` / `vcpu` / `diskSizeG` / `autostart` / `cpuWeight` / `cloudInit` (sshKeys / packages / runcmd / writeFiles). Model on `hosts/fw/vms/openclaw/default.nix`. - [ ] Migrate `openclaw` onto `cloonar.vms.openclaw` — the two-consumer proof. Behaviour unchanged: same `.97.61`, MAC, 2 G / 2 vcpu, opt-in start, the setup-openclaw runcmd. - [ ] Add `cloonar.vms.dev` on a temp `.97.16` + temp MAC, autostart, 100 G, `cpuWeight`. The old microvm keeps `.97.15`. Split from #159.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Cloonar/nixos#160
No description provided.