Repository navigation
feat!: support systemd 259 with raw VM disks - #55
Conversation
vmspawn 259, which Fedora 44 and Ubuntu 26.04 LTS ship, lacks --user, --image-format and disk formats in --extra-drive; 261 added --firmware=describe. Launch now passes only flags 259 accepts (ADR-0005): - --user is dropped: the launch namespace keeps the user's UID, so vmspawn already runs in the user's service manager. - The root is root.raw, a FICLONE clone of the cached image or a copy that skips holes and zero blocks, extended to 16 GiB. The data disk is a sparse data.raw that grows by extension; growth still records its target first and resumes. qemu-img is no longer a prerequisite. - doctor and launch refuse a vmspawn older than 259 and name both versions. doctor then finds firmware through --firmware=list and the selection rules systemd 259 to 262 share. probe-vm.py and probe-machines.py --isolated pass on systemd 262. A Fedora 44 acceptance run is still required before a release claims 259. BREAKING CHANGE: VM disks are raw. State directories with root.qcow2 and data.qcow2 are not migrated: convert data.qcow2 with `qemu-img convert -f qcow2 -O raw` before starting their VM. Refs #54 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bsherman
left a comment
There was a problem hiding this comment.
Approving after a Fedora 44 acceptance run of d0cd063.
Host: Fedora 44, systemd 259.9-1.fc44, kernel 7.2.8, btrfs, QEMU and virtiofsd from the Fedora packages. Image: VM r10 and Debian trixie machine r5, both from the cache.
Build and doctor
make buildandgo test ./...pass. I did not runmake ci.nsl doctorexits 0 and reportsOK systemd 259. It picks/usr/share/edk2/ovmf/OVMF_CODE_4M.qcow2, andqemu-imgis no longer listed.
probe-vm.py: all nine checks pass (readiness, formatting, allowlist, ownership, sockets, root replacement, growth, refusal, binding). Boot takes about 8 s. virtiofs shares and the read-only image cache work, so virtiofsd under systemd-socket-activate and the LISTEN_FDS fd passing both work on 259.9.
probe-machines.py --isolated: one Debian trixie machine and one isolated machine. Every check passes except broker on the normal machine. There, nsl-open reports "no desktop session" because waypipe is not installed on this host, which doctor flags as optional. This is not related to this change. Persistence passes for both machines after a VM restart.
Manual resize and recover with a live machine
- Data disk 128 → 160 GiB.
data.rawgrows by extension, stays sparse, and the guest filesystem grows on the next start. recovermakes a freshroot.raw, and the data disk, machine and keys are unchanged. A marker file survives both.resize --disk 40is refused with "shrinking the data disk is not supported".
Not covered: Ubuntu 26.04 on ext4, and the recover timing there.
With the Fedora 44 items ticked, I have no objection to merging.
The plan still listed the Fedora 44 run as required. bsherman ran it on systemd 259.9 against d0cd063 before #55 merged: probe-vm.py passed all nine checks, probe-machines.py --isolated passed but for broker on a host without Waypipe, and manual growth, recover and shrink refusal behaved. Only the Ubuntu 26.04 ext4 timing stays open. Refs #54 Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Lowers nsl's host floor from systemd 261 to 259, the version Fedora 44 and Ubuntu 26.04 LTS ship. No stable distribution ships 260, so 259 is the useful floor. Closes #54.
Do not merge until a Fedora 44 acceptance run passes. The 259 floor rests on vmspawn 259.9's source. No 259 host has run it yet, and 259 starts virtiofsd differently from 260 and later.
Changes
--useris dropped. The launch namespace (unshare --map-current-user) keeps the user's UID, so vmspawn already runs in the user's service manager.--image-formatand theqcow2:virtio-blk:drive prefix are gone.root.rawis aFICLONEclone of the cached image. Without shared extents, it is a copy that skips holes and zero blocks. Either way it is extended to 16 GiB, synced and renamed into place.data.rawis a sparse file that grows by extension. Growth still records its target first and resumes after an interruption.qemu-imgcall are gone, soqemu-imgis no longer a prerequisite.doctorand launch refuse a vmspawn older than 259 and name both versions. Launch refuses before changing any state.doctorreads the descriptors--firmware=listreturns, in order, and applies the selection rules systemd 259 to 262 share. vmspawn 259 has no--firmware=describe.Breaking change
State directories created before this change hold
root.qcow2anddata.qcow2, and nothing migrates them. With this build, a VM from such a directory boots on a new blankdata.rawand fails readiness; the old disks are left untouched. To keep a VM, convert its data disk while the VM is stopped:qemu-img convert -f qcow2 -O raw data.qcow2 data.raw && chmod 600 data.rawValidation
Host: systemd 262 (262-1), kernel 7.2.8, QEMU 10.0.13, virtiofsd 1.13.2, NVMe btrfs. VM image r10.
make ciandmake siteprobe-vm.py: all nine checks pass with raw disks and no--userprobe-machines.py --isolatedwith Debian r5, Fedora 44 r4 and an isolated Debian machine: every check passes except one item. In Fedora's tally, reinstallingtzdatafailed because the cached r4 image's version has left Fedora's repositories; its time-zone link was correct.doctorpicks/usr/share/OVMF/OVMF_CODE_4M.fd, the same firmware as vmspawn 262's--firmware=describe --secure-boot=noprobe-vm.pyandprobe-machines.py --isolated, covering virtiofs shares, the read-only image cache,update,recover,resizeand an isolated machinerecoverfor the shared VM and an isolated machine🤖 Generated with Claude Code