[libvirt-users] Bluetooth Device Support

Max Ehrlich max.ehr at gmail.com
Thu Mar 2 02:38:04 UTC 2017


I managed to make some progress on this

I remember reading that the -usbdevice command line option can only create
uhci connections. When I opened my virtual machine settings in virt-manager
I found that I had a single USB controller configured (apparently exactly 1
is allowed) and it was set to USB1.

I should have done this earlier beacuse USB1 is slow so I set it to USB3.
Now, when I boot with the same XML, I have a bluetooth radio in the windows
device manager. So what I think is happening is that qemu is free to add a
uhci adapter for the emulated bluetooth since the only connected adapter
from libvirt is xhci.

Only problem left is, it has the little yellow arrow and its status
indicates "Windows has stopped this device because it has reported
problems. (Code 43)" . So either the thing isn't meant to work on Windows
10 (ss it was added some time ago), I need to find a driver (google was no
help), or I have the wrong command line options.

Guidance from anyone is appreciated, it feels like I am close to solving
this but somehow still frustratingly far away

On Wed, Mar 1, 2017 at 7:22 AM Max Ehrlich <max.ehr at gmail.com> wrote:

> Daniel,
>
> Thanks for the reply.
>
> This is pretty much what I had assumed. I would guess that assigning any
> free address, or telling qemu to plug the bt device into a controller that
> libvirt creates, might work, but I cant find anything in the documentation
> for qemu that would assign an address via command line. Do you know how to
> do it?
>
> thanks,
> Max
>
> On Wed, Mar 1, 2017 at 4:11 AM Daniel P. Berrange <berrange at redhat.com>
> wrote:
>
> On Tue, Feb 28, 2017 at 09:33:16PM +0000, Max Ehrlich wrote:
> > Hi,
> >
> > I want to create a virtual hci device on my virtual machine. I have seen
> > that qemu has options supporting this
> >
> > https://qemu.weilnetz.de/doc/qemu-doc.html#Bluetooth_0028R_0029-options
> >
> > and
> >
> > https://qemu.weilnetz.de/doc/qemu-doc.html#pcsys_005fusb
> >
> > Is there any support for these options in libvirt? I was not able to find
>
> No, libvirt doesn't have explicit support for bluetooh at this time.
>
> > anything in documentation so I added the qemu command line xml as follows
> > <qemu:commandline>
> >     <qemu:arg value='-usbdevice'/>
> >     <qemu:arg value='bt:hci'/>
> >     <qemu:arg value='-bt'/>
> >     <qemu:arg value='hci,host'/>
> >   </qemu:commandline>
> >
> > but when I try to run my machine from virt-manager i get the following
> > error:
> >
> > Error starting domain: internal error: process exited while connecting to
> > monitor: 2017-02-28T21:25:51.735987Z qemu-system-x86_64: -device
> > ich9-usb-ehci1,id=usb,bus=pcie.0,addr=0x1d.0x7: PCI: slot 29 function 7
> not
> > available for ich9-usb-ehci1, in use by ich9-usb-ehci1
> >
> > this error does not appear if I remove the commandline xml nodes
> >
> > Does anyone have any guidance for troubleshooting this?
>
> Libvirt assigns PCI addresses for every device it adds. QEMU will assign
> addresses for any device that doesn't have an address present. Your
> custom device is missing an address and QEMU is asigning one, unaware that
> the address it picks will clash with one assigned by libvirt.
>
> To fix this you probably need to add addressing to your device addition,
> but I'm unclear about exactly how the bluetooth devices work in QEMU so
> can't give an explicit recommendation
>
>
> Regards,
> Daniel
> --
> |: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/
> :|
> |: http://libvirt.org              -o-             http://virt-manager.org
> :|
> |: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/
> :|
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20170302/8ae48f00/attachment.htm>


More information about the libvirt-users mailing list