I set "vif = [ ''vifname=vif2.0, ..." in /etc/xen/*.cfg, but the vif gets created with the usual sequential DOMID numbering, not the constant name that I want. How do I find out why this is failing? The "vif" environment variable is already set wrong when "vif-bridge online ..." is called by udevd. Debian xen-utils-common 4.1.4-2.
This is on a system with NetworkManager.> I set "vif = [ ''vifname=vif2.0, ..." in /etc/xen/*.cfg, but the vif gets > created with the usual sequential DOMID numbering, not the constant name > that I want. > > How do I find out why this is failing? The "vif" environment variable > is already set wrong when "vif-bridge online ..." is called by udevd. > > Debian xen-utils-common 4.1.4-2.
> This is on a system with NetworkManager.When I shut down NetworkManager and reinstate my eth0 in /etc/network/interfaces, then "xl create /etc/xen/foo.cfg" brings up the vif with the vifname I''ve specified in the .cfg (e.g., "foo"), rather than using "vifDOMID.0". Here''s the difference: In line 79 of vif-common.sh, "ip link set vifDOMID.0 name foo" fails with "RTNETLINK answers: Device or resource busy" when NM is running, but succeeds otherwise. Now I''m wondering how to tell NM to keep its hands off anything named "vif*.*" so that I can go on using NM.
> Now I''m wondering how to tell NM to keep its hands off anything named > "vif*.*" so that I can go on using NM.If you put "ip link set dev $vif down" at the top of vif-bridge, the vifname gets used. :) But NM still thinks it knows a thing or two about the old interface name.
>> Now I''m wondering how to tell NM to keep its hands off anything named >> "vif*.*" so that I can go on using NM. > > If you put "ip link set dev $vif down" at the top of vif-bridge, the > vifname gets used. :) But NM still thinks it knows a thing or two > about the old interface name.It seems that a better way to do this is to put in /etc/NetworkManager/NetworkManager.conf the MAC with which Xen vifs are created: ---------------------------------------- [keyfile] unmanaged-devices=mac:fe:ff:ff:ff:ff:ff ---------------------------------------- NetworkManager still knows about the interface, by its "vifDOMID.0" name, but lists it as unmanaged. The vifname is applied by the Xen scripts. It appears on the bridge.
On Tue, 2013-04-09 at 02:34 +0100, Mike wrote:> I set "vif = [ ''vifname=vif2.0, ..." in /etc/xen/*.cfg, but the vif gets > created with the usual sequential DOMID numbering, not the constant name > that I want.The device is always created with the vif<domid>.<devid> naming and is renamed by the vif hotplug script. TBH I''ve never used NM on a xen system and many guides I''ve seen suggest turning it off. Ian.