[SOLVED] virtualbox centos6 guest - Device eth0 does not seem to be present

Issues related to configuring your network

[SOLVED] virtualbox centos6 guest - Device eth0 does not seem to be present

Postby aidanewen » 2011/08/30 11:33:36

I'm using virtualbox and trying to get my centos6 virtual machine onto the network. Virtualbox is running on XP. In the virtual box settings I've enabled network adapter 1, selected the bridged adapter and selected the default hardware. On the virtual machine I've edited configuration files as follows (making sure that the mac address / hardware address matches the adapters mac address from the virutalbox settings):

# cat /etc/sysconfig/network-scripts/ifcofg-eth0
DEVICE="eth0"
BOOTPROTO="none
MACADDR="08:00:27:7D:A8:DC"
ONBOOT="yes"
IPADDR=10.0.20.10
GATEWAY=255.0.0.55
# cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=dev.host.com
NETOWRKING_IPV6=no
GATEWAY=10.0.0.55
# cat /etc/sysconfig/networking/devices/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
HWADDR=08:00:27:7D:A8:DC
ONBOOT=yes
NETMASK=255.0.0.0
IPADDR=10.0.20.10
GATEWAY=10.0.0.55
TYPE=Ethernet

When i restart networking I get the following:

# /etc/init.d/network restart
Shutting down loopback interface:
Bringing up loopback interface:
Bringing up interface eth0: Device eth0 does not seem to be present, delaying initialization.

eth0 never comes up and obviously I've got no access to / from the network.
aidanewen
 
Posts: 2
Joined: 2011/08/30 11:29:07

[SOLVED] virtualbox centos6 guest - Device eth0 does not see

Postby scottro » 2011/08/30 12:26:59

Was this cloned? When cloned, it will see an eth1, as it will be using the old machine's MAC address. If so, look in /etc/udev/rules.d for the networking file and check the MAC addresses there.

Otherwise, use system-config-network-tui and set up the card again. I think they keep changing the syntax, or what's necessary, to the point where editing the ifcfg-ethX files becomes tricky--and there will be some other scripts that the tool edits.
scottro
Forum Moderator
 
Posts: 1713
Joined: 2007/09/03 21:18:09
Location: NYC

Re: virtualbox centos6 guest - Device eth0 does not seem to be present

Postby aidanewen » 2011/08/30 13:15:40

Brilliant! Thanks- that was it. I found the networking rule - /etc/udev/rules.d/70-persistant-net.rules and edited the mac address of eth0 there. It was, as you suggested, using an old mac address from the cloned machine rather than the address virtualbox had generated.
aidanewen
 
Posts: 2
Joined: 2011/08/30 11:29:07

Re: [SOLVED] virtualbox centos6 guest - Device eth0 does not seem to be present

Postby AlanBartlett » 2011/08/30 16:56:16

Thank you for reporting back.

On your behalf and for posterity, this thread is now marked [SOLVED].
User avatar
AlanBartlett
Forum Moderator
 
Posts: 8975
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk

Re: [SOLVED] virtualbox centos6 guest - Device eth0 does not seem to be present

Postby BiBi » 2011/09/27 04:37:40

I follow this topic, and my problem is the same. But I must change MAC Address in two files:

change from /etc/udev/rules.d/70-persistant-net.rules

# PCI device 0x1022:0x2000 (pcnet32) (custom name provided by external tool)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

PCI device 0x1022:0x2000 (pcnet32)
#SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

to


# PCI device 0x1022:0x2000 (pcnet32) (custom name provided by external tool)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

#PCI device 0x1022:0x2000 (pcnet32)
#SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"



And change in /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
HWADDR=
NM_CONTROLLED=yes
ONBOOT=yes
IPADDR=192.168.1.89
BOOTPROTO=none
NETMASK=255.255.255.0
TYPE=Ethernet
GATEWAY=192.168.1.11
DNS1=8.8.8.8
IPV6INIT=no
USERCTL=no

to:

DEVICE=eth0
HWADDR=
NM_CONTROLLED=yes
ONBOOT=yes
IPADDR=192.168.1.89
BOOTPROTO=none
NETMASK=255.255.255.0
TYPE=Ethernet
GATEWAY=192.168.1.11
DNS1=8.8.8.8
IPV6INIT=no
USERCTL=no

Hope it helps everyone come to this topic.
BiBi
 
Posts: 1
Joined: 2011/09/27 04:26:50

Re: [SOLVED] virtualbox centos6 guest - Device eth0 does not

Postby drasha » 2014/03/13 17:03:11

The above steps did not work for me possibly due to a change in centos or virtualbox. I was able to fix the problem by deleting the /etc/udev/rules.d/70-persistant-net.rules file and restarting the virtual machine which generated a new file and got every thing set up correctly. Hopefully this helps any one else having issues with this problem.
drasha
 
Posts: 1
Joined: 2014/03/13 17:00:13


Return to CentOS 6 - Networking Support

Who is online

Users browsing this forum: No registered users and 2 guests