Skip to content

feat(zone-kvm): enable TUN in the zone-kvm kernel - #290

Merged
graysonguarino merged 2 commits into
mainfrom
gguarino/enginfr-116-zone-kvm-tun
Oct 26, 2026
Merged

graysonguarino merged 2 commits into
mainfrom
gguarino/enginfr-116-zone-kvm-tun

Conversation

@graysonguarino

@graysonguarino graysonguarino commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds CONFIG_TUN=y to configs/x86_64/zone-kvm.fragment.config, so zones running the zone-kvm kernel get /dev/net/tun.

Why

We're trialling protect's KVM E2E suite directly in an Edera runner zone, without a nested QEMU rig VM, which is too slow at that depth. protect's KVM backend runs cloud-hypervisor, which gives each networked zone a TAP device through /dev/net/tun. The trial on the Intel runners got as far as device setup and stopped there: no Edera zone kernel has TUN.

CONFIG_TUN depends on NETDEVICES and NET_CORE, which zone.config already sets. The verify-config.py stickiness check will fail the build if it doesn't stick. PR CI doesn't build zone-kvm, so the first real check is the post-merge build.

Refs ENGINFR-116

protect's KVM backend runs cloud-hypervisor, which gives each networked zone a
TAP device through /dev/net/tun. Without CONFIG_TUN, protect cannot run its KVM
zones inside a zone-kvm zone, which the Edera CI runners need to run protect's
E2E suite without a nested rig VM.

CONFIG_TUN depends on NETDEVICES and NET_CORE, both already set in zone.config.

Refs ENGINFR-116
@graysonguarino
graysonguarino marked this pull request as ready for review October 26, 2026 18:03
CONFIG_KVM_AMD=y
CONFIG_KVM_INTEL=y
CONFIG_BLK_DEV_NBD=y
CONFIG_TUN=y

@bleggett bleggett Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we'll wanna add the same to the arm64 zone kernel too, correct?

We don't build it for zone-kvm yet AFAICT but we might as well keep it consistent across both.

@graysonguarino graysonguarino Oct 26, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We currently don't run any dogfood runners on ARM (at least not to my knowledge) but if you think it's relatively harmless and something we may want to do down the line, we could.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

yes please do!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Not sure if we want to add the config but not build the kernel for ARM. If that's what you meant, let me know and I'll drop the config.yaml change :)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I missed we lacked an arm64 fragment for zone-kvm - but yeah, in general we should maintain 1-1 parity, so thanks for adding!

All fragments should have both x86_64 and arm64 variants (where possible) and features should be kept in sync across both archs (where possible).

azenla
azenla previously approved these changes Oct 26, 2026
The aarch64 fragment lists the same options as x86_64's: KVM, NBD and TUN. The
arm64 defconfig already enables VIRTUALIZATION, KVM and TUN in the aarch64 zone
kernel, so in practice only NBD changes, from a module to built in. Setting them
here keeps the flavor from depending on defconfig.

Refs ENGINFR-116
@graysonguarino
graysonguarino merged commit db1c8e9 into main Oct 26, 2026
18 of 23 checks passed
@graysonguarino
graysonguarino deleted the gguarino/enginfr-116-zone-kvm-tun branch October 26, 2026 20:50
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.

5 participants