TMC
2007-Apr-30 15:09 UTC
[Xen-users] ''Wandering'' eth interface - Xen 3.0.4 + linux 2.6.16.29
I have a Xen 3.0.4 with Debian Etch (4.0) running quite successfully... except for an annoying problem, which i have not observed in other DomU instances, nor have I observed it with my test server... The problem I am observing in that one domain is that on reboot, the eth interface seems to "wander" - that is monotonically increase the index value... so on one reboot it will be eth0 on next eth1, on one after that eth3 and so on. Of course this causes all sorts of scripts to fail, and manual intervention is required. has anyone else seen this misbehaviour? Is there a method of pinning or making this behaviour consistent? Tomasz -- GPG key fingerprint: 3883 B308 8256 2246 D3ED A1FF 3A1D 0EAD 41C4 C2F0 GPG public key availabe on pgp.mit .edu keyserver _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Petersson, Mats
2007-Apr-30 15:18 UTC
RE: [Xen-users] ''Wandering'' eth interface - Xen 3.0.4 + linux 2.6.16.29
> -----Original Message----- > From: xen-users-bounces@lists.xensource.com > [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of TMC > Sent: 30 April 2007 16:10 > To: Xen users mailing list > Subject: [Xen-users] ''Wandering'' eth interface - Xen 3.0.4 + > linux 2.6.16.29 > > I have a Xen 3.0.4 with Debian Etch (4.0) running quite > successfully... > > except for an annoying problem, which i have not observed in other > DomU instances, nor have I observed it with my test server... > > The problem I am observing in that one domain is that on reboot, the > eth interface seems to "wander" - that is monotonically increase the > index value...You can probably fix this by setting a fixed MAC address. This isn''t Xen''s fault, it''s because your distro believes that a particular device should always be given the same ethN number, and it records the MAC address to remember which interface has which MAC. Since Xen''s auto-numbering is pseudo-random, each time you start a domain again, it will have a different MAC-address (unless you do it many enough times to find a collision, but that''s not going to happen very often with 2^24 possible combinations). [Note, only some distros do this]. I think there are other possible "fixes" (e.g. modifying the script that figures out which MAC address corresponds to which ethN device name), but giving a fixed MAC address is a good practice anyways if you are planning to use your domains for anything serious. -- Mats _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Tom Allen
2007-Apr-30 15:20 UTC
Re: [Xen-users] ''Wandering'' eth interface - Xen 3.0.4 + linux 2.6.16.29
udev is likely trying to make your network cards keep the same addresses. You can put something like this in /etc/udev/rules.d/z25_persistent-net.rules: # Xen virtual device (vif) # We want to ignore this event, and let Xen set things up the # way we specified in the config file. SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:16:3e:*",OPTIONS="ignore_device" Another alternative is to specify the mac address when you create the domU. Tom On Tue, 1 May 2007, TMC wrote:> I have a Xen 3.0.4 with Debian Etch (4.0) running quite successfully... > > except for an annoying problem, which i have not observed in other > DomU instances, nor have I observed it with my test server... > > The problem I am observing in that one domain is that on reboot, the > eth interface seems to "wander" - that is monotonically increase the > index value... > > so on one reboot it will be eth0 on next eth1, on one after that eth3 > and so on. > Of course this causes all sorts of scripts to fail, and manual > intervention is required. > > has anyone else seen this misbehaviour? > > Is there a method of pinning or making this behaviour consistent? > > Tomasz > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Christian Horn
2007-Apr-30 15:21 UTC
Re: [Xen-users] ''Wandering'' eth interface - Xen 3.0.4 + linux 2.6.16.29
On Tue, May 01, 2007 at 01:09:43AM +1000, TMC wrote:> > The problem I am observing in that one domain is that on reboot, the > eth interface seems to "wander" - that is monotonically increase the > index value...You (your linuxdistro) told it to do so. Once those distributions detect a net yet known mac on a network-interface they assign a net eth-interface to it. If you get a different mac on every systemboot your eth-interface keeps changing.> Is there a method of pinning or making this behaviour consistent?You can do two things about it: - delete that persistance-information on early systemstart or on shutdown, on suse sles10 its in /etc/udev/rules.d/30-net_persistent_names.rules, on debian sid in /etc/udev/rules.d/z25_persistent-net.rules - or configure your domU-networkinterface to use always the same mac Christian _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
TMC
2007-Apr-30 21:12 UTC
Re: [Xen-users] ''Wandering'' eth interface - Xen 3.0.4 + linux 2.6.16.29
My bad. I did forget that udev indeed does some persistance magic. mac assignment works well. Thanks for all the responses. On 01/05/07, Tim Post <tim.post@gridnix.org> wrote:> On Tue, 2007-05-01 at 01:09 +1000, TMC wrote: > > > > I have a Xen 3.0.4 with Debian Etch (4.0) running quite successfully... > > > > except for an annoying problem, which i have not observed in other > > DomU instances, nor have I observed it with my test server... > > > > The problem I am observing in that one domain is that on reboot, the > > eth interface seems to "wander" - that is monotonically increase the > > index value... > > > > so on one reboot it will be eth0 on next eth1, on one after that eth3 > > and so on. > > Of course this causes all sorts of scripts to fail, and manual > > intervention is required. > > > > has anyone else seen this misbehaviour? > > > > Is there a method of pinning or making this behaviour consistent? > > > > Tomasz > > > > You may want to imply a mac to eth scenario in udev if this problem > occurs mostly in guests with multiple nics. > > I *think* I understand your problem but not quite sure. Try googling for > ''xen udev mac nic'' to see a plethora of examples. > > Best, > --Tim > > >-- GPG key fingerprint: 3883 B308 8256 2246 D3ED A1FF 3A1D 0EAD 41C4 C2F0 GPG public key availabe on pgp.mit .edu keyserver _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users