CentOS 8 - Unusual problem with eth0 interface

That’s interesting but I can’t get over thinking that the interface name change (from CentOS7 to 8) is a key factor.
I’m running VPS instances (not dedicated hardware) that must clearly use virtual Ethernet interfaces.
FWIW CentOS 8 installation was offered by the cloud provider, meaning I did not download and use the CentOS ISO.
So far, everything about the server works correctly, it is only Web/Virtualmin that does not “know” the IP address - and only IPv4 is unknown, IPv6 is correctly displayed. (But IPv6 appears rarely used).

So I looked to try to find why the interface name has changed. I don’t have a RedHat subscription to read
https://access.redhat.com/solutions/3709641 which appears to promise an answer.

I first found an article about renaming the Ubuntu 16.04 network interface


which indicates that the starting name of eth0 is renamed to ens* by GRUB.
Sure enough dmesg on my CentOS 8 shows
dmesg | grep -i eth
[ 3.045187] virtio_net virtio0 ens3: renamed from eth0
and “ip a” displays the correct information for interfaces loopback and ens3.

With this confirmation I searched “Centos 8 virtio ens3 eth0” and found
https://centosfaq.org/centos/renaming-virtio-devices-names-on-centos-8-vm-guest/

which offers a comprehensive explanation of how to avoid renaming the interface.

But it leaves the question “Is it a good idea to change CentOS default behaviour?”
I would prefer to leave CentOS 8 alone and ask Webmin to report the interface(s) that it finds.

BTW does your CentOS have an interface named ens3 or might this vary depending on the underlying virtualization system?

1 Like