Mailing List Archive

USB on DomU
Dear Xen Community,

I have recently created an Ubuntu 16.04 Guest DomU which seems to run
okay but I’m struggling for it to see USBs.

On my host Dom0 system, a ‘lsusb’ shows my device as..
Bus 002 Device 005: ID 058f:6387 Alcor Micro Corp. Flash Drive

In my config file I use the settings…

usbctrl=[ 'type=auto,version=2' ]
usbdev=[ 'hostbus=2,hostaddr=5' ]

As I issue the xl create command, the USB mounted on Dom0 is unmounted
(I don’t know if this is expected) and my DomU seems to start ok.
However, when I do an ‘lsusb’ I can’t see it when in my DomU.
On Dom0 (ID=3), if I issue the following command, it seems like it has
worked.
root@Dell-e6400-2:~# xl usb-list 3
Devid Type BE state usb-ver ports
0 qusb 0 1 2 8
Port 1: Bus 002 Device 005
Port 2:
Port 3:
Port 4:
Port 5:
Port 6:
Port 7:
Port 8:

Am I missing a further step to see the USB device in my DomU?

Thank you for any insights that anyone may have.

Martin...
Re: USB on DomU [ In reply to ]
On 2020-06-18 11:46, Martin Hargreaves wrote:
> Dear Xen Community,
>
> I have recently created an Ubuntu 16.04 Guest DomU which seems to run
> okay but I’m struggling for it to see USBs.

If your VM is not HVM, it needs the PVUSB drivers, which I only know of
from here: https://github.com/jgross1/linux/tree/pvusb

I got it from here:
https://lists.xenproject.org/archives/html/xen-users/2019-08/msg00013.html

I don't know if those drivers are updated more often. I haven't gotten
around to using them yet, other things keep getting in the way.

An HVM VM should do USB passthrough natively, and not need any PV
drivers.

>
> On my host Dom0 system, a ‘lsusb’ shows my device as..
> Bus 002 Device 005: ID 058f:6387 Alcor Micro Corp. Flash Drive
>
> In my config file I use the settings…
>
> usbctrl=[ 'type=auto,version=2' ]
> usbdev=[ 'hostbus=2,hostaddr=5' ]
>
> As I issue the xl create command, the USB mounted on Dom0 is unmounted
> (I don’t know if this is expected) and my DomU seems to start ok.
> However, when I do an ‘lsusb’ I can’t see it when in my DomU.
> On Dom0 (ID=3), if I issue the following command, it seems like it has
> worked.
> root@Dell-e6400-2:~# xl usb-list 3
> Devid Type BE state usb-ver ports
> 0 qusb 0 1 2 8
> Port 1: Bus 002 Device 005
> Port 2:
> Port 3:
> Port 4:
> Port 5:
> Port 6:
> Port 7:
> Port 8:
>
> Am I missing a further step to see the USB device in my DomU?
>
> Thank you for any insights that anyone may have.
>
> Martin...