Skip to content

builders: add support for systemd-nspawn containers#986

Draft
jfly wants to merge 1 commit intoNixOS:mainfrom
jfly:add-support-for-nspawn-containers
Draft

builders: add support for systemd-nspawn containers#986
jfly wants to merge 1 commit intoNixOS:mainfrom
jfly:add-support-for-nspawn-containers

Conversation

@jfly
Copy link
Contributor

@jfly jfly commented Mar 24, 2026

This is part of #987. It gets
standalone nspawn containers working, but not tests that include both
nspawn containers and qemu vms.

We discussed this at our last team meeting, and folks didn't seem to
object to enabling these tests.

At the time, I thought it was a purely hypothetical conversation, but it
turns out that some of our jobsets in Hydra actually do include these
new tests
.

@@ -0,0 +1,13 @@
{
# From <https://github.com/NixOS/nixpkgs/blob/master/nixos/doc/manual/development/running-nixos-tests.section.md#system-requirements-sec-running-nixos-tests-requirements>:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mweinelt
Copy link
Member

Drafting while we find out how crazy it is to pass /dev/net into the sandbox.

@mweinelt mweinelt marked this pull request as draft March 24, 2026 12:11
@jfly
Copy link
Contributor Author

jfly commented Mar 24, 2026

@mweinelt, to get things unbroken ASAP, I would propose that we:

  1. Merge this PR as is (it does not include the questionable /dev/net mount).
  2. Disable tests that require communication between qemu and nspawn (for now): nixos/tests: disable nixosTests.nixos-test-driver.containers for now nixpkgs#503014

This is part of NixOS#987. It gets
standalone nspawn containers working, but not tests that include both
nspawn containers and qemu vms.

We discussed this at our last team meeting, and folks didn't seem to
object to enabling these tests.

At the time, I thought it was a purely hypothetical conversation, but it
turns out that some of our jobsets in Hydra actually do [include these
new tests](NixOS/nixpkgs#478109 (comment)).
@jfly jfly force-pushed the add-support-for-nspawn-containers branch from 01f10bc to b481df7 Compare March 24, 2026 12:20

# Required for communication between nspawn containers and qemu vms.
# Disabled for now, see <https://github.com/NixOS/infra/issues/987>.
# nix.settings.sandbox-paths = [ "/dev/net" ];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, I wasn't aware of this feature.

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.

3 participants