Andy Smith
2007-Mar-04 16:46 UTC
[Xen-users] xen 3.0.3, domUs all use eth1 for first network interface
Hi, I''ve just finished installing Xen 3.0.3 on a server and now find that every domU I create starts with an eth1 instead of eth0. There is no eth0 at all, according to "ifconfig" and "ip link". Everthing works if I use the eth1, but this is a bit annoying as it means that to move the domains between servers will require editing of their configs. The domUs use udev -- is this some strange interaction with that? I know I could use a udev rule to rename the device to eth0 based on mac address, but this would be one more thing I''d have to configure in each domain. Is there a udev rule I could use to rename based on vif number? i.e. vif-0 -> eth0? From inside a domU: # udevinfo -a -p /sys/class/net/eth1 Udevinfo starts with the device specified by the devpath and then walks up the chain of parent devices. It prints for every device found, all possible attributes in the udev rules key format. A rule to match, can be composed by the attributes of the device and the attributes from one single parent device. looking at device ''/class/net/eth1'': KERNEL=="eth1" SUBSYSTEM=="net" DRIVER=="" ATTR{rxbuf_cur}=="64" ATTR{rxbuf_max}=="256" ATTR{rxbuf_min}=="64" ATTR{weight}=="64" ATTR{tx_queue_len}=="1000" ATTR{flags}=="0x1003" ATTR{mtu}=="1500" ATTR{operstate}=="up" ATTR{dormant}=="0" ATTR{carrier}=="1" ATTR{broadcast}=="ff:ff:ff:ff:ff:ff" ATTR{address}=="00:16:3e:3c:54:99" ATTR{link_mode}=="0" ATTR{type}=="1" ATTR{features}=="0x50003" ATTR{ifindex}=="4" ATTR{iflink}=="4" ATTR{addr_len}=="6" looking at parent device ''/devices/xen/vif-0'': KERNELS=="vif-0" SUBSYSTEMS=="xen" DRIVERS=="vif" ATTRS{devtype}=="vif" ATTRS{nodename}=="device/vif/0" looking at parent device ''/devices/xen'': KERNELS=="xen" SUBSYSTEMS=="" DRIVERS=="" Cheers, Andy _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Jerry Amundson
2007-Mar-04 17:33 UTC
Re: [Xen-users] xen 3.0.3, domUs all use eth1 for first network interface
On 3/4/07, Andy Smith <andy@strugglers.net> wrote:> Hi, > > I''ve just finished installing Xen 3.0.3 on a server and now find > that every domU I create starts with an eth1 instead of eth0. There > is no eth0 at all, according to "ifconfig" and "ip link".No eth0 will show if it isn''t active. This seems to have more to do with distro of the domU''s, and how they were created. And the xen config file of a dmoU would also help... jerry -- "Oh joy! Rapture! I''ve got a brain" -Scarecrow _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Andy Smith
2007-Mar-05 15:16 UTC
Re: [Xen-users] xen 3.0.3, domUs all use eth1 for first network interface
On Sun, Mar 04, 2007 at 11:33:31AM -0600, Jerry Amundson wrote:> On 3/4/07, Andy Smith <andy@strugglers.net> wrote: > >I''ve just finished installing Xen 3.0.3 on a server and now find > >that every domU I create starts with an eth1 instead of eth0. There > >is no eth0 at all, according to "ifconfig" and "ip link". > > No eth0 will show if it isn''t active. > This seems to have more to do with distro of the domU''s, and how they > were created. And the xen config file of a dmoU would also help...It seems that somehow the file: /etc/udev/rules.d/z25_persistent-net.rules already had an entry for eth0, so udev was starting from eth1. As this was in the same image I was using for all domUs on that machine, it appeared to be a system-wide issue. Removing the file and letting udev create it again made the issue go away. Doh. :) Cheers, Andy _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Ulrich Windl
2007-Mar-05 15:27 UTC
Re: [Xen-users] xen 3.0.3, domUs all use eth1 for first network interface
On 5 Mar 2007 at 15:16, Andy Smith wrote:> On Sun, Mar 04, 2007 at 11:33:31AM -0600, Jerry Amundson wrote: > > On 3/4/07, Andy Smith <andy@strugglers.net> wrote: > > >I''ve just finished installing Xen 3.0.3 on a server and now find > > >that every domU I create starts with an eth1 instead of eth0. There > > >is no eth0 at all, according to "ifconfig" and "ip link". > > > > No eth0 will show if it isn''t active. > > This seems to have more to do with distro of the domU''s, and how they > > were created. And the xen config file of a dmoU would also help... > > It seems that somehow the file: > > /etc/udev/rules.d/z25_persistent-net.rules > > already had an entry for eth0, so udev was starting from eth1. As > this was in the same image I was using for all domUs on that > machine, it appeared to be a system-wide issue. Removing the file > and letting udev create it again made the issue go away.Just a note: Did you have a look before removing the file? I just removed the LINE with "eth0", or I even replaced the hardware address with the correct one. OK, my machine has multiple NICs... Ulrich _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Andy Smith
2007-Mar-05 15:35 UTC
Re: [Xen-users] xen 3.0.3, domUs all use eth1 for first network interface
On Mon, Mar 05, 2007 at 04:27:00PM +0100, Ulrich Windl wrote:> On 5 Mar 2007 at 15:16, Andy Smith wrote: > > It seems that somehow the file: > > > > /etc/udev/rules.d/z25_persistent-net.rules > > > > already had an entry for eth0, so udev was starting from eth1. As > > this was in the same image I was using for all domUs on that > > machine, it appeared to be a system-wide issue. Removing the file > > and letting udev create it again made the issue go away. > > Just a note: Did you have a look before removing the file? I just removed the LINE > with "eth0", or I even replaced the hardware address with the correct one. OK, my > machine has multiple NICs...Well, there was nothing else in the file except comments. This was in the domU, btw. On next boot it got created again with a correct entry for eth0. Cheers, Andy _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users