You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Its simple to create a container with a single veth using --network-veth and --network-bridge.
Adding a second interfaces requires a lot of scripting since --network-veth-extra requires the interface to exist (and does not add it to a bridge).
Question
Since nspawn already knows how to create veths (adding it to a bridge, removing it when the container stops, ...) makes me wonder if there are any plans to support multiple veths? (I dont like the idea of duplicating this functionality in scripts)
Would you accept a patch, and if yes:
Extending --network-veth to accept optional arguments (like myveth1, myveth2) and extending --network-bridge to accept multiple bridges might break current users since the "-n" option would disappear (would it?) - is this acceptable or should an additonal option be added?
Possible implementation
Get arguments in nspawn.c and loop calling setup_veth(..., idx)
nspawn-network.c
add_veth should get an additional parameter idx
setup_veth should get an additional parameter idx
Am I missing something?
The text was updated successfully, but these errors were encountered:
Hmm? I think this is a misunderstanding. --network-veth-extra= in fact will create a new veth pair each time you use it. It requires no extra scripting, it will add a completely new veth pair on its own. In fact if there's already some interface around by the name specified then the operation will fail.
(--network-interface= otoh is the switch to move an existing iface into the container, but that's something completely different...)
Closing, since what is being asked for already exists.
Submission type
Current situation
Its simple to create a container with a single veth using --network-veth and --network-bridge.
Adding a second interfaces requires a lot of scripting since --network-veth-extra requires the interface to exist (and does not add it to a bridge).
Question
Possible implementation
Am I missing something?
The text was updated successfully, but these errors were encountered: