fix(qemu): pass detected bridge helper on single-queue NICs#45
Merged
Conversation
The managed vee-qemu bundle is built with a /usr/local prefix, so its compiled-in default bridge helper path is /usr/local/libexec/qemu-bridge-helper — a location that rarely exists on real hosts. The config layer already probes common distro locations for a setuid qemu-bridge-helper, but the detected path was only wired into the multiqueue (-netdev tap) code path, which requires CPUs > 1. Single-CPU bridge VMs used the -nic shorthand without helper=, so QEMU fell back to the missing /usr/local path and failed with "bridge helper failed" at boot. Set NIC.BridgeHelper for every bridge-mode VM and append helper= to the -nic shorthand when it is set. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Single-CPU VMs with bridge networking (e.g. the truenas template) fail to boot with:
The managed vee-qemu bundle is built with a
/usr/localprefix, so its compiled-in default helper path is/usr/local/libexec/qemu-bridge-helper, which rarely exists on real hosts. The config layer already probes common distro locations for a setuidqemu-bridge-helper(e.g./usr/lib/qemu/qemu-bridge-helperon Arch), but the detected path was only applied on the multiqueue code path, which is gated onCPUs > 1. Single-queue bridge VMs emitted-nic bridge,br=...withouthelper=and hit the missing default.Fix
internal/vm/manager.go: setnic.BridgeHelperfor every bridge-mode VM when a helper is detected; multiqueue remains gated onCPUs > 1.internal/qemu/nic.go: appendhelper=to the-nicshorthand whenBridgeHelperis set.Verification
go build/go test ./internal/qemu ./internal/vm/golangci-lint runall pass.🤖 Generated with Claude Code