<div dir="ltr">I managed to make some progress on this<div><br></div><div>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. </div><div><br></div><div>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. </div><div><br></div><div>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.</div><div><br></div><div>Guidance from anyone is appreciated, it feels like I am close to solving this but somehow still frustratingly far away</div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Mar 1, 2017 at 7:22 AM Max Ehrlich <<a href="mailto:max.ehr@gmail.com">max.ehr@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="gmail_msg">Daniel,<div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Thanks for the reply.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">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?</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">thanks,</div><div class="gmail_msg">Max</div></div><br class="gmail_msg"><div class="gmail_quote gmail_msg"><div dir="ltr" class="gmail_msg">On Wed, Mar 1, 2017 at 4:11 AM Daniel P. Berrange <<a href="mailto:berrange@redhat.com" class="gmail_msg" target="_blank">berrange@redhat.com</a>> wrote:<br class="gmail_msg"></div><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Tue, Feb 28, 2017 at 09:33:16PM +0000, Max Ehrlich wrote:<br class="gmail_msg">
> Hi,<br class="gmail_msg">
><br class="gmail_msg">
> I want to create a virtual hci device on my virtual machine. I have seen<br class="gmail_msg">
> that qemu has options supporting this<br class="gmail_msg">
><br class="gmail_msg">
> <a href="https://qemu.weilnetz.de/doc/qemu-doc.html#Bluetooth_0028R_0029-options" rel="noreferrer" class="gmail_msg" target="_blank">https://qemu.weilnetz.de/doc/qemu-doc.html#Bluetooth_0028R_0029-options</a><br class="gmail_msg">
><br class="gmail_msg">
> and<br class="gmail_msg">
><br class="gmail_msg">
> <a href="https://qemu.weilnetz.de/doc/qemu-doc.html#pcsys_005fusb" rel="noreferrer" class="gmail_msg" target="_blank">https://qemu.weilnetz.de/doc/qemu-doc.html#pcsys_005fusb</a><br class="gmail_msg">
><br class="gmail_msg">
> Is there any support for these options in libvirt? I was not able to find<br class="gmail_msg">
<br class="gmail_msg">
No, libvirt doesn't have explicit support for bluetooh at this time.<br class="gmail_msg">
<br class="gmail_msg">
> anything in documentation so I added the qemu command line xml as follows<br class="gmail_msg">
> <qemu:commandline><br class="gmail_msg">
>     <qemu:arg value='-usbdevice'/><br class="gmail_msg">
>     <qemu:arg value='bt:hci'/><br class="gmail_msg">
>     <qemu:arg value='-bt'/><br class="gmail_msg">
>     <qemu:arg value='hci,host'/><br class="gmail_msg">
>   </qemu:commandline><br class="gmail_msg">
><br class="gmail_msg">
> but when I try to run my machine from virt-manager i get the following<br class="gmail_msg">
> error:<br class="gmail_msg">
><br class="gmail_msg">
> Error starting domain: internal error: process exited while connecting to<br class="gmail_msg">
> monitor: 2017-02-28T21:25:51.735987Z qemu-system-x86_64: -device<br class="gmail_msg">
> ich9-usb-ehci1,id=usb,bus=pcie.0,addr=0x1d.0x7: PCI: slot 29 function 7 not<br class="gmail_msg">
> available for ich9-usb-ehci1, in use by ich9-usb-ehci1<br class="gmail_msg">
><br class="gmail_msg">
> this error does not appear if I remove the commandline xml nodes<br class="gmail_msg">
><br class="gmail_msg">
> Does anyone have any guidance for troubleshooting this?<br class="gmail_msg">
<br class="gmail_msg">
Libvirt assigns PCI addresses for every device it adds. QEMU will assign<br class="gmail_msg">
addresses for any device that doesn't have an address present. Your<br class="gmail_msg">
custom device is missing an address and QEMU is asigning one, unaware that<br class="gmail_msg">
the address it picks will clash with one assigned by libvirt.<br class="gmail_msg">
<br class="gmail_msg">
To fix this you probably need to add addressing to your device addition,<br class="gmail_msg">
but I'm unclear about exactly how the bluetooth devices work in QEMU so<br class="gmail_msg">
can't give an explicit recommendation<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
Regards,<br class="gmail_msg">
Daniel<br class="gmail_msg">
--<br class="gmail_msg">
|: <a href="http://berrange.com" rel="noreferrer" class="gmail_msg" target="_blank">http://berrange.com</a>      -o-    <a href="http://www.flickr.com/photos/dberrange/" rel="noreferrer" class="gmail_msg" target="_blank">http://www.flickr.com/photos/dberrange/</a> :|<br class="gmail_msg">
|: <a href="http://libvirt.org" rel="noreferrer" class="gmail_msg" target="_blank">http://libvirt.org</a>              -o-             <a href="http://virt-manager.org" rel="noreferrer" class="gmail_msg" target="_blank">http://virt-manager.org</a> :|<br class="gmail_msg">
|: <a href="http://entangle-photo.org" rel="noreferrer" class="gmail_msg" target="_blank">http://entangle-photo.org</a>       -o-    <a href="http://search.cpan.org/~danberr/" rel="noreferrer" class="gmail_msg" target="_blank">http://search.cpan.org/~danberr/</a> :|<br class="gmail_msg">
</blockquote></div></blockquote></div>