Bug 499267 - Assigning a PCI device using virt-manager/virt-install fails
Assigning a PCI device using virt-manager/virt-install fails
Product: Fedora
Classification: Fedora
Component: python-virtinst (Show other bugs)
All Linux
high Severity medium
: ---
: ---
Assigned To: Cole Robinson
Fedora Extras Quality Assurance
Depends On:
Blocks: F11VirtTarget
  Show dependency treegraph
Reported: 2009-05-05 17:01 EDT by Mark McLoughlin
Modified: 2009-05-06 17:37 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 499576 (view as bug list)
Last Closed: 2009-05-06 17:37:25 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Call detach/reset on the correct object (1.05 KB, text/plain)
2009-05-06 10:09 EDT, Cole Robinson
no flags Details

  None (edit)
Description Mark McLoughlin 2009-05-05 17:01:55 EDT
Just tested virt-manager's device assignment with the following steps:

  * Run virt-manager, open an existing guest and go to the details tab
  * Click "Add hardware", choose "Physical host device" and click "Forward"
  * Choose the appropriate device from the drop down list (e.g. "00:19.0 Interface eth0 (82566DM-2 Gigabit Network Connection)")
  * Click "Forward" and "Finish" 

and it failed with:

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/addhardware.py", line 571, in finish
  File "/usr/share/virt-manager/virtManager/addhardware.py", line 607, in add_hostdev
  File "/usr/lib/python2.6/site-packages/virtinst/VirtualHostDevice.py", line 207, in setup
    raise RuntimeError(_("Could not detach PCI device: %s" % str(e)))
RuntimeError: Could not detach PCI device: 'PCIDevice' object has no attribute 'dettach'
Comment 1 Mark McLoughlin 2009-05-05 17:07:50 EDT
Just tried with virt-install --host-device and got the same error
Comment 2 Mark McLoughlin 2009-05-06 09:41:36 EDT
Okay, the problem turns out to be that VirtualHostDevice._nodedev is a NodeDevice, not a virNodeDevice yet we do this:


We need a comprehensive fix which doesn't throw away the virNodeDevice in NodeDeviceParser.lookupNodeName(), but I think we should temporarily disable this dettach/reset code for F11 GA and the test day tomorrow
Comment 3 Cole Robinson 2009-05-06 10:09:36 EDT
Created attachment 342658 [details]
Call detach/reset on the correct object

Seems to have done the job, since choosing an arbitrary pci entry in 'virsh nodedev-list' and passing to --host-device managed to lock my machine up :)
Comment 4 Mark McLoughlin 2009-05-06 11:12:13 EDT
Looks good to me
Comment 5 Cole Robinson 2009-05-06 12:36:36 EDT
Built into python-virtinst-0.400.3-8.fc11.
Comment 6 Mark McLoughlin 2009-05-06 16:21:38 EDT
Tag request: https://fedorahosted.org/rel-eng/ticket/1749

* Wed May 06 2009 Cole Robinson <crobinso@redhat.com> - 0.400.3-8.fc11
- Fix PCI assignment (bz 499267)
Comment 7 Mark McLoughlin 2009-05-06 17:37:25 EDT
Tagged now

Note You need to log in before you can comment on or make changes to this bug.