feat(fw): add cloonar.vms QEMU launcher and migrate openclaw (ADR-0018) #163
No reviewers
Labels
No labels
bug
enhancement
in-progress
needs-info
needs-triage
p0
ready-for-agent
ready-for-human
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Cloonar/nixos!163
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "afk/160"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
First slice of the dev → self-managed QEMU VM migration (ADR-0018, PR1). Pure Nix, dry-build-gated, no runtime cutover — the running dev microVM (.97.15) is untouched.
What
utils/modules/qemu-vm.nix— new reusable launcher exposingcloonar.vms.<name>: a state-dir tmpfile, a<name>-vm-initoneshot (download Ubuntu cloud image → qcow2 + resize → regenerate the cloud-init seed ISO), and a<name>-vmservice (tap up on theserverbridge → qemu → tap down). Options:mac/ip/mem/vcpu/diskSizeG/autostart/cpuWeight/cloudInit(sshKeys/packages/runcmd/writeFiles). cloud-init user-data is rendered viapkgs.formats.yaml, so arbitrarywriteFilescontent is quoted/indented correctly instead of hand-spliced into a template. The gateway/nameserver is derived as.1of the IP's /24.Migrate openclaw onto
cloonar.vms.openclaw— the two-consumer proof. Behaviour unchanged: same.97.61, MAC, 2 GiB / 2 vcpu, opt-in start,openclaw-vmunit and/var/lib/openclaw-vmstate dir, and thesetup-openclawruncmd. The only delta is the internal tap name (vm-openclaw→vm-openclaw-vm), still matchingvm-*.Add
cloonar.vms.dev— a temporary parallel VM on.97.16+ a temp MAC,autostart, 100 GiB,cpuWeight = 20. Its tapvm-dev-vmdeliberately avoids the live microVM'svm-dev. The microVM keeps.97.15; mem/vcpu stay at module defaults until cutover.Safety
No collision with the live microVM: distinct unit (
dev-vmvsmicrovm@dev), tap (vm-dev-vmvsvm-dev), MAC (…04:01vs…02:01), IP (.16vs.15), and state dir.cpu-priorities.nixis left targetingmicrovm@dev(still present); it folds into the new unit at cutover (PR3).Pre-commit dry-build green for all 6 hosts.
Closes #160
Validation: PASS — ready to merge pending maintainer go-ahead.
Signal relied on: this repo's gate is the commit-time pre-commit dry-build (eval). The body reports it green for all 6 hosts, and the diff adds no derivation
src/*Hash(the Ubuntu image is a runtimecurl, not a Nix fetch), so eval-only has no blind spot here — not re-run, per the repo's gate model.Checked:
Closes #160present (headafk/160).secrets.yamledit; nostateVersionchange; module imported by explicit path.utils/modules/qemu-vm.nix): faithful generalisation of the openclaw lifecycle —pkgs.formats.yamlseed (safer than the old hand-spliced template), gateway derived as.1of the/24, opt-in vsautostart, optionalCPUWeight, tap on theserverbridge with a-vmsuffix to dodge the livevm-dev..97.61/ MAC / 2 GiB / 2 vcpu / 20 G / opt-in /openclaw-vmunit + state dir + setup runcmd. Only delta: tapvm-openclaw → vm-openclaw-vm(cosmetic).dev-vmvsmicrovm@dev), tap (vm-dev-vmvsvm-dev), MAC (…04:01 vs …02:01), IP (.16 vs .15), state dir.Non-blocking notes for PR2 (#161):
-serial mon:stdiounder systemd routes the console to the journal, not an interactive TTY — so thenixos-infect"serial console safety net" will in practice be SSH to.97.16; plan a real fallback (qemu monitor socket) in case infect drops the NIC.cpu-priorities.nixstill targetsmicrovm@dev; it folds intodev-vmat cutover (PR3), as the body notes.