Hello, I created a CentOS 5.0 x86_64 guest under Debian Etch with Xen 3.0.3 and it boots fine except for one re-occuring problem - whenever it boots the /etc/sysconfig/network-scripts/ifcfg-eth0 script gets renamed to .bak and doesn''t configure the ethernet device. Here is the content of this file: TYPE=Ethernet DEVICE=eth0 BOOTPROTO=static ONBOOT=yes IPADDR=192.168.0.247 NETMASK=255.255.255.0 GATEWAY=192.168.0.2 Looks pretty standard to me. When I boot the system to single-user mode the file is still there but when I ^D to go to multi-user the file gets renamed at some stage. A simple "mv ifcfg-eth0.bak ifcfg-eth0" and "service network restart" fixes the problem but it''s still very annoying to have to do that every time i reboot the system (luckily these are just test/dev machines for now). I tried to follow the output of the boot in the console but can''t see anything wrong, and can''t find what in the world could do this renaming at boot time. What am I missing? Thanks, --Amos _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Stephan Seitz
2007-Nov-13 08:38 UTC
Re: [Xen-users] CentOS 5.0 ifcfg-eth0 gets renamed on boot
Amos Shapira schrieb:> Hello, > > I created a CentOS 5.0 x86_64 guest under Debian Etch with Xen 3.0.3 and > it boots fine except for one re-occuring problem - whenever it boots the > /etc/sysconfig/network-scripts/ifcfg-eth0 script gets renamed to .bak > and doesn''t configure the ethernet device.you should set a mac address in your domU config file. e.g. vif = [ ''mac=00:00:cb:62:fd:7f,bridge=xenbr0'' ] otherwise the interface changes it''s mac every time the domU is brought up.> Here is the content of this file: > > TYPE=Ethernet > DEVICE=eth0 > BOOTPROTO=static > ONBOOT=yes > IPADDR=192.168.0.247 <http://192.168.0.247> > NETMASK=255.255.255.0 <http://255.255.255.0> > GATEWAY=192.168.0.2 <http://192.168.0.2> > > Looks pretty standard to me. > > When I boot the system to single-user mode the file is still there but > when I ^D to go to multi-user the file gets renamed at some stage. > > A simple "mv ifcfg-eth0.bak ifcfg-eth0" and "service network restart" > fixes the problem but it''s still very annoying to have to do that every > time i reboot the system (luckily these are just test/dev machines for > now). > > I tried to follow the output of the boot in the console but can''t see > anything wrong, and can''t find what in the world could do this renaming > at boot time. > > What am I missing? > > Thanks, > > --Amos > > > ------------------------------------------------------------------------ > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users-- Stephan Seitz Senior System Administrator *netz-haut* e.K. multimediale kommunikation zweierweg 22 97074 würzburg fon: +49 931 2876247 fax: +49 931 2876248 web: www.netz-haut.de <http://www.netz-haut.de/> registriergericht: amtsgericht würzburg, hra 5054 _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Nico Kadel-Garcia
2007-Nov-13 08:53 UTC
Re: [Xen-users] CentOS 5.0 ifcfg-eth0 gets renamed on boot
Amos Shapira wrote:> Hello, > > I created a CentOS 5.0 x86_64 guest under Debian Etch with Xen 3.0.3 and > it boots fine except for one re-occuring problem - whenever it boots the > /etc/sysconfig/network-scripts/ifcfg-eth0 script gets renamed to .bak > and doesn''t configure the ethernet device. > > Here is the content of this file: > > TYPE=Ethernet > DEVICE=eth0 > BOOTPROTO=static > ONBOOT=yes > IPADDR=192.168.0.247 <http://192.168.0.247> > NETMASK=255.255.255.0 <http://255.255.255.0> > GATEWAY=192.168.0.2 <http://192.168.0.2> > > Looks pretty standard to me. > > When I boot the system to single-user mode the file is still there but > when I ^D to go to multi-user the file gets renamed at some stage. > > A simple "mv ifcfg-eth0.bak ifcfg-eth0" and "service network restart" > fixes the problem but it''s still very annoying to have to do that every > time i reboot the system (luckily these are just test/dev machines for > now). > > I tried to follow the output of the boot in the console but can''t see > anything wrong, and can''t find what in the world could do this renaming > at boot time. > > What am I missing? > > Thanks, > > --Amos >Is that http:// debris actually in your file, or is that some sort of gmail rendering error? RedHat also has a tradition of stuffing some interesting little files in /etc/sysconfig/ for resetting network configurations. Slightly different configuration tools, such as system-config-network, set them differently and they propagate oddly if you try editing things manually. Try using system-config-network. Also, don''t you have a hard-coded MAC address for the guest? Something that you can put as "HWADDR=<MACADDRESS>" in your ifcfg-eth0 file? _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Amos Shapira
2007-Nov-13 23:34 UTC
Re: [Xen-users] CentOS 5.0 ifcfg-eth0 gets renamed on boot
On 13/11/2007, Stephan Seitz <s.seitz@netz-haut.de> wrote:> > Amos Shapira schrieb: > > Hello, > > > > I created a CentOS 5.0 x86_64 guest under Debian Etch with Xen 3.0.3 and > > it boots fine except for one re-occuring problem - whenever it boots the > > /etc/sysconfig/network-scripts/ifcfg-eth0 script gets renamed to .bak > > and doesn''t configure the ethernet device. > > you should set a mac address in your domU config file. > > e.g. > vif = [ ''mac=00:00:cb:62:fd:7f,bridge=xenbr0'' ] > > otherwise the interface changes it''s mac every time the domU is brought > up.Thanks. That worked. I let the machine boot, copied the assigned MAC to the .cfg file, and it started configuring eth0 automatically after the next boot. I''m still curios to understand what actually goes there, does the "Checking for hardware configuration changes" boot stage do the renaming? --Amos _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Nico Kadel-Garcia
2007-Nov-13 23:53 UTC
Re: [Xen-users] CentOS 5.0 ifcfg-eth0 gets renamed on boot
Amos Shapira wrote:> On 13/11/2007, *Stephan Seitz* <s.seitz@netz-haut.de > <mailto:s.seitz@netz-haut.de>> wrote: > > Amos Shapira schrieb: > > Hello, > > > > I created a CentOS 5.0 x86_64 guest under Debian Etch with Xen > 3.0.3 and > > it boots fine except for one re-occuring problem - whenever it > boots the > > /etc/sysconfig/network-scripts/ifcfg-eth0 script gets renamed to > .bak > > and doesn''t configure the ethernet device. > > you should set a mac address in your domU config file. > > e.g. > vif = [ ''mac=00:00:cb:62:fd:7f,bridge=xenbr0'' ] > > otherwise the interface changes it''s mac every time the domU is > brought up. > > > Thanks. That worked. I let the machine boot, copied the assigned MAC > to the .cfg file, and it started configuring eth0 automatically after > the next boot. > > I''m still curios to understand what actually goes there, does the > "Checking for hardware configuration changes" boot stage do the renaming? > > --AmosRead the scripts in /etc/sysconfig/network-scripts/. I think it''s there, and there''s a lot of fascinating stuff buried there, such as setting the hostnames for DHCP by creating a file called /etc/dhclient-eth0. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Amos Shapira
2007-Nov-14 00:13 UTC
Re: [Xen-users] CentOS 5.0 ifcfg-eth0 gets renamed on boot
On 13/11/2007, Nico Kadel-Garcia <nkadel@gmail.com> wrote:> > Amos Shapira wrote: > Is that http:// debris actually in your file, or is that some sort of > gmail rendering error?No they are not in the script, was added by GMail. RedHat also has a tradition of stuffing some interesting little files in> /etc/sysconfig/ for resetting network configurations. Slightly different > configuration tools, such as system-config-network, set them differently and > they propagate oddly if you try editing things manually. Try using > system-config-network.Tried to install it but it pools down too much X11-related crap I don''t want on my servers. Also, don''t you have a hard-coded MAC address for the guest? Something that> you can put as "HWADDR=<MACADDRESS>" in your ifcfg-eth0 file? >Tried both with "HWADDR" and "MACADDR" (the later will actually force the ethernet address on the card) but it didn''t work. I also change "BOOTPROTO" from "static" to "none" as per the docs. I suspect by the time the script is read it''s too late, it gets renamed by something which probes the hardware (kudzu? hotplug?) earlier in the boot process. Thanks for the advise. --Amos _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Amos Shapira
2007-Nov-14 00:18 UTC
Re: [Xen-users] CentOS 5.0 ifcfg-eth0 gets renamed on boot
On 14/11/2007, Nico Kadel-Garcia <nkadel@gmail.com> wrote:> > Read the scripts in /etc/sysconfig/network-scripts/. I think it''s there, > and there''s a lot of fascinating stuff buried there, such as setting the > hostnames for DHCP by creating a file called /etc/dhclient-eth0. >That''s the first thing I did long before bothering the list with my question but couldn''t find anything wrong with the input I provide. I also tried to look for anything which mentions "bak" under /etc (since the file is renamed to ".bak") but couldn''t find anything. The interesting thing is that simply renaming the file back to remove the ".bak" extension and restarting the network works well, which my hunch tells me sits well with the MAC address getting changed on reboot and kudzu or hotplug deciding that it''s a new piece of hardware and possibly renaming the script to force a re-configuration, but I''m just guessing. Cheers, --Amos _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users