Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-68677

KVM SR-IOV - Guest VM host device MAC Addresses are not stable

    • No
    • Important
    • CustomerScenariosInitiative
    • rhel-sst-virtualization-hwe
    • ssg_virtualization
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • Red Hat Enterprise Linux, Red Hat Enterprise Linux Advanced Virtualization
    • None
    • None
    • None
    • All
    • None

      What were you trying to do that didn't work?

      Setting up a KVM virtual machine that needs fast network performance. Deploy the guest VM with two VFs :

      --network none --host-device=pci_0000_17_06_2 --host-device=pci_0000_17_06_3 17:06.2 Ethernet controller: Intel Corporation Ethernet Virtual Function 700 Series (rev 02) 17:06.3 Ethernet controller: Intel Corporation Ethernet Virtual Function 700 Series (rev 02)

      The VM boots with these parameters.
       

      cat /proc/cmdline

      BOOT_IMAGE=/vmlinuz-5.15.0-126-generic root=/dev/mapper/cw_vg_rootfs-cw_lvm_rootfs ro nosplash kaslr audit=1 console=tty0 console=ttyS0 apparmor=1 security=apparmor audit=1 audit_backlog_limit=8192

      Reboot the VM several times and NICs inside the VM change MAC Addresses.

      Section 16.2.2 of https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/7/html/virtualization_deployment_and_administration_guide/sect-pci_devices-pci_passthrough#sect-SR_IOV-Using_SR_IOV

      says...

      "SR-IOV Virtual Functions (VFs) can be assigned to virtual machines by adding a device entry in <hostdev> with the virsh edit or virsh attach-device command. However, this can be problematic because unlike a regular network device, an SR-IOV VF network device does not have a permanent unique MAC address, and is assigned a new MAC address each time the host is rebooted. Because of this, even if the guest is assigned the same VF after a reboot, when the host is rebooted the guest determines its network adapter to have a new MAC address. As a result, the guest believes there is new hardware connected each time, and will usually require re-configuration of the guest's network settings."

      I am unable to find any similar paragraph in newer RHEL documentation. 

      What is the impact of this issue to you?

      When VM NICs change MAC Addresses apparently at random, it wreaks havoc with VM network configurations.

      Please provide the package NVR for which the bug is seen:

      All RHEL versions.

      How reproducible is this bug?:

      At will

      Steps to reproduce

      1. Set up a RHEL KVM host with SR-IOV.
      2. Build a VM on that host with two or more VFs.
      3. Boot, shut down, and power on the VM several times.

      Expected results

      MAC Addresses on VM NICs are unstable.

      Actual results

      MAC Addresses on VM NICs should stay stable.

      Or if we expect unstable VM NIC MAC Addresses with SR-IOV VFs, then RHEL should  document it.

              yanghliu@redhat.com YangHang Liu
              rhn-support-gscott Greg Scott
              virt-maint virt-maint
              YangHang Liu YangHang Liu
              Votes:
              0 Vote for this issue
              Watchers:
              13 Start watching this issue

                Created:
                Updated:
                Resolved: