Wednesday 23 October 2013

"Device eth0 does not seem to be present" after cloning / editing network adaptor on CentOS virtual machine

After cloning a machine or editing network adaptors you may find that eth0 can not be started.
This is usually down to the operating system remembering the old network adaptor and not knowing about the new one.

You need to edit the following file to show the correct network adaptors and MAC addresses.

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

The file will look like this.
# PCI device 0x15ad:0x07b0 (vmxnet3)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
ATTR{address}=="00:50:56:ae:00:1a",
ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x15ad:0x07b0 (vmxnet3)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
ATTR{address}=="00:50:56:ae:00:1b",
ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"


Check that there are the correct amount to correspond to the number of network adaptors and that the adaptor name and MAC address is correct.

Once you have made your changes you need to reload udev by running this command
start_udev

You should now be able to restart your network services
service network restart

No comments:

Post a Comment