Intel 82599 Ethernet Controller driver generates a random MAC address for VF at driver load time. The random VF MAC address assigned by PF driver can be changed by an application like Virt-Manager in RHEL after the PF driver is loaded. Other application may change the VF MAC address at any time.
One caveat – User can use IPROUTE2 utility to assign a unique MAC address to a VF from within the host Operating System. Once the new MAC address is assigned, VM that has this particular VF assigned to will not be able to alter its MAC address. This is called “administratively assigned MAC” and is a security feature.
Quite outdated question but may I ask whether there is method to clean up the "administratively assigned MAC" with 00:00:00:00:00:00 which was initial state of VF?
Whenever I destroy virtual machine using VF, libvirt try to reset the VF mac address with initial value but failed. Here's the log.
Dec 27 12:57:13 mita-nova1 kvm: 0 guests now active
Dec 27 12:57:14 mita-nova1 systemd-machined: Machine qemu-6-iovtest terminated.
Dec 27 12:57:14 mita-nova1 journal: End of file while reading data: Input/output error
Dec 27 12:57:14 mita-nova1 journal: Cannot set interface MAC/vlanid to 00:00:00:00:00:00/0 for ifname ens1f1 ifindex -1 vf 1: Invalid argument
Dec 27 12:57:14 mita-nova1 kernel: ixgbevf 0000:05:10.3: enabling device (0000 -> 0002)
Dec 27 12:57:14 mita-nova1 kernel: ixgbe 0000:05:00.1 ens1f1: VF Reset msg received from vf 1
Dec 27 12:57:14 mita-nova1 journal: Failed to open file '/var/run/libvirt/qemu/ens1f1_vf1': No such file or directory
Dec 27 12:57:14 mita-nova1 kernel: ixgbevf 0000:05:10.3: fe:ff:ff:ff:ff:ff
Dec 27 12:57:14 mita-nova1 kernel: ixgbevf 0000:05:10.3: MAC: 1
Dec 27 12:57:14 mita-nova1 kernel: ixgbevf 0000:05:10.3: Intel(R) 82599 Virtual Function
This lead to mac address collision because the VF will be remain in previously assigned mac address. When I started new virtual machine with the other VF having that mac address then it didn't work. (when I changed the mac of the first VF, then network worked normally in the virtual machine)
The host machine is running RHEL 7.3 and ixgbe version is 4.0.1-k-rh7.2. If you need any more information just let me know.
Thanks and regards,