Monday, June 15, 2020

udev renamed network interface eth0 to ...

udev renamed network interface eth0 to eth1 / eth2 (dmesg | grep eth)
Above message you'll hardly find while working on physical machine.
I have not faced this message on Citrix Xenserver, probably xenserver tools takes care of this.

This is what I faced while cloning one of VM on KVM. After cloning one of CentOS VM network wasn't working.

To resolve this, all you need is to remove / comment following lines from one of /etc/udev/rules.d/ files

Here I found eth0 entry in 70-persistent-net.rules

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="52:54:00:fe:18:e6", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="52:54:00:c2:b2:d3", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"


Once above lines removed / commented, you'll be able to configure interface as eth0.
You can also change eth1 / eth2 to eth0 for the relevant mac address.

No comments:

Post a Comment