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: an out-of-band management network, so guests are provisioned the real way #958
Each non-NixOS guest needs its own console dialect today: RouterOS script, VyOS config.boot, a Linux shell for SONiC. That is a per-OS hack, and it grows with every NOS added. #657 lists "ssh through a passt forward" as one control level among several; this issue proposes making a real management plane the default, not an option.
Proposal. vivarium provides an out-of-band management segment: a DHCP + DNS service the runner hosts on it, and every guest's management interface leases an address there. The host then provisions each guest over its own management plane — SSH, a REST/NETCONF API, Ansible, cloud-init, or a config file the OS reads natively — instead of driving the serial console.
Soft-require. A guest that reaches the management net and accepts provisioning with no console uses it directly (SONiC VS: eth0 DHCP client + sshd on by default). One that needs a minimal bootstrap first — RouterOS to enable its API, VyOS config.boot to start sshd — does the smallest console step, then switches to the network channel. The console becomes a bootstrap layer, not the control plane.
What changes.
A management segment plus a DHCP/DNS service in the runner (dnsmasq-style), and a promise that every guest gets a lease.
A per-guest "provisioner" beside ControlKind (ssh / api / cloud-init / none), so a phase's execute/succeed runs over the real channel.
The console dialects (routeros.py, shell.py+sonic.py) shrink to bootstrap-only where a real channel exists.
First proof — SONiC milestone 2. Get eth0 a lease on the management net, SSH in, and apply config_db.json (config reload / sonic-cfggen) over SSH — no console config path. Then VyOS and RouterOS follow the same shape.
Related: #657 (weaker primitives), #948 (containerlab recipes), #955 (Terraform RouterOS over its API), #949 (anyio for the runner).
SONiC-over-SSH investigation (sonic-vs 202505, live guest), 2026-10-21:
eth0 gets a DHCP lease with zero config (passt gave 10.0.2.15/24, DNS 10.0.2.3). SONiC VS runs a dhclient on its management interface by default.
sshd is active and listening on 0.0.0.0:22 at boot, no console step.
SSH executes commands as admin over the wire (confirmed ssh admin@10.0.2.15 'show version' → ran). Password auth is on (Debian default); the console proved the YourPaSsWoRd credential.
So SONiC needs no console to be provisioned. config_db.json over SSH (scp + config reload, or sonic-cfggen) is the provisioning path.
Constraint that shapes the fabric: SONiC's management plane is eth0, which in vivarium is the uplink (nic 0 = passt). The data NICs become ASIC-managed switch ports (Ethernet0…), not Linux-IP interfaces, so a peer guest on a data segment cannot reach SONiC's sshd without first configuring an IP on a port (chicken-and-egg). Therefore the OOB management network must serve the uplink, not a data segment.
Implication for the Kea idea: passt already does a minimal version of this (DHCP + DNS + host forwards). A NixOS "services" guest with services.kea + a resolver is the controllable upgrade (custom DHCP options, real DNS records, PXE, and a real host on the net to run Ansible/Terraform from), and it doubles as the jump host since it runs the agent. The vivarium gap is letting a guest's uplink be a peer segment served by that services guest instead of passt — that is the core infra this issue needs.
Model: management in its own VRF, dataplane isolated. Mirrors Cumulus/SONiC practice — the OOB network lives in a mgmt VRF on the switch; administrative services (SSH, API, DHCP client, NTP, syslog) run through it; the dataplane never touches it. Dataplane egress off the host is non-default "deviating config", set per-test, not the norm.
The OOB fabric (NOS-agnostic core).
A guest's uplink (nic 0) becomes a peer segment, not passt. Mechanically small: nic 0 is one hardcoded -netdev stream (passt); attaching it to a dgram segment fd is what the data NICs already do.
A "services" guest: a minimal NixOS node on that segment running services.kea (DHCP4) + a resolver, with its own passt uplink for NAT where admin egress is wanted. It runs the vivarium agent, so it doubles as the jump host — real provisioning (SSH / API / Ansible / Terraform) runs from inside it.
Default topology: every guest's mgmt interface leases from Kea on the OOB segment; dataplane segments stay isolated L2 with no egress.
Per-NOS, two bootstrap classes:
Zero-bootstrap (SONiC):eth0 DHCP + sshd already on; the services guest provisions straight over SSH (config_db.json → config reload). Then config vrf add mgmt moves eth0 into the mgmt VRF.
Config-bootstrap (VyOS, RouterOS): the box needs its own native config first to bring up the mgmt plane — VyOS config.boot (service ssh, mgmt interface in a VRF), RouterOS a default config that puts ether1 in a mgmt VRF and binds api/ssh/winbox there. That config is the OS's legitimate provisioning, not a console hack. VyOS already runs the agent today; the OOB model is about its network/VRF shape and using VyOS's own config/API over the mgmt net.
Phased plan.
Core capability: vivarium.uplink = { segment = …; } + the Kea services guest, proven all-NixOS (a client leases from Kea on its uplink). De-risks the mechanism without NOS specifics.
SSH provisioning: the services guest applies config_db.json to SONiC over SSH; a small provisioner helper beside ControlKind.
mgmt-VRF defaults per NOS (SONiC mgmt VRF; VyOS/RouterOS config templates).
VyOS and RouterOS onto the same fabric; sonic-bgp etc. follow.
Management-VRF finding on sonic-vs 202505 (increment 3), 2026-10-21:
Enabling the management VRF over SSH works at the config level but not the datapath:
sudo config vrf add mgmt succeeds; show mgmt-vrf then reports ManagementVRF : Enabled.
But the Linux mgmt VRF device is never created (show mgmt-vrf → Device "mgmt" does not exist; ip link show type vrf is empty), and eth0 is never moved into a VRF master.
This persists after sudo config reload -y. SSH to eth0 keeps working throughout.
So sonic-vs does not instantiate the management VRF — the L3 mgmt/dataplane isolation is a real-platform feature the virtual switch does not implement. A full reboot might apply it at boot, but vivarium's one-shot console login does not support rebooting a guest mid-run.
Implication for "mgmt in its own VRF, dataplane isolated": not demonstrable on sonic-vs beyond setting the config flag. Functional VRF isolation is better proven on a NOS whose VRF works in software (VyOS; RouterOS), or deferred to real gear. The OOB fabric already gives the practical mgmt/dataplane separation at the segment/topology level (SONiC's eth0 on the management segment, dataplane ports isolated).
Host reachability done (on bookmark vivarium/oob, not pushed).
The services guest is now the OOB gateway. servicesNode grows gateway, reservations and forwardPorts (all off by default, so the existing oob/oob-sonic/oob-routeros guests are byte-identical). With gateway
it routes the management segment out through its passt uplink and
masquerades, advertises itself as the DHCP default route, and DNATs a
forwarded port to a segment address.
This is the single point the host reaches an out-of-band guest through: a
guest whose uplink is on the management segment has no passt forward of its
own. The oob-gateway test proves both halves at once — the host reaches sw's web server only because the DNAT lands it and Kea's default route
brings the reply back. Passed sandboxed (oob-gateway.qemu).
Egress is unprovable in a sandbox (no network, as uplink records).
Measured by hand instead (2026-10-21, .driver): sw opens TCP to
1.1.1.1:443 through svc, source 10.42.0.10 — forwarding and masquerade
work.
VyOS is on the fabric now, the real way (bookmark vivarium/oob, not pushed).
Two steps got it there:
UML uplink-as-segment.vivarium.uplink.segment was QEMU-only. A UML
guest routes vec0 through uml-passt-bridge (it forks passt and
translates its length-prefixed frames); an uplink on a segment has no
passt, so it needs no bridge — vec0 becomes a plain fd transport like
the segment NICs. The oob-uml test is the oob lease over UML and
guards both paths (the services guest keeps its passt uplink).
VyOS on it. When uplink.segment is set, the vyos-guest module
renames vec0 to eth0 and gives config.boot an ethernet eth0 { address dhcp } stanza. VyOS leases its management
address from the services guest's Kea. Off the fabric the uplink stays
unmanaged, so a normal VyOS guest is byte-identical. The vyos-oob test
proves the lease end to end; passed sandboxed.
So the fabric now carries SONiC (provisioned over SSH), RouterOS (mgmt VRF)
and VyOS (leases over its uplink). Natural next for VyOS is a real mgmt VRF
(vrf name mgmt + interfaces ethernet eth0 { vrf mgmt }), the isolation
sonic-vs could not give — mirroring the RouterOS mgmt-VRF test.
VyOS keeps its management in a VRF now (bookmark vivarium/oob, not pushed) — the VyOS analogue of the RouterOS mgmt-VRF test.
vivarium.vyos.uplinkVrf puts eth0 (the uplink) in a VRF with a table of
its own: VyOS defines vrf name mgmt { table 100 } and binds eth0 to it.
The DHCP lease and its routes land in that table, apart from the dataplane
(eth1) in the default table. The open question — whether VyOS's DHCP client
places the lease into the VRF's table — resolved yes: eth0 comes up as master mgmt with its pool address, and routing is isolated.
The vyos-oob-vrf test proves it: the mgmt VRF reaches the services guest,
the default table reaches the dataplane, and neither reaches the other
(ip vrf exec mgmt ping vs a plain ping — separate tables, no route).
Passed sandboxed. Off the fabric, config.boot is byte-identical.
So "applies to VyOS" is complete: VyOS leases on its uplink and keeps a
real mgmt VRF, the same isolation RouterOS has and sonic-vs could not give.
SONiC can now be provisioned by a full config_db.json push, not only a config command per setting (bookmark vivarium/oob, not pushed).
A reload phase on the booted SONiC pulls the running config, edits it,
pushes the whole file back, and applies it with config reload. Two
findings worth recording, neither in SONiC's docs:
Management is outside config_db on sonic-vs. There is no MGMT_INTERFACE table — eth0 (the management interface) is configured
outside config_db — so config reload, which replaces config_db and
restarts SONiC's services, does not drop eth0 or SSH. This is what makes
a full-file reload safe to drive over the management network.
SwSS reports ready later than the dataplane shows the startup config. config reload refuses with "SwSS container is not ready" if run too
soon after boot, even after show ip interfaces already shows the
startup Loopback. A refused attempt bails at once, so the phase retries
the reload until SwSS accepts it (~140 s in practice).
So the per-NOS provisioning picture is complete: SONiC by command and by
config_db.json, RouterOS and VyOS by config over the fabric.
Activity
Lillecarl commentedon Oct 21, 2026
SONiC-over-SSH investigation (sonic-vs 202505, live guest), 2026-10-21:
eth0gets a DHCP lease with zero config (passt gave10.0.2.15/24, DNS10.0.2.3). SONiC VS runs a dhclient on its management interface by default.sshdis active and listening on0.0.0.0:22at boot, no console step.adminover the wire (confirmedssh admin@10.0.2.15 'show version'→ ran). Password auth is on (Debian default); the console proved theYourPaSsWoRdcredential.config_db.jsonover SSH (scp+config reload, orsonic-cfggen) is the provisioning path.Constraint that shapes the fabric: SONiC's management plane is
eth0, which in vivarium is the uplink (nic 0 = passt). The data NICs become ASIC-managed switch ports (Ethernet0…), not Linux-IP interfaces, so a peer guest on a data segment cannot reach SONiC's sshd without first configuring an IP on a port (chicken-and-egg). Therefore the OOB management network must serve the uplink, not a data segment.Implication for the Kea idea: passt already does a minimal version of this (DHCP + DNS + host forwards). A NixOS "services" guest with
services.kea+ a resolver is the controllable upgrade (custom DHCP options, real DNS records, PXE, and a real host on the net to run Ansible/Terraform from), and it doubles as the jump host since it runs the agent. The vivarium gap is letting a guest's uplink be a peer segment served by that services guest instead of passt — that is the core infra this issue needs.Assisted-By: Claude Opus 4.8
Lillecarl commentedon Oct 21, 2026
Refined design (with User)
Model: management in its own VRF, dataplane isolated. Mirrors Cumulus/SONiC practice — the OOB network lives in a
mgmtVRF on the switch; administrative services (SSH, API, DHCP client, NTP, syslog) run through it; the dataplane never touches it. Dataplane egress off the host is non-default "deviating config", set per-test, not the norm.The OOB fabric (NOS-agnostic core).
-netdev stream (passt); attaching it to adgramsegment fd is what the data NICs already do.services.kea(DHCP4) + a resolver, with its own passt uplink for NAT where admin egress is wanted. It runs the vivarium agent, so it doubles as the jump host — real provisioning (SSH / API / Ansible / Terraform) runs from inside it.Per-NOS, two bootstrap classes:
eth0DHCP +sshdalready on; the services guest provisions straight over SSH (config_db.json→config reload). Thenconfig vrf add mgmtmoveseth0into the mgmt VRF.config.boot(service ssh, mgmt interface in a VRF), RouterOS a default config that puts ether1 in a mgmt VRF and binds api/ssh/winbox there. That config is the OS's legitimate provisioning, not a console hack. VyOS already runs the agent today; the OOB model is about its network/VRF shape and using VyOS's own config/API over the mgmt net.Phased plan.
vivarium.uplink = { segment = …; }+ the Kea services guest, proven all-NixOS (a client leases from Kea on its uplink). De-risks the mechanism without NOS specifics.config_db.jsonto SONiC over SSH; a small provisioner helper besideControlKind.mgmtVRF; VyOS/RouterOS config templates).sonic-bgpetc. follow.Assisted-By: Claude Opus 4.8
Lillecarl commentedon Oct 21, 2026
Management-VRF finding on sonic-vs 202505 (increment 3), 2026-10-21:
Enabling the management VRF over SSH works at the config level but not the datapath:
sudo config vrf add mgmtsucceeds;show mgmt-vrfthen reportsManagementVRF : Enabled.mgmtVRF device is never created (show mgmt-vrf→Device "mgmt" does not exist;ip link show type vrfis empty), andeth0is never moved into a VRF master.sudo config reload -y. SSH toeth0keeps working throughout.So sonic-vs does not instantiate the management VRF — the L3 mgmt/dataplane isolation is a real-platform feature the virtual switch does not implement. A full reboot might apply it at boot, but vivarium's one-shot console login does not support rebooting a guest mid-run.
Implication for "mgmt in its own VRF, dataplane isolated": not demonstrable on sonic-vs beyond setting the config flag. Functional VRF isolation is better proven on a NOS whose VRF works in software (VyOS; RouterOS), or deferred to real gear. The OOB fabric already gives the practical mgmt/dataplane separation at the segment/topology level (SONiC's
eth0on the management segment, dataplane ports isolated).Lillecarl commentedon Oct 21, 2026
Host reachability done (on bookmark
vivarium/oob, not pushed).The services guest is now the OOB gateway.
servicesNodegrowsgateway,reservationsandforwardPorts(all off by default, so the existingoob/oob-sonic/oob-routerosguests are byte-identical). Withgatewayit routes the management segment out through its passt uplink and
masquerades, advertises itself as the DHCP default route, and DNATs a
forwarded port to a segment address.
This is the single point the host reaches an out-of-band guest through: a
guest whose uplink is on the management segment has no passt forward of its
own. The
oob-gatewaytest proves both halves at once — the host reachessw's web server only because the DNAT lands it and Kea's default routebrings the reply back. Passed sandboxed (
oob-gateway.qemu).Egress is unprovable in a sandbox (no network, as
uplinkrecords).Measured by hand instead (2026-10-21,
.driver):swopens TCP to1.1.1.1:443 through
svc, source 10.42.0.10 — forwarding and masqueradework.
Lillecarl commentedon Oct 21, 2026
VyOS is on the fabric now, the real way (bookmark
vivarium/oob, not pushed).Two steps got it there:
UML uplink-as-segment.
vivarium.uplink.segmentwas QEMU-only. A UMLguest routes
vec0throughuml-passt-bridge(it forks passt andtranslates its length-prefixed frames); an uplink on a segment has no
passt, so it needs no bridge —
vec0becomes a plain fd transport likethe segment NICs. The
oob-umltest is theooblease over UML andguards both paths (the services guest keeps its passt uplink).
VyOS on it. When
uplink.segmentis set, the vyos-guest modulerenames
vec0toeth0and givesconfig.bootanethernet eth0 { address dhcp }stanza. VyOS leases its managementaddress from the services guest's Kea. Off the fabric the uplink stays
unmanaged, so a normal VyOS guest is byte-identical. The
vyos-oobtestproves the lease end to end; passed sandboxed.
So the fabric now carries SONiC (provisioned over SSH), RouterOS (mgmt VRF)
and VyOS (leases over its uplink). Natural next for VyOS is a real mgmt VRF
(
vrf name mgmt+interfaces ethernet eth0 { vrf mgmt }), the isolationsonic-vs could not give — mirroring the RouterOS mgmt-VRF test.
Lillecarl commentedon Oct 21, 2026
VyOS keeps its management in a VRF now (bookmark
vivarium/oob, not pushed) — the VyOS analogue of the RouterOS mgmt-VRF test.vivarium.vyos.uplinkVrfputs eth0 (the uplink) in a VRF with a table ofits own: VyOS defines
vrf name mgmt { table 100 }and binds eth0 to it.The DHCP lease and its routes land in that table, apart from the dataplane
(eth1) in the default table. The open question — whether VyOS's DHCP client
places the lease into the VRF's table — resolved yes: eth0 comes up as
master mgmtwith its pool address, and routing is isolated.The
vyos-oob-vrftest proves it: the mgmt VRF reaches the services guest,the default table reaches the dataplane, and neither reaches the other
(
ip vrf exec mgmt pingvs a plain ping — separate tables, no route).Passed sandboxed. Off the fabric, config.boot is byte-identical.
So "applies to VyOS" is complete: VyOS leases on its uplink and keeps a
real mgmt VRF, the same isolation RouterOS has and sonic-vs could not give.
Lillecarl commentedon Oct 21, 2026
SONiC can now be provisioned by a full config_db.json push, not only a
configcommand per setting (bookmarkvivarium/oob, not pushed).A
reloadphase on the booted SONiC pulls the running config, edits it,pushes the whole file back, and applies it with
config reload. Twofindings worth recording, neither in SONiC's docs:
Management is outside config_db on sonic-vs. There is no
MGMT_INTERFACEtable — eth0 (the management interface) is configuredoutside config_db — so
config reload, which replaces config_db andrestarts SONiC's services, does not drop eth0 or SSH. This is what makes
a full-file reload safe to drive over the management network.
SwSS reports ready later than the dataplane shows the startup config.
config reloadrefuses with "SwSS container is not ready" if run toosoon after boot, even after
show ip interfacesalready shows thestartup Loopback. A refused attempt bails at once, so the phase retries
the reload until SwSS accepts it (~140 s in practice).
So the per-NOS provisioning picture is complete: SONiC by command and by
config_db.json, RouterOS and VyOS by config over the fabric.
feat(vivarium): a services guest hands out management leases with Kea
feat(vivarium): a guest's uplink can join a management segment, not p…
feat(vivarium): the services guest provisions SONiC over SSH
feat(vivarium): RouterOS keeps its management in a VRF
feat(vivarium): the services guest routes the out-of-band network
feat(vivarium): a UML guest's uplink can join a management segment
feat(vivarium): VyOS reaches the management fabric over a lease
feat(vivarium): VyOS keeps its management in a VRF
feat(vivarium): push a whole config_db.json to SONiC and reload
feat(vivarium): a services guest hands out management leases with Kea
feat(vivarium): a guest's uplink can join a management segment, not p…
feat(vivarium): the services guest provisions SONiC over SSH
feat(vivarium): RouterOS keeps its management in a VRF
feat(vivarium): the services guest routes the out-of-band network
feat(vivarium): a UML guest's uplink can join a management segment
feat(vivarium): VyOS reaches the management fabric over a lease
feat(vivarium): VyOS keeps its management in a VRF
feat(vivarium): push a whole config_db.json to SONiC and reload