+++ This bug was initially created as a clone of Bug #1972468 +++ Description of problem: Hotplug hostev type interface succeed, but the live xml did not update accordingly Version-Release number of selected component (if applicable): libvirt-7.4.0-1.module+el8.5.0+11218+83343022.x86_64 How reproducible: 100% Steps to Reproduce: 1. Start a vm, then try to hotplug an hostdev interface, succeed: # virsh start rhel Domain 'rhel' started # virsh domiflist rhel Interface Type Source Model MAC ------------------------------------------------------------- vnet0 network default e1000e 52:54:00:5d:da:04 # lspci | grep Virtual 82:10.0 Ethernet controller: Intel Corporation 82599 Ethernet Controller Virtual Function (rev 01) # virsh attach-interface rhel hostdev --managed 0000:82:10.0 Interface attached successfully 2. Check on the vm, the interface attached successfully: [root@localhost ~]# ip l ...... 2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000 link/ether 52:54:00:5d:da:04 brd ff:ff:ff:ff:ff:ff 3: enp4s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000 link/ether 52:54:00:df:a2:14 brd ff:ff:ff:ff:ff:ff 3. check the live xml, the hostdev interface do not exists, and domiflist did not show the hostdev interface: # virsh domiflist rhel Interface Type Source Model MAC ------------------------------------------------------------- vnet0 network default e1000e 52:54:00:5d:da:04 # virsh dumpxml rhel | grep hostdev (no outputs) Actual results: in step 3, no hostdev interface exists in the live xml after hotplug Expected results: The hostdev interface xml should exists in the vm's live xml Additional info: on such issue with libvirt-7.3.0-1.module+el8.5.0+11004+f4810536.x86_64
Sigh. :-( Yes, I reproduced it with upstream libvirt on F33, and I see the problem - it was caused by me. Specifically it was upstream commit 7b8bec4560 which was part of the fix for Bug 1939776. That means that the fix for this regression will need to also be backported to RHEL-AV 8.5.0.
Patch posted upstream: https://listman.redhat.com/archives/libvir-list/2021-June/msg00511.html
This is now pushed upstream: commit 54b602019d7dfa94a6c52ef7aa3abdfaa93ed233 Author: Laine Stump <laine> Date: Thu Jun 17 01:14:27 2021 -0400 qemu_hotplug: don't forget to add hostdev interfaces to the interface list
Test on libvirt-7.5.0-1.module+el8.5.0+11664+59f87560.x86_64, the bug is fixed. # virsh start rhel virshDomain 'rhel' started # virsh attach-interface rhel hostdev --managed 0000:04:10.6 Interface attached successfully # virsh domiflist rhel Interface Type Source Model MAC ----------------------------------------------------------- - hostdev - - 52:54:00:49:1f:a4 # virsh dumpxml rhel | grep /interface -B12 <interface type='hostdev' managed='yes'> <mac address='52:54:00:49:1f:a4'/> <driver name='vfio'/> <source> <address type='pci' domain='0x0000' bus='0x04' slot='0x10' function='0x6'/> </source> <alias name='hostdev0'/> <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> </interface>
Finished one round auto job, no such failures, the bug is fixed.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (virt:av bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2021:4684