eth0: error fetching interface information: Device not found

Issues related to configuring your network
Post Reply
firewall
Posts: 3
Joined: 2013/09/04 19:05:38

eth0: error fetching interface information: Device not found

Post by firewall » 2013/09/04 19:14:53

Hi, I’ve just installed CentOS in VirtualBox, however, eth0 is not there. Please help

[img]http://firewallengineer.files.wordpress.com/2013/09/centos-eth0-error.png[/img]

User avatar
TrevorH
Forum Moderator
Posts: 24326
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

eth0: error fetching interface information: Device not found

Post by TrevorH » 2013/09/04 19:43:32

Show the output from `ifconfig -a` please. Best if you just paste the output between [quote][/quote] tags rather than using a jpeg.

firewall
Posts: 3
Joined: 2013/09/04 19:05:38

Re: eth0: error fetching interface information: Device not found

Post by firewall » 2013/09/05 02:33:31

Thanks TrevorH for your reply. I've installed this on VirtualBox without GUI. Hence, I can't copy & paste the output.

[img]http://firewallengineer.files.wordpress.com/2013/09/centos-ifconfig-a.png[/img]

User avatar
TrevorH
Forum Moderator
Posts: 24326
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: eth0: error fetching interface information: Device not found

Post by TrevorH » 2013/09/05 08:15:51

I am guessing that at some point you have changed the set up of your VM to alter the network card - perhaps a different model or something - and this has changed the MAC address of the card.

Look in /etc/udev/rules.d for a file called something with persistent-net-rules in it. Edit that and look at the contents - it probably contains lines for both eth0 and eth1. You should remove the lines that refer to eth0 and can also change eth1 to eth0 afterwards if you'd prefer to have eth0 rather than eth1 on your system (though it doesn't really matter what it's called so long as it works). Save that and then look in /etc/sysconfig/network-scripts for the various ifcfg-eth* files there. You'll want to remove the one for eth0. If you renamed eth1 to eth0 then you need to rename ifcfg-eth1 to ifcfg-eth0 and edit its contents as it also contains the string 'eth1' inside it.

firewall
Posts: 3
Joined: 2013/09/04 19:05:38

Re: eth0: error fetching interface information: Device not found

Post by firewall » 2013/09/05 11:48:28

[quote]
TrevorH wrote:
I am guessing that at some point you have changed the set up of your VM to alter the network card - perhaps a different model or something - and this has changed the MAC address of the card. [/quote]

Yes, you’re right. Host CentOS-2 was created from CentOS-1 by cloning method.

1. Right click at the existing host (CentOS-1).
2. Reinitialize the MAC address of all network cards
3. Next > next … OK > Done :-D

The first host (CentOS-1) was installed manually and doesn’t have this issue.

[img]http://firewallengineer.files.wordpress.com/2013/09/centos-1-2.png[/img]

[quote]
TrevorH wrote:
Look in /etc/udev/rules.d for a file called something with persistent-net-rules in it. Edit that and look at the contents - it probably contains lines for both eth0 and eth1. You should remove the lines that refer to eth0 and can also change eth1 to eth0 afterwards if you'd prefer to have eth0 rather than eth1 on your system (though it doesn't really matter what it's called so long as it works). Save that and then look in /etc/sysconfig/network-scripts for the various ifcfg-eth* files there. You'll want to remove the one for eth0. If you renamed eth1 to eth0 then you need to rename ifcfg-eth1 to ifcfg-eth0 and edit its contents as it also contains the string 'eth1' inside it.[/quote]
Thanks… I’m working on this now. Will let you know if it works.

[img]http://firewallengineer.files.wordpress.com/2013/09/centos-70-persistent-net-rules.png[/img]

http://firewallengineer.wordpress.com/2013/09/05/centos-eth0-error/

Post Reply