[libvirt] USB hostdev de/reattaching

2015-03-19 Thread Martin Polednik
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?

Thanks,
mpolednik 

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] USB hostdev de/reattaching

2015-03-19 Thread Ján Tomko
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


signature.asc
Description: Digital signature
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list