Description of problem:
I created a VF via sriov.total-vfs 1 and wanted to create a mac address specific VF. So I modified the connection to have 0 mac=00:11:22:33:44:55 but it didn't change the original one.
If I created the connection directly with mac address it worked.
nmcli connection add type ethernet ifname em2 sriov.total-vfs 1 sriov.vfs '0 mac=00:11:22:33:44:55'
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. nmcli connection add type ethernet ifname em2 sriov.total-vfs 1
2. nmcli con up ethernet-em2
3. nmcli connection modify ethernet-em2 sriov.vfs '0 mac=00:11:22:33:44:99'
4. nmcli con up ethernet-em2
address is still random
should be 00:11:22:33:44:99
Are you checking the mac address in the 'ip l show em2' output or in the VF interface ('ip l show em2_0')?
I see the following message with the ixgbe driver:
kernel: ixgbe 0000:01:00.0: setting MAC 00:11:22:33:44:99 on VF 0
kernel: ixgbe 0000:01:00.0: Reload the VF driver to make this change effective.
which means that the new MAC was applied to VF but VF interface doesn't recognize it until the ixgbevf driver gets reloaded. This seems like a NIC limitation and it would be bad for NM to unload/reload a kernel module because this disrupts existing interfaces.
I'll try to reproduce with a different ethernet card.
[root@dell-per720-03 NetworkManager-ci]# ip l show em2
5: em2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
link/ether b8:ca:3a:64:c4:da brd ff:ff:ff:ff:ff:ff
vf 0 MAC 00:11:22:33:44:99, spoof checking on, link-state auto, trust off, query_rss off
[root@dell-per720-03 NetworkManager-ci]# ip l show em2_0
13: em2_0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
link/ether fa:80:50:47:69:93 brd ff:ff:ff:ff:ff:ff
and yeah, reloading of ixgbevf helps here, let's close this as NOTABUG.