8000
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
vivarium: run the agent inside a RouterOS container for a store-view-free, zero-network control channel #955
Today a RouterOS guest is driven over its serial console with a text dialect (#945). If our own agent ran on the router, vivarium could drive it like a NixOS guest and proxy RouterOS's HTTP API (so terraform et al. work with no initial network config on the device). RouterOS 7 has an official /container feature, so this needs no exploit — it uses documented functionality on an image we own.
Probed on CHR 7.24.5 (2026-10-21):
/container attaches a veth and mounts host directories. It does not pass through a tty/serial device. CHR has one serial port (serial0), already the management console, so serial into a container is out.
Containers are off by default: device-mode container=no, container.npk not installed. Enabling needs the package plus a device-mode update, which requires a confirmed reboot (scriptable in a VM via a power cycle; a real step, not free).
The channel, given no tty — a shared directory, which is the clean part:
QEMU exposes a host dir (9p/virtiofs) → RouterOS sees it as a /disk → /container mounts maps it into the container → the agent does file-based request/response there. No IP, no veth, no console bootstrap: zero network config, which is the whole point.
Alternative: the container's veth with a link-local address and the agent on 127.0.0.1 talking to the ROS HTTP API; vivarium reaches it through a host port-forward. Needs one-time ROS config, so less clean than the mount.
Steps:
Build a RouterOS container image holding a static agent build (our agent, or a thin shim that bridges the file channel to http://127.0.0.1/rest).
A vivarium.routeros.agent = true that: enables device-mode container + installs the npk + reboots, adds the container with the shared mount, starts it.
A RouterOsAgentControl (Control, Run MikroTik RouterOS as a vivarium guest #945) that speaks the file channel instead of the serial dialect, and exposes /rest to phases as structured data.
Payoff: terraform/ansible against a freshly-booted router with no pre-config, and a uniform agent channel across NixOS and RouterOS.
Risk: the device-mode reboot dance, container npk availability per arch, and whether CHR's confined container runtime allows the mount reliably. A spike, not a near-term test.
Activity