Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
If a vm with a hotplugged iface is saved/restored, then after hotunplugging it, it's still listed although the interface is not available in the guest anymore.
This is reproducible only w/ QEMU 6.2, not with QEMU 6.1.
Version-Release number of selected component (if applicable):
libvirt-7.10.0-1.el9.s390x
qemu-kvm-6.2.0-1.el9.s390x
How reproducible:
100%
Steps to Reproduce:
1. Hotplug iface
a. virsh start avocado-vt-vm1
b. virsh attach-interface --domain avocado-vt-vm1 --type 'direct' --source 'enc9c0' --mac '9a:38:94:28:5f:e2' --target 'test' --model 'virtio' --inbound '100,200,100' --outbound '200,300,200'
c. virsh domiflist avocado-vt-vm1
>>
# virsh domiflist avocado-vt-vm1
Interface Type Source Model MAC
-------------------------------------------------------------
vnet1 network default virtio 52:54:00:fe:81:59
test direct enc9c0 virtio 9a:38:94:28:5f:e2
d. log into guest and list interfaces (ip link show)
==> the additional interface is listed
2. Save and restore vm
a. virsh save avocado-vt-vm1 /root/avocado-vt-vm1.save
b. virsh domiflist avocado-vt-vm1
>>
# virsh domiflist avocado-vt-vm1
Interface Type Source Model MAC
-------------------------------------------------------------
vnet1 network default virtio 52:54:00:fe:81:59
c. virsh restore /root/avocado-vt-vm1.save
d. virsh domiflist avocado-vt-vm1
>>
# virsh domiflist avocado-vt-vm1
Interface Type Source Model MAC
-------------------------------------------------------------
vnet1 network default virtio 52:54:00:fe:81:59
test direct enc9c0 virtio 9a:38:94:28:5f:e2
3. Detach the interface
a. virsh detach-interface --domain avocado-vt-vm1 --type direct --mac 9a:38:94:28:5f:e2
4. Check interface availability
a. virsh domiflist avocado-vt-vm1
b. virsh dumpmxml avocado-vt-vm1
c. log into guest and list available interfaces
Actual results:
Ad a.
-----
Interface Type Source Model MAC
-------------------------------------------------------------
vnet1 network default virtio 52:54:00:fe:81:59
test direct enc9c0 virtio 9a:38:94:28:5f:e2
Ad b.
-----
Still dumps the second interface
Ad c.
-----
The additional interface is not listed anymore.
Expected results:
virsh domiflist and virsh dumpxml correctly report only the one initial interface.
Additional info:
[1] This does not reproduce with qemu-kvm-6.1.0-8.el9.s390x
[2] This does not reproduce if step 2. (restore/save) is skipped
[3] This was hit by tp-libvirt/libvirt case virsh.attach_detach_interface.normal_test.vm_running.direct.default.domname - passing. The test passes if the restore/save is skipped (--vt-extra-params save_restore=no).
Comment 1yalzhang@redhat.com
2022-01-04 05:22:35 UTC
I think this is the same issue in bug 2035237(libvirt) and 2036669(qemu-kvm)
Comment 2yalzhang@redhat.com
2022-01-04 05:56:57 UTC
The hotplugged interface do not exists in the qemu cmd line, while after save-> restore, the hotplugged interface will also included into the qemu cmd line. This is why it can not reproduce if save/restore is skipped. (refer to https://bugzilla.redhat.com/show_bug.cgi?id=2035237#c2)