[libvirt] USB hostdev de/reattaching

Ján Tomko jtomko at redhat.com
Thu Mar 19 10:55:24 UTC 2015


On Thu, Mar 19, 2015 at 06:12:44AM -0400, Martin Polednik wrote:
> Hello,
> 
> according to libvirt documentation, when using hostdev with USB device
> "...the user is responsible to call virNodeDeviceDettach (or virsh nodedev-detach)
> before starting the guest...". In libvirt-1.2.13-1.el7.x86_64, this leads to 
> 
> virsh nodedev-detach usb_usb1
> 
> error: Failed to detach device usb_usb1
> error: invalid argument: device usb_usb1 is not a PCI device
> 
> The failure is most probably caused in qemuNodeDeviceDeta where qemuNodeDeviceGetPCIInfo
> is called. Is it a bug, or usb hostdev can be done without detaching/reattaching?

USB devices do not need to be detached/reattached explicitly, it's all
automatic.

And since qemuNodeDeviceDettach has always required a PCI device (see
commit 34d23b0), I think this is a documentation bug, introduced by
commit 10d3272.

Jan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150319/5e7685dd/attachment-0001.sig>


More information about the libvir-list mailing list