Friday, November 30, 2012

Error: Device eth0 does nt seem to be present, delaying

Today I was making a couple of Clone on VMWare workstation and I got below error after cloned machine was started. as result I didn't have eth0 !


[root@mysql1 ~]#service network restart
Shutting down loopback interface: [ OK ]
Bring up loopback interface: [ OK ]
Bring up interface eth0: Device eth0 doesnt seem to be present, delaying initiatlation [ FAILED ]



So I ran :



[root@mysql1 ~]# dmesg |grep eth
e1000 0000:02:00.0: eth0: (PCI:66MHz:32-bit) 00:0c:29:9e:b4:54
e1000 0000:02:00.0: eth0: Intel(R) PRO/1000 Network Connection
udev: renamed network interface eth0 to eth1



there it was the issue that my eth got renamed, the solution is to edit:

/etc/udev/rules.d/70-persistent-net.rules 

and remove old Ethernet and rename back the new ethernet to eth0
note that I removed the first two lines below with has eth0 and renamed eth1 to eth0
the 00:0c:29:91:f2:83 is actually old MAC address from the source machine that we don't need and 00:0c:29:9e:b5:54 is the new MAC address.


before:

# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.

# PCI device 0x8086:0x100f (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:91:f2:83", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x8086:0x100f (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:9e:b5:54", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

after:

# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.

# PCI device 0x8086:0x100f (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:91:f2:83", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x8086:0x100f (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:9e:b5:54", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

after this you need to edit: /etc/sysconfig/networking/devices/ifcfg-eth0 and
change the :

HWADDR=[old mac address]

to

HWADDR=[new mac address]

After this you must reboot your system to get new hardware settings in place