GNOME Bugzilla – Bug 700822
Add support for veth devices (for containers and testing)
Last modified: 2013-05-22 12:09:27 UTC
In LXC containers, chroots, or similar virtualization setups, one typically creates veth devices to communicate with/route through the host. These are create pairwise, one end for the container (usually called "ethN"), the other end for the host (usually called "vethN"): # ip link add name eth1 type veth peer name veth0 This creates a veth0/eth1 veth pair. As these have no driver, NM classifies these as "generic" devices: DEVICE TYPE STATE eth1 unknown unmanaged veth0 unknown unmanaged In order to use NM in containers with these devices, we need to teach it (in particular, nm-udev-manager.c's dev_get_attrs() and nm-system.c's nm_system_get_iface_type()) to recognize veth devices, and then filter out ones which are called "veth.." (as these are usually for the "host" side). This also makes it possible to create automatic tests for ethernet (my current ones use veth devices as well, to be independent of any physical devices).
Created attachment 245019 [details] [review] Add support for veth virtual ethernet devices. Original patch by Stéphane Graber, I updated it for current git master. I have integration tests covering this, and Ubuntu has had this patch applied for about a year now.
I'm going to dup this to 687254 since there's already more discussion there *** This bug has been marked as a duplicate of bug 687254 ***