[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Having trouble with USB Passthrough to an HVM vm


  • To: xen-users@xxxxxxxxxxxxxxxxxxxx
  • From: David Kowis <david@xxxxxx>
  • Date: Sun, 05 Jul 2020 16:21:39 +0000 (UTC)
  • Delivery-date: Sun, 05 Jul 2020 16:23:09 +0000
  • List-id: Xen user discussion <xen-users.lists.xenproject.org>

Firstly the error,

root@nosgoth:/etc/xen/conf# xl create hass-hvm.cfg
Parsing config from hass-hvm.cfg
libxl: error: libxl_qmp.c:1813:qmp_ev_parse_error_messages: Domain 24:failed to open host usb device 2:3 libxl: error: libxl_create.c:1701:domcreate_attach_devices: Domain 24:unable to add vusb devices libxl: error: libxl_domain.c:1177:libxl__destroy_domid: Domain 24:Non-existant domain libxl: error: libxl_domain.c:1131:domain_destroy_callback: Domain 24:Unable to destroy guest libxl: error: libxl_domain.c:1058:domain_destroy_cb: Domain 24:Destruction of domain failed

from /var/log/xen/qemu-dm-hass.log:
Warning: speed mismatch trying to attach usb device "host:2.3" (full speed) to bus "xenusb-0.0", port "1" (high speed)
qemu-system-i386: terminating on signal 1 from pid 12738 (xl)
(that's all there is.)

And, my config:
<hass-hvm.cfg>
name="hass"
type="hvm"
vcpus=4
memory=2048
maxmem=4096
#device_model_version = "qemu-xen"
firmware = "seabios"

# Enable pv on hvm drivers
xen_platform_pci=1

vif = [ 'mac=00:16:3E:DE:AD:78, bridge=xenbr0' ]

boot='c'

disk = [
'phy:/dev/disk/by-path/ip-10.255.255.2:3260-iscsi-iqn.2005-10.org.freenas.ctl:xen-lun-35,xvda,w' #'file:/mnt/systems/ubuntu/18.04/ubuntu-18.04.01-netboot.iso,hdc:cdrom,r' #'file:/mnt/systems/ubuntu/18.04/ubuntu-18.04.4-live-server-amd64.iso,hdc:cdrom,r'
       ]


# usb passthrough for the zwave stick
usbctrl=['type=auto,version=2,ports=6']
usbdev=['hostbus=2,hostaddr=3']

#usb=1
#usbdevice=['host:658:200']

vnc=0

# Everything but qxl
vga = 'stdvga'

# Spice configuration?
spice = 1
spicehost = '10.10.220.111'
spiceport = 9701
spicepasswd = 'blerp'
spicevdagent = 1
spice_clipboard_sharing = 1
</hass-hvm.cfg>

Host lsusb:
<lsusb>
root@nosgoth:/etc/xen/conf# lsusb
Bus 002 Device 003: ID 0658:0200 Sigma Designs, Inc.
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 0624:0249 Avocent Corp. Virtual Keyboard/Mouse
Bus 001 Device 003: ID 0624:0248 Avocent Corp. Virtual Hub
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@nosgoth:/etc/xen/conf# lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/8p, 480M
|__ Port 5: Dev 3, If 0, Class=Communications, Driver=cdc_acm, 12M
        |__ Port 5: Dev 3, If 1, Class=CDC Data, Driver=cdc_acm, 12M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/6p, 480M
        |__ Port 1: Dev 3, If 0, Class=Hub, Driver=hub/5p, 480M
|__ Port 1: Dev 4, If 0, Class=Human Interface Device, Driver=usbhid, 480M |__ Port 1: Dev 4, If 1, Class=Human Interface Device, Driver=usbhid, 480M |__ Port 1: Dev 4, If 2, Class=Human Interface Device, Driver=usbhid, 480M
</lsusb>


Next, I've built xen by hand from the upstream tarball, 4.13.1 using this docker image: https://gitlab.light.kow.is/kowis-projects/xen-builder

Configuration options are as in the readme:
./configure --enable-stubdom --with-extra-qemu-configure-args="--enable-spice --enable-libusb --enable-usb-redir" --with-xenstored=oxenstored --enable-systemd --enable-ovmf

I'm not sure why I can't get usb passthrough to work, I kinda need it to work, else I'll have to switch to some other virtualization infrastructure :( I'm hoping it's just something simple, and that ya'll will be able to point it out to me.

Thanks!



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.