Bug 746355
Summary: | virt-manager detaches PCI devices from host, but fails to reattach if hotplug fails | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Eric Blake <eblake> | ||||
Component: | python-virtinst | Assignee: | Cole Robinson <crobinso> | ||||
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | high | ||||||
Version: | 6.2 | CC: | ajia, dallan, dyuan, hjiang, juzhang, jyang, mjenner, mvadkert, mzhan, rwu, syeghiay, veillard, weizhan, zpeng | ||||
Target Milestone: | rc | ||||||
Target Release: | --- | ||||||
Hardware: | x86_64 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: |
No description necessary
|
Story Points: | --- | ||||
Clone Of: | 736214 | Environment: | |||||
Last Closed: | 2011-12-06 16:17:33 UTC | Type: | --- | ||||
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: | 736214 | ||||||
Bug Blocks: | 748554 | ||||||
Attachments: |
|
Comment 2
Eric Blake
2011-10-14 22:14:20 UTC
Worse, virt-manager is explicitly calling virNodeDeviceDettach even when attaching a PCI device to an offline guest. This prevents the host from using that device, even if there are no plans to start the guest right away. Really, virt-manager should only be calling virNodeDeviceDettach at the same points that libvirt would be emulating it for managed devices (that is, when starting a guest), since it is perfectly valid to have multiple persistent guests all claiming the same <hostdev>, so long as only one of the guests is running at a time (see bug 733587 for more details on a just-fixed libvirt bug for having multiple offline guests sharing a <hostdev>). Created attachment 528827 [details]
Drop all hostdev detach/reset sanity checks
Moving to virtinst since that's where the fix is Fixed in python-virtinst-0.600.0-5.el6 Reproduced with the following package: python-virtinst-0.600.0-3.el6.noarch Verified with kernel-2.6.32-197.el6.x86_64 qemu-kvm-0.12.1.2-2.192.el6.x86_64 libvirt-0.9.4-19.el6.x86_64 python-virtinst-0.600.0-5.el6.noarch virt-manager-0.9.0-7.el6.x86_64 step: 1.$ echo 0 > /sys/module/kvm/parameters/allow_unsafe_assigned_interrupts 2.# readlink /sys/bus/pci/devices/0000:00:19.0/driver ../../../bus/pci/drivers/e1000e 3.$ virsh start dom 4.$ virt-manager view the details of dom click Add hardware select PCI Host Device scroll to the listed pci device (in my case,00:19:0 interface eth0) hit finish The hotplug fails (expected)(Network is disconnected.) internal error unable to execute QEMU command 'device_add': Device 'pci-assign' could not be initialized. hit no to adding the device Then the network is reconnected. 5.# readlink /sys/bus/pci/devices/0000:00:19.0/driver ../../../bus/pci/drivers/e1000e So move the status of this bug to 'verified'. Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: No description necessary 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. http://rhn.redhat.com/errata/RHBA-2011-1643.html |