about the network name rules on CentOS/Redhat 8 and the cloud-init network interface name

Everybody is good! As you all know, to use the client's network card name in cloud-init, you must fill in the exact name of the network card interface. This was easy in version 7 and before, which usually started with EN0. After version 8, however, the naming conventions for network cards changed a lot. In my own test environment, for example, I started with ENS3. I'm not sure what naming convention it uses, which would make it impossible to specify nic information using cloud-init. Could you help me explain how to deal with this problem? Thank you very much!

On Tue, Aug 24, 2021 at 11:17 AM Tommy Sway <sz_cuitao@163.com> wrote:
Everybody is good!
As you all know, to use the client's network card name in cloud-init, you must fill in the exact name of the network card interface.
This was easy in version 7 and before, which usually started with EN0.
After version 8, however, the naming conventions for network cards changed a lot. In my own test environment, for example, I started with ENS3.
I'm not sure what naming convention it uses, which would make it impossible to specify nic information using cloud-init.
Could you help me explain how to deal with this problem?
Thank you very much! _______________________________________________ Users mailing list -- users@ovirt.org To unsubscribe send an email to users-leave@ovirt.org Privacy Statement: https://www.ovirt.org/privacy-policy.html oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/users@ovirt.org/message/L6LPAKYOUYPMPH...
Hi, this is called Predictable Network Names and it is the default policy for net interface naming in el8. There are a couple tricks you can do to mitigate that, you can disable it, or predict the name based on your configuration PCI slot etc [0]. There is a documentation for RHEL that explains it [1]. There is also another option and that's using a custom udev rule to assign whatever name you want based on some identifiers like MAC, PCI addr etc. Hopefully this helps. Best regards, Ales -- Ales Musil Software Engineer - RHV Network Red Hat EMEA <https://www.redhat.com> amusil@redhat.com IM: amusil <https://red.ht/sig>

On Tue, Aug 24, 2021 at 12:59 PM Ales Musil <amusil@redhat.com> wrote:
On Tue, Aug 24, 2021 at 11:17 AM Tommy Sway <sz_cuitao@163.com> wrote:
Everybody is good!
As you all know, to use the client's network card name in cloud-init, you must fill in the exact name of the network card interface.
This was easy in version 7 and before, which usually started with EN0.
After version 8, however, the naming conventions for network cards changed a lot. In my own test environment, for example, I started with ENS3.
I'm not sure what naming convention it uses, which would make it impossible to specify nic information using cloud-init.
Could you help me explain how to deal with this problem?
Thank you very much! _______________________________________________ Users mailing list -- users@ovirt.org To unsubscribe send an email to users-leave@ovirt.org Privacy Statement: https://www.ovirt.org/privacy-policy.html oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/users@ovirt.org/message/L6LPAKYOUYPMPH...
Hi,
this is called Predictable Network Names and it is the default policy for net interface naming in el8. There are a couple tricks you can do to mitigate that, you can disable it, or predict the name based on your configuration PCI slot etc [0]. There is a documentation for RHEL that explains it [1]. There is also another option and that's using a custom udev rule to assign whatever name you want based on some identifiers like MAC, PCI addr etc.
Hopefully this helps.
Best regards, Ales
Forgot the links: [0] https://www.freedesktop.org/software/systemd/man/systemd.net-naming-scheme.h... [1] https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/htm...
--
Ales Musil
Software Engineer - RHV Network
Red Hat EMEA <https://www.redhat.com>
amusil@redhat.com IM: amusil <https://red.ht/sig>
-- Ales Musil Software Engineer - RHV Network Red Hat EMEA <https://www.redhat.com> amusil@redhat.com IM: amusil <https://red.ht/sig>

Great! Thank you! From: Ales Musil <amusil@redhat.com> Sent: Tuesday, August 24, 2021 7:00 PM To: Tommy Sway <sz_cuitao@163.com> Cc: users <users@ovirt.org> Subject: Re: [ovirt-users] about the network name rules on CentOS/Redhat 8 and the cloud-init network interface name On Tue, Aug 24, 2021 at 12:59 PM Ales Musil <amusil@redhat.com <mailto:amusil@redhat.com> > wrote: On Tue, Aug 24, 2021 at 11:17 AM Tommy Sway <sz_cuitao@163.com <mailto:sz_cuitao@163.com> > wrote: Everybody is good! As you all know, to use the client's network card name in cloud-init, you must fill in the exact name of the network card interface. This was easy in version 7 and before, which usually started with EN0. After version 8, however, the naming conventions for network cards changed a lot. In my own test environment, for example, I started with ENS3. I'm not sure what naming convention it uses, which would make it impossible to specify nic information using cloud-init. Could you help me explain how to deal with this problem? Thank you very much! _______________________________________________ Users mailing list -- users@ovirt.org <mailto:users@ovirt.org> To unsubscribe send an email to users-leave@ovirt.org <mailto:users-leave@ovirt.org> Privacy Statement: https://www.ovirt.org/privacy-policy.html oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/users@ovirt.org/message/L6LPAKYOUYPMPH... Hi, this is called Predictable Network Names and it is the default policy for net interface naming in el8. There are a couple tricks you can do to mitigate that, you can disable it, or predict the name based on your configuration PCI slot etc [0]. There is a documentation for RHEL that explains it [1]. There is also another option and that's using a custom udev rule to assign whatever name you want based on some identifiers like MAC, PCI addr etc. Hopefully this helps. Best regards, Ales Forgot the links: [0] https://www.freedesktop.org/software/systemd/man/systemd.net-naming-scheme.h... [1] https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/htm... -- Ales Musil Software Engineer - RHV Network <https://www.redhat.com> Red Hat EMEA <mailto:amusil@redhat.com> amusil@redhat.com IM: amusil <https://red.ht/sig> -- Ales Musil Software Engineer - RHV Network <https://www.redhat.com> Red Hat EMEA <mailto:amusil@redhat.com> amusil@redhat.com IM: amusil <https://red.ht/sig>

The naming convention is called BiosDevName and was introduced in kernel 2.6.27. It is defined by the OS kernel you are using in the guest. It is not related to oVirt itself or the KVM host. In my case, I install my VMs passing "biosdevname=0 net.ifnames=0" during the OS installation process, so all my VMs have ethX name style to make it easier to use cloud-init and other scripts. Marcos From: Tommy Sway <sz_cuitao@163.com> Sent: terça-feira, 24 de agosto de 2021 05:57 To: users@ovirt.org Subject: [External] : [ovirt-users] about the network name rules on CentOS/Redhat 8 and the cloud-init network interface name Everybody is good! As you all know, to use the client's network card name in cloud-init, you must fill in the exact name of the network card interface. This was easy in version 7 and before, which usually started with EN0. After version 8, however, the naming conventions for network cards changed a lot. In my own test environment, for example, I started with ENS3. I'm not sure what naming convention it uses, which would make it impossible to specify nic information using cloud-init. Could you help me explain how to deal with this problem? Thank you very much!
participants (3)
-
Ales Musil
-
Marcos Sungaila
-
Tommy Sway