Bug 524012

Summary: libvirt cannot hot-unplug devices which were not previously hot-plugged
Product: [Fedora] Fedora Reporter: Mark McLoughlin <markmc>
Component: libvirtAssignee: Mark McLoughlin <markmc>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 12CC: berrange, clalance, crobinso, itamar, vbenes, veillard, virt-maint
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-03-16 15:23:03 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:    
Bug Blocks: 514891    

Description Mark McLoughlin 2009-09-17 15:20:57 UTC
The problem is here:

  if (!virHostdevHasValidGuestAddr(detach)) {
      qemudReportError(conn, NULL, NULL, VIR_ERR_OPERATION_FAILED,
                       "%s", _("hostdev cannot be detached - device state missing"));
      return -1;
  }

Basically, because we do not know what PCI address was assigned to the device at startup, we cannot remove it.

This will be fixed with future versions of qemu and libvirt by libvirt parsing the output of a monitor command to query the PCI address.

Adding to F13VirtTarget

Comment 1 Bug Zapper 2009-11-16 12:34:07 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 12 development cycle.
Changing version to '12'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 2 Cole Robinson 2010-03-16 15:23:03 UTC
Pretty sure this is fixed in latest libvirt. Since this is part of -device support which is hugely invasive, it will only be in rawhide/F14 unless we rebase older Fedora. Closing as RAWHIDE.