[Pkg-libvirt-maintainers] Bug#531802: Bug#531802: libvirt0: bridges containing VLAN interfaces are not recognized

Andreas Unterkircher unki at netshadow.at
Thu Jun 11 06:45:02 UTC 2009


and how does your /sys/class/net directory looks like when it's working 
in your virt-manager?

mine now contains:

unki at kuecken:~$ ls -l /sys/class/net/
total 0
drwxr-xr-x 6 root root 0 2009-06-11 05:43 br0
drwxr-xr-x 6 root root 0 2009-06-11 08:17 br1
drwxr-xr-x 5 root root 0 2009-06-11 05:43 eth0
drwxr-xr-x 4 root root 0 2009-06-11 07:43 lo
drwxr-xr-x 5 root root 0 2009-06-11 08:17 vlan2
drwxr-xr-x 5 root root 0 2009-06-11 05:44 vnet0


I just modified the code in connection.py like this:

--- connection.py.orig  2009-06-11 08:12:46.000000000 +0200
+++ connection.py       2009-06-11 08:41:07.429629515 +0200
@@ -200,7 +200,7 @@

      def _net_tag_device_added(self, name, sysfspath):
          logging.debug("Checking for VLANs on %s" % sysfspath)
-        for vlanpath in glob.glob(sysfspath + ".*"):
+        for vlanpath in glob.glob("/sys/class/net/vlan2"):
              if os.path.exists(vlanpath):
                  logging.debug("Process VLAN %s" % vlanpath)
                  vlanmac = self._net_get_mac_address(name, vlanpath)


and immediately virt-manager recognizes the VLAN interface and presents 
it (and its bridge) in the drop down list:

2009-06-11 08:44:00,680 (virt-manager:144): Application startup
2009-06-11 08:44:00,832 (engine:81): About to connect to uris 
['qemu:///system']
2009-06-11 08:44:00,835 (connection:144): Bonding masters are: []
2009-06-11 08:44:00,838 (connection:170): Got physical net device 
/org/freedesktop/Hal/devices/net_00_24_21_20_dc_4d
2009-06-11 08:44:00,839 (connection:230): Adding net device eth0 
00:24:21:20:dc:4d /sys/class/net/eth0 (bridge: br0)
2009-06-11 08:44:00,839 (connection:202): Checking for VLANs on 
/sys/class/net/eth0
2009-06-11 08:44:00,839 (connection:205): Process VLAN /sys/class/net/vlan2
2009-06-11 08:44:00,840 (connection:230): Adding net device vlan2 
00:24:21:20:dc:4d /sys/class/net/vlan2 (bridge: br1)



Cheers,
Andreas






More information about the Pkg-libvirt-maintainers mailing list