Bug 1179138
| Summary: | virt-manager does not show the new added hot-plug devices immediately after virsh command attach device successfully | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | vivian zhang <vivianzhang> | |
| Component: | virt-manager | Assignee: | Giuseppe Scrivano <gscrivan> | |
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> | |
| Severity: | medium | Docs Contact: | ||
| Priority: | medium | |||
| Version: | 7.1 | CC: | dyuan, gscrivan, jsuchane, jtomko, juzhou, mzhan, tzheng | |
| Target Milestone: | rc | Keywords: | Regression, Upstream | |
| Target Release: | --- | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | virt-manager-1.2.0-1-el7 | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1206114 (view as bug list) | Environment: | ||
| Last Closed: | 2015-11-19 05:23:21 UTC | Type: | Bug | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Embargoed: | ||||
| Bug Depends On: | 1206114, 1212168 | |||
| Bug Blocks: | 1205796 | |||
The bug can not be reproduce on rhel7.0 release version(virt-manager-0.10.0-20.el7). it seems that libvirt doesn't have an event for this, and virt-manager passed from polling libvirt status to be event-driven. I will investigate this better to be sure about it. commit be7611b645e2e888a0decc4c02f411a967ccee80
Author: Ján Tomko <jtomko>
Date: Wed Apr 29 11:00:40 2015 +0200
connection: refresh domain XML on device hotplug
Listen to the VIR_DOMAIN_EVENT_ID_DEVICE_ADDED event
too, added by libvirt 1.2.15.
https://bugzilla.redhat.com/show_bug.cgi?id=1179138
Signed-off-by: Ján Tomko <jtomko>
I can reproduce this bug with following product versions:
virt-manager-1.1.0-12.el7.noarch
libvirt-1.2.8-11.el7.x86_64
libvirt-python-1.2.8-1.el7.x86_64
Steps are the same as description.
Then verify with the latest versions:
virt-manager-1.2.0-4.el7.noarch
libvirt-1.2.15-2.el7.x86_64
libvirt-python-1.2.15-1.el7.x86_64
Steps:
1. Prepare a running guest, works well, check the network device in guest and virt-manager
# virsh list
Id Name State
----------------------------------------------------
3 rhel6.7 running
2. Dumpxml guest for interface list, also checks it in guest
# virsh dumpxml rhel6.7
...
<interface type='network'>
<mac address='52:54:00:b7:29:90'/>
<source network='default'/>
<model type='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
...
# virsh domiflist rhel6.7
Interface Type Source Model MAC
-------------------------------------------------------
vnet0 network default virtio 52:54:00:b7:29:90
in guest:
# lspci |grep Eth
00:03.0 Ethernet controller: Red Hat, Inc Virtio network device
2. Prepare a network xml, attach it to the guest
# cat /tmp/network1.xml
<interface type='network'>
<mac address='52:54:00:b0:8d:2c'/>
<source network='default' bridge='virbr0'/>
<target dev='vnet0'/>
<model type='rtl8139'/>
</interface>
# virsh attach-device rhel6.7 /tmp/network1.xml
Device attached successfully
3. Recheck the guest interface list and dumpxml to confirm the network device has been hot-plugged to guest success
# virsh domiflist rhel6.7
Interface Type Source Model MAC
-------------------------------------------------------
vnet0 network default virtio 52:54:00:b7:29:90
vnet1 network default rtl8139 52:54:00:b0:8d:2c
# virsh dumpxml rhel6.7
...
<interface type='network'>
<mac address='52:54:00:b7:29:90'/>
<source network='default'/>
<model type='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
<interface type='network'>
<mac address='52:54:00:b0:8d:2c'/>
<source network='default' bridge='virbr0'/>
<target dev='vnet1'/>
<model type='rtl8139'/>
<alias name='net1'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
...
4. In guest, network exist
# lspci |grep Eth
00:03.0 Ethernet controller: Red Hat, Inc Virtio network device
00:09.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8100/8101L/8139 PCI Fast Ethernet Adapter (rev 20) ----> This is the new added hot-plug network device
5. Check with virt-manager for the new added hot-plug network interface device, click "Show virtual hardware details" menu.
Result:
After Step 5, virt-manager can sync with virsh command immediately for hot-plug device attach.
According to the result above in the latest version, move this bug from ON_QA to VERIFIED.
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, 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://rhn.redhat.com/errata/RHBA-2015-2206.html |
Description: virt-manager does not show the new added hot-plug devices immediately after virsh command attach device successfully, Product version virt-manager-1.1.0-10.el7.noarch libvirt-1.2.8-11.el7.x86_64 qemu-kvm-rhev-2.1.2-17.el7.x86_64 3.10.0-220.el7.x86_64 How producible 100% Steps: 1. Prepare a running guest, works well, check the network device in guest and virt-manager # virsh list Id Name State ---------------------------------------------------- 7 rhel7 running 2. Dumpxml guest for interface list, also checks it in guest # virsh dumpxml rhel ... <interface type='network'> <mac address='52:54:00:c6:3b:95'/> <source network='default' bridge='virbr0'/> <bandwidth> <inbound average='1000' peak='5000' burst='1024'/> <outbound average='128' peak='256' burst='256'/> </bandwidth> <target dev='vnet2'/> <model type='virtio'/> <driver name='vhost' queues='5'/> <link state='down'/> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x10' function='0x0'/> </interface> ... # virsh domiflist rhel7 Interface Type Source Model MAC ------------------------------------------------------- vnet2 network default virtio 52:54:00:c6:3b:95 in guest: # lspci |grep Eth 00:10.0 Ethernet controller: Red Hat, Inc Virtio network device 2. Prepare a network xml, attach it to the guest # cat /tmp/network1.xml <interface type='network'> <mac address='52:54:00:b0:8d:2c'/> <source network='default' bridge='virbr0'/> <target dev='vnet0'/> <model type='rtl8139'/> </interface> # virsh attach-device rhel7 /tmp/network1.xml Device attached successfully 3. Recheck the guest interface list and dumpxml to confirm the network device has been hot-plugged to guest success # virsh domiflist rhel7 Interface Type Source Model MAC ------------------------------------------------------- vnet2 network default virtio 52:54:00:c6:3b:95 vnet3 network default rtl8139 52:54:00:b0:8d:2c # virsh dumpxml rhel ... <interface type='network'> <mac address='52:54:00:c6:3b:95'/> <source network='default' bridge='virbr0'/> <bandwidth> <inbound average='1000' peak='5000' burst='1024'/> <outbound average='128' peak='256' burst='256'/> </bandwidth> <target dev='vnet2'/> <model type='virtio'/> <driver name='vhost' queues='5'/> <link state='down'/> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x10' function='0x0'/> </interface> <interface type='network'> <mac address='52:54:00:b0:8d:2c'/> <source network='default' bridge='virbr0'/> <target dev='vnet3'/> <model type='rtl8139'/> <alias name='net1'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> ... 4. in guest, network exist # lspci |grep Eth 00:03.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8100/8101L/8139 PCI Fast Ethernet Adapter (rev 20) ----> the is the new added hot-plug network device 00:10.0 Ethernet controller: Red Hat, Inc Virtio network device 5. check with virt-manager for the new added hot-plug network interface device, click "Show virtual hardware details" menu. the new added NIC device doest not shown, only the old one can be seen. 6. Close virt-manger window and open it again, or restart libvirtd, the new added hot-plug devices can be seen from virt-manger. Additional info: The same issue also hit on hot-plug for disk, console, usb hostdev devices. Actual result: Although, virsh command has attached device successfully, but virt-manager does not sync with guest new added hot-plug devices immediately. It is abnormal. Expected result: Virt-manage can sync with virsh command immediately for hot-plug device attach.