2.3 KiB
2.3 KiB
ECP-0087: LAN-Capable iPXE/QEMU VM Module
Status: Implemented
Context
every.channel already has reusable runner and netboot modules, but hosts that want a continuously-running iPXE test VM still have to carry ad hoc QEMU glue. That makes boot-path verification and downstream reuse harder, and it prevents hosts from declaratively opting into a LAN-visible guest for tuner discovery.
Decision
- Add
nixosModules.ec-ipxe-qemuatnix/modules/ec-ipxe-qemu.nix. - Add a dedicated publisher guest module/output pair:
nixosModules.ec-publisher-guestnixosConfigurations.ec-publisher-x86_64nixosConfigurations.ec-publisher-x86_64-netbootThis keeps the VM path explicitly publisher-oriented while leaving host-specific tuner/broadcast choices to downstream configs.
- Define
services.every-channel.ipxe-qemu.*options for:- persistent qcow2/state directory handling,
- user-mode iPXE boot networking that chains to a configurable internet boot URL,
- optional second NIC via
macvtapfor non-disruptive LAN presence, - guest sizing and raw QEMU argument overrides.
- Run the guest as a persistent systemd service (
every-channel-ipxe-qemu) with restart-on-exit semantics so host restarts or config switches naturally refresh the in-memory booted VM. - Enable one conservative instance on
ecp-forgeusing the user-mode boot path only, so the module is exercised in-repo without assuming a local tuner LAN on the forge host.
Alternatives Considered
- Keep host-specific shell glue outside
every.channel. Rejected because downstream hosts cannot reuse or review the boot path as a first-class module. - Require a Linux bridge on the host for LAN access. Rejected for now because it is more disruptive than
macvtapand unnecessary for an initial deployment. - Boot only with QEMU user networking. Rejected because tuner discovery needs a real LAN attachment on some hosts.
Rollout / Teardown
- Rollout:
- import
nixosModules.ec-ipxe-qemu, - enable
services.every-channel.ipxe-qemu, - set
lan.enable = truepluslan.macvtap.interfaceon hosts that need LAN discovery.
- import
- Teardown:
- disable
services.every-channel.ipxe-qemu.enable, - remove host options,
- fall back to ad hoc QEMU or direct host publishers if needed.
- disable