Skip to content

vms-7bd: virtio-net NIC on the OVMX QEMU runtime (user-mode default, opt-in tap/bridge) - #419

Merged
baron-3dl merged 1 commit into
mainfrom
vms-7bd-virtio-nic
Aug 13, 2026
Merged

baron-3dl merged 1 commit into
mainfrom
vms-7bd-virtio-nic

Conversation

@baron-3dl

Copy link
Copy Markdown
Contributor

What

Adds a virtio-net NIC to the OVMX QEMU runtime — the Linux-layer NIC infra prerequisite for TCP/IP Services (parent vms-67f; unblocks vms-3be, vms-9d2). The VMS device face (EWAn:) is a separate downstream item and is out of scope here.

Both runtime launch paths — distro/boot/run-qemu.sh and the distro/Dockerfile.bootable runtime CMD — previously passed -nic none (no guest network device). They now attach exactly one virtio-net-pci device, keeping -nodefaults and adding only -netdev/-device.

Modes (OVMX_NET_MODE)

Mode Behavior
user (default) user-mode NAT (SLIRP) — zero host config, unprivileged, CI-safe. No inbound by default (opt-in via OVMX_NET_HOSTFWD).
tap pre-existing host tap (OVMX_NET_TAP, default tap0), script=no — operator provisions/bridges it.
bridge existing host bridge (OVMX_NET_BRIDGE, default br0) via qemu-bridge-helper.
none legacy no-NIC escape hatch.

OVMX_NET_MAC sets an explicit MAC. The PXE option ROM is disabled (romfile=) so the guest never pauses to network-boot.

tap/bridge need privileged, operator-provisioned host state and never work in unprivileged CI — hence user mode is the safe default. The launcher never creates a tap or bridge as a side effect (shared-host rule: no host-networking mutation).

Kernel support

The guest kernel (ubuntu generic 6.8) has virtio_net built in (CONFIG_VIRTIO_NET=y) — verified from the shipped vmlinux .modinfo (the virtio_net.* module params appear in vmlinux only for builtin drivers). So the interface enumerates with no in-guest module load and no kernel-config change.

Test — tests/qemu/test_virtio_nic.sh

Wired into the persistent-boot CI job (reuses the already-built ovmx-boot image) and the boot path filter, mirroring test_distrib_boot.sh.

  • Part 1/2 (deterministic, no boot): the launcher + Dockerfile CMD emit the right -netdev/-device for every mode (via a new OVMX_QEMU_DRYRUN hook) — user default, opt-in tap/bridge/hostfwd, -nic none gone, -nodefaults kept, bad mode rejected.
  • Part 3 (real boot): with the default user-mode NIC the guest kernel enumerates the virtio-net Ethernet controller (PCI 1af4:1000/1041, class 0x020000), the PXE ROM is suppressed, and the executive still attaches (NIC did not regress boot).

Verified empirically in-session: 18/18 checks pass (15/15 deterministic on the host + 3/3 real-boot against the extracted kernel + slim initramfs). virtio_net is silent on a successful probe (unlike virtio_blk), so the PCI enumeration line — made observable by raising loglevel in the test's own invocation — is the honest guest-side ground-source available without a guest shell.

Documented gaps (not faked)

  • Asserting the netdev interface is up (ip link) and that user-mode NAT reaches the host needs an in-guest introspection channel the bootstrap initramfs lacks (init is STARTUP.EXE; no shell/dhclient). That arrives with the EWAn: device face + TCP/IP stack downstream.
  • tap/bridge modes need a privileged host and are covered only at the arg-construction level.

🤖 Generated with Claude Code

…opt-in tap/bridge)

The runtime launcher (distro/boot/run-qemu.sh) and the Dockerfile.bootable
runtime CMD previously passed -nic none: the guest had no network device. This
is the LINUX-LAYER NIC infra for TCP/IP Services (parent vms-67f); the VMS
device face (EWAn:) is downstream (vms-3be/vms-9d2).

Both launch paths now attach exactly one virtio-net-pci device, keeping
-nodefaults and adding only -netdev/-device:

  OVMX_NET_MODE=user   (DEFAULT) user-mode NAT (SLIRP) -- zero host config,
                                 unprivileged, CI-safe; NO inbound by default
                                 (opt-in via OVMX_NET_HOSTFWD).
              =tap             pre-existing host tap (OVMX_NET_TAP), script=no
              =bridge          existing host bridge (OVMX_NET_BRIDGE) via helper
              =none            legacy no-NIC escape hatch
  OVMX_NET_MAC   optional guest MAC.

tap/bridge need operator-provisioned, privileged host state and never work in
unprivileged CI, so user mode is the safe default; the launcher never creates a
tap or bridge as a side effect (Rule: no host mutation on the shared host). The
PXE option ROM is disabled (romfile=) so the guest never pauses to network-boot.

The guest kernel (ubuntu generic 6.8) has virtio_net BUILT IN
(CONFIG_VIRTIO_NET=y, verified from the shipped vmlinux .modinfo: virtio_net.*
module params only appear in vmlinux for builtin drivers). So the interface
enumerates with no in-guest module load and no kernel-config change.

Test: tests/qemu/test_virtio_nic.sh (wired into the persistent-boot CI job +
boot path filter, mirroring test_distrib_boot.sh):
  - Part 1/2 (deterministic, no boot): the launcher + Dockerfile CMD emit the
    right -netdev/-device for every mode via a new OVMX_QEMU_DRYRUN hook.
  - Part 3 (real boot): with the default user-mode NIC the guest kernel
    enumerates the virtio-net Ethernet controller (PCI 1af4:1000/1041, class
    0x020000), the PXE ROM is suppressed, and the executive still attaches.
    Verified empirically: 18/18 checks pass against a real boot.

Documented gaps (not faked): asserting the netdev INTERFACE is up (ip link) and
that user-mode NAT reaches the host needs an in-guest introspection channel the
bootstrap initramfs lacks (init is STARTUP.EXE; no shell/dhclient) -- that
arrives with the EWAn: device face + TCP/IP stack downstream. tap/bridge need a
privileged host and are covered only at the arg-construction level.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@baron-3dl
baron-3dl merged commit 2532e71 into main Aug 13, 2026
60 checks passed
baron-3dl added a commit that referenced this pull request Aug 13, 2026
#445)

Bump OVMX_PRODUCT_VERSION V0.4 → V0.4-1. 24 PRs / 32 commits since V0.4,
packed across dimensions (point release toward the 0.5 milestone):

  self-host (R7)  #409 lib$tparse · #411 CLI$ compiled-CLD · #413 sys$setddir
                  #414 lib$get_foreign · #415 sys$filescan (RTL foundation)
                  #418 parse_tables.mar→C (spine #2) · #429 LIBRARIAN.EXE+.OLB (spine #3)
                  #435 shareable-vector freeze (GSMATCH stability)
  authenticity    #421 veracity rubric (Q1 oracle-source/Q2 real-inject) · #424 30 oracle-pinned constants
                  #433 rmsdef.h 74 fabricated RMS codes → oracle
  UX/DCL/RMS      #422 SHOW CLUSTER real membership · #441 DCL per-@-level local scope
                  #442 RMS XAB dates → VMS 1858-epoch quadword
  networking      #419 virtio NIC (user-mode default + opt-in tap/bridge)
  docs            #423 clustering release train
  + swept: other threads' merged work on main since V0.4

Clustering config-authoring UX (vms-098) + its public-manual grounding gate
remain 0.5 (minor) deliverables — not triggered by this point cut.

Co-authored-by: alice <alice@workspace.local>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant