Skip to content

libkrun based connector VMM sandbox - #3541

Closed
dgreer-dev wants to merge 6 commits into
masterfrom
daveg/libkrun-sandbox
Closed

dgreer-dev wants to merge 6 commits into
masterfrom
daveg/libkrun-sandbox

Conversation

@dgreer-dev

@dgreer-dev dgreer-dev commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

(Draft to work out CI things, not ready for review (although always happy for more eyes))

Add the components needed to run a connector inside a libkrun microVM.

  • Add guest initialization for networking, mounts, and workload identity, and let connector-init serve RPC over vsock.
  • Add the VMM launch path, DNS-gated public egress policy, scratch and optional persistent storage, and real and fake amd64 images.
  • Add opt-in KVM tests for launch, RPC, storage, egress, readiness, and teardown.

The DNS allowlist makes intended destinations reviewable and the VMM enforces the egress policy while it remains intact. Host-side enforcement that would survive a compromised VMM isn't provided by this PR but will be wired up in the operationalizing PR.

Comment thread crates/connector-vmm-tests/fixtures/probes.py Dismissed
Comment thread crates/connector-vmm/src/net.rs Fixed
@dgreer-dev
dgreer-dev force-pushed the daveg/libkrun-sandbox branch from 4f70834 to 369f2db Compare September 29, 2026 13:59
@dgreer-dev
dgreer-dev force-pushed the daveg/libkrun-sandbox branch from 369f2db to d388b8d Compare September 29, 2026 16:01
…L alert

Cargo builds a package's binaries whenever it builds one of the package's
integration tests, so tests/vsock.rs still made nextest put a glibc
flow-connector-init in $CARGO_TARGET_DIR/debug even after the test stopped
spawning it. locate_bin and $PATH lookups prefer that over the musl build
connector containers need, and the Go tests kept failing on GLIBC_2.39. The
test is now a Linux-only unit test in the library, which also lets
connector-init's tests compile on macOS again. ci:connector-vmm-kvm runs it
by name through --lib.

vmm_subnets walks the getifaddrs list with `cursor.as_ref()`, which folds the
null check into the dereference that CodeQL's rust/access-invalid-pointer
flagged. Behavior is unchanged.
@dgreer-dev dgreer-dev closed this Oct 8, 2026
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.

2 participants