2

The SR-IOV VF is persisted over boot with

nmcli connection modify <PF> sriov.total-vfs 3
nmcli connection modify <PF> connection.autoconnect true

Then it would create VF interface names like <PF>v0-v2.

I would like to change that and tried to follow this RHEL link by setting UDEV rules with the matching MAC address (chapter 1.6) but not working, seems the MAC address that UDEV sees is not the same as what has been set later after boot. In fact, in /var/log/messages during bootup the VF MAC addresses are always random so cannot use it as the criteria to set the interface name.

Any other way to set the VF interface name during startup? even not using UDEV?

user892960
  • 151
  • 4

1 Answers1

1

Just figured it out, do not use MAC address as criteria, use VF PCI address instead, also using systemd.link instead:

cat /etc/systemd/network/70-custom-ifnames-1.link
[Match]
Path=pci-<PCI address>

[Link]
Name=<new name>
user892960
  • 151
  • 4