Hello experts,
I added my question at the end of some old link (SR-IOV on NIC 82599: Are VF MAC Addresses unique? ) but no one answer that. So I'm asking here again.
I'm looking for a way to reset VF MAC, not just OS MAC, according to Patrick it is called "administratively assigned MAC".
At initially when a VF is created it is assigned with 00:00:00:00:00:00 (iproute show) as though in OS log say different. After spawning a virtual machine with the VF having some specific MAC, whenever I destroy that virtual machine libvirt try to revert the mac address of VF but eventually 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 remain in previous MAC address. If I start new virtual machine with the other VF having that MAC address then it won't work.
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 in advance,
Minho Ban