network interfaces order is changed after upgrading CentOS 6.3 to CentOS 7.5
Posted: 2019/04/18 12:42:50
After upgrading CentOS 6.3 machine with 4 network interfaces on VMWare into CentOS 7.5, the network interfaces order got mixed. for example - eth0 becomes eth1.
On the upgraded CentOS 7.5 VM, I saw some errors in udevd saying:
Error changing net interface name 'eth3' to 'eth2': File exists
Error changing net interface name 'eth2' to 'eth1': File exists
Error changing net interface name 'eth0' to 'eth3': File exists
Error changing net interface name 'eth1' to 'eth0': File exists
I saw the following solution in RHEL https://access.redhat.com/solutions/1422203 but it didn't help.
- Issue happens on machines hosted on VMware
- we use net.ifnames=0 biosdevname=0 in the centos 7.5 grub file, for using the old network interface naming.
- on centos 6.3 we have the file /etc/udev/rules.d/69-vmxnet3-net.rules with the following data. this file is forwarded into the upgraded system and tries to change the nics order to the correct one:
SUBSYSTEM=="net", ACTION=="add", KERNELS=="0000:0b:00.0" DRIVERS=="vmxnet3", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
SUBSYSTEM=="net", ACTION=="add", KERNELS=="0000:13:00.0" DRIVERS=="vmxnet3", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
SUBSYSTEM=="net", ACTION=="add", KERNELS=="0000:1b:00.0" DRIVERS=="vmxnet3", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"
SUBSYSTEM=="net", ACTION=="add", KERNELS=="0000:04:00.0" DRIVERS=="vmxnet3", ATTR{type}=="1", KERNEL=="eth*", NAME="eth3"
SUBSYSTEM=="net", ACTION=="add", KERNELS=="0000:0c:00.0" DRIVERS=="vmxnet3", ATTR{type}=="1", KERNEL=="eth*", NAME="eth4"
SUBSYSTEM=="net", ACTION=="add", KERNELS=="0000:14:00.0" DRIVERS=="vmxnet3", ATTR{type}=="1", KERNEL=="eth*", NAME="eth5"
SUBSYSTEM=="net", ACTION=="add", KERNELS=="0000:1c:00.0" DRIVERS=="vmxnet3", ATTR{type}=="1", KERNEL=="eth*", NAME="eth6"
SUBSYSTEM=="net", ACTION=="add", KERNELS=="0000:05:00.0" DRIVERS=="vmxnet3", ATTR{type}=="1", KERNEL=="eth*", NAME="eth7"
Can you please help me setting the upgrade not to mix up the network interfaces order?
Thanks,
Mor.
On the upgraded CentOS 7.5 VM, I saw some errors in udevd saying:
Error changing net interface name 'eth3' to 'eth2': File exists
Error changing net interface name 'eth2' to 'eth1': File exists
Error changing net interface name 'eth0' to 'eth3': File exists
Error changing net interface name 'eth1' to 'eth0': File exists
I saw the following solution in RHEL https://access.redhat.com/solutions/1422203 but it didn't help.
- Issue happens on machines hosted on VMware
- we use net.ifnames=0 biosdevname=0 in the centos 7.5 grub file, for using the old network interface naming.
- on centos 6.3 we have the file /etc/udev/rules.d/69-vmxnet3-net.rules with the following data. this file is forwarded into the upgraded system and tries to change the nics order to the correct one:
SUBSYSTEM=="net", ACTION=="add", KERNELS=="0000:0b:00.0" DRIVERS=="vmxnet3", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
SUBSYSTEM=="net", ACTION=="add", KERNELS=="0000:13:00.0" DRIVERS=="vmxnet3", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
SUBSYSTEM=="net", ACTION=="add", KERNELS=="0000:1b:00.0" DRIVERS=="vmxnet3", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"
SUBSYSTEM=="net", ACTION=="add", KERNELS=="0000:04:00.0" DRIVERS=="vmxnet3", ATTR{type}=="1", KERNEL=="eth*", NAME="eth3"
SUBSYSTEM=="net", ACTION=="add", KERNELS=="0000:0c:00.0" DRIVERS=="vmxnet3", ATTR{type}=="1", KERNEL=="eth*", NAME="eth4"
SUBSYSTEM=="net", ACTION=="add", KERNELS=="0000:14:00.0" DRIVERS=="vmxnet3", ATTR{type}=="1", KERNEL=="eth*", NAME="eth5"
SUBSYSTEM=="net", ACTION=="add", KERNELS=="0000:1c:00.0" DRIVERS=="vmxnet3", ATTR{type}=="1", KERNEL=="eth*", NAME="eth6"
SUBSYSTEM=="net", ACTION=="add", KERNELS=="0000:05:00.0" DRIVERS=="vmxnet3", ATTR{type}=="1", KERNEL=="eth*", NAME="eth7"
Can you please help me setting the upgrade not to mix up the network interfaces order?
Thanks,
Mor.