Page 1 of 1

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

Posted: 2011/08/30 11:33:36
by aidanewen
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.

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

Posted: 2011/08/30 12:26:59
by scottro
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.

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

Posted: 2011/08/30 13:15:40
by aidanewen
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.

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

Posted: 2011/08/30 16:56:16
by AlanBartlett
Thank you for reporting back.

On your behalf and for posterity, this thread is now marked [SOLVED].

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

Posted: 2011/09/27 04:37:40
by BiBi
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.

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

Posted: 2014/03/13 17:03:11
by drasha
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.

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

Posted: 2014/05/05 21:17:02
by zbog
I got the same problem when I requested a new MAC from VirtualBox. Modifying the file did not work for me but deleting it definitely worked. I had to restart after the delete and it was all fine. Thanks

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

Posted: 2014/10/29 01:33:28
by boulba
I had the same problem, the quick fix for me was to copy the mac address from the inside file "/etc/sysconfig/network-scripts/ifcfg-eth0" to the host to virtualbox-->Settings-->network-->Adapter 1-->advanced-->MAc address. I hope this will help!

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

Posted: 2015/05/19 20:32:25
by pkbarbiedoll
boulba wrote:I had the same problem, the quick fix for me was to copy the mac address from the inside file "/etc/sysconfig/network-scripts/ifcfg-eth0" to the host to virtualbox-->Settings-->network-->Adapter 1-->advanced-->MAc address. I hope this will help!
This worked brilliantly - thanks.