machines: machine: add support for adding vde-backed network interfaces#47
Merged
Conversation
hnez
force-pushed
the
vde-switch
branch
5 times, most recently
from
June 10, 2026 08:48
da76952 to
4069cf3
Compare
hnez
marked this pull request as ready for review
June 10, 2026 08:50
This enables us to have specific machines join some network in addition to the "QEMU user networking" based default network. It relies on vde because that allows us to join networks without e.g. having to do bridge configuration and creating tun/tap devices (as root). Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
…aces The virtual machines can no longer share the same MAC address when the are connected to the same layer 2 network. Implement random generation of MAC addresses for extra network interfaces. This does not affect the main network interface, which uses QEMU user network emulation. Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
The MAC addresses we use only have to be unique at that specific point in time. When assigning a random MAC to every VM we can easily cause (temporary) exhaustion of available IPv4 addresses from a DHCP server, since the leases need time to expire. Reuse MAC addresses so that DHCP servers can give out the same IP to different VMs (as long as they are not running at the same time). Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
Setting up stable rust is easy. Let's not pretend that it is not. Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
We now have our first set of tests thanks to the MAC address generation. Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
Member
Author
|
Hi @jluebbe, could you have a look at this PR as well? We are currently using it in production on our runner. |
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.
This enables us to have specific machines join some network in addition to the "QEMU user networking" based default network.
It relies on vde because that allows us to join networks without e.g. having to do bridge configuration and creating tun/tap devices (as root).
Todo before merging: