Skip to main content

Renamed ethernet Devices

I had a problem when I copied a Linux virtual machine from one host to another and made some changes (specifically which networks it could see on the host). Specifically the ethernet devices changed and the udev process couldn't find the old devices, resulting in the network interfaces wouldn't come up.

Logging onto a console will identify that eth0 (as an example), is gone and you have no network interfaces. Examinging the dmesg output with the command dmesg | grep eth will show something similar to the following:

udev: renamed network interface eth0 to eth2
udev: renamed network interface eth1 to eth3

The solution is to edit the file /etc/udev/rules.d/z25_persistent-net.rules and change the configuration information for the relevant NICs in that file so that they are named with the correct interfaces so that /etc/network/interfaces can load the correct network (IP) configuration information. I hope this helps someone else as it was challenging for me to solve this problem. (By the way, this may also occur if you replace a Network Interface Card (NIC) in your system!)