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 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? If it helps at all, virsh -v gives 2.1.0, virt-manager about page lists 1.3.2 and qemu-system-x86_64 --help gives 2.6.1 I am running Ubuntu 16.10. thanks, Max Ehrlich
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 findNo, 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/ :|
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@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/ > :| >
Seemingly Similar Threads
- Re: Bluetooth Device Support
- Re: Bluetooth Device Support
- Re: Fedora 19/20 new install :Unable to create vcpu cgroup
- Re: Cannot boot libvirt guests with OVMF. Raw qemu-kvm works as expected
- Cannot boot libvirt guests with OVMF. Raw qemu-kvm works as expected