Linux server network interface displays eth0 over ens192

While launching new VM from a template using Morpheus, we found the network interfaces are still created with old naming standards like eth0. We are even wiping of all udev rules (net-persistent-net) while creating the template. Is there a way that we can edit the cloud init - metadata file that is being created by Morpheus to avoid the hardcoding of this default interface names. The altname ens192 does not help. We need to have ens192 as interface and we can eth0 as altname if needed. Why this is getting renamed. Please advise.

$ dmesg | grep eth0
vmxnet3 0000:0b:00.0 eth0: NIC Link is Up 10000 Mbps
vmxnet3 0000:0b:00.0 ens192: renamed from eth0
vmxnet3 0000:0b:00.0 eth0: renamed from ens192
vmxnet3 0000:0b:00.0 eth0: intr type 3, mode 0, 3 vectors allocated
vmxnet3 0000:0b:00.0 eth0: NIC Link is Up 10000 Mbps

eth0 is the primary name of the first interface. Morpheus can’t log into the instance and find out if the interface was named something else in order to match the name. Even if eth0 is wrong, it’s better to generalize than the assign an arbitrary or possibly wrong persistent name like ens192, since that is derived. AFAIK, this is the same rationale and process that AWS uses for it’s interface naming, although it looks like they’ve gotten a little more creative with Amazon Linux 2023.

You could probably write a task as part of your provisioning workflow to rename the first interface to ens192 and then reboot the VM.

I don’t believe there is currently a way to modify the cloud-init coming from Morpheus.