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

Issues related to configuring your network
Post Reply
aidanewen
Posts: 2
Joined: 2011/08/30 11:29:07

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

Post by 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.

scottro
Forum Moderator
Posts: 2556
Joined: 2007/09/03 21:18:09
Location: NYC
Contact:

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

Post by 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.

aidanewen
Posts: 2
Joined: 2011/08/30 11:29:07

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

Post by 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.

User avatar
AlanBartlett
Forum Moderator
Posts: 9345
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk
Contact:

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

Post by AlanBartlett » 2011/08/30 16:56:16

Thank you for reporting back.

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

BiBi
Posts: 1
Joined: 2011/09/27 04:26:50
Contact:

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

Post by 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.

drasha
Posts: 1
Joined: 2014/03/13 17:00:13

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

Post by 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.

zbog
Posts: 1
Joined: 2014/05/05 21:14:12

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

Post by zbog » 2014/05/05 21:17:02

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

boulba
Posts: 1
Joined: 2014/10/29 01:22:44

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

Post by boulba » 2014/10/29 01:33:28

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!

pkbarbiedoll
Posts: 3
Joined: 2014/09/14 15:28:52

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

Post by pkbarbiedoll » 2015/05/19 20:32:25

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.

Post Reply