USB devices with same vendor:product id

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

 



Hi,

We have a VM with several USB devices attached. Everything works well, but sometimes, after a reboot of the host, some usb device get a different bus/device number and that prevent the reboot of the VM :

-------
error: Failed to start domain xxx
error: internal error: Did not find USB device 04b9:0300 bus:1 device:5
-------

I guess this is because we have multiple usb devices with the same vendor/product ID :

-------
    <hostdev mode='subsystem' type='usb' managed='yes'>
      <source>
        <vendor id='0x04b9'/>
        <product id='0x0300'/>
        <address bus='2' device='4'/>
      </source>
      <alias name='hostdev0'/>
      <address type='usb' bus='0' port='2'/>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='yes'>
      <source>
        <vendor id='0x0529'/>
        <product id='0x0001'/>
        <address bus='1' device='7'/>
      </source>
      <alias name='hostdev1'/>
      <address type='usb' bus='0' port='1.2'/>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='yes'>
      <source>
        <vendor id='0x0529'/>
        <product id='0x0001'/>
        <address bus='2' device='3'/>
      </source>
      <alias name='hostdev2'/>
      <address type='usb' bus='0' port='1.4'/>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='yes'>
      <source>
        <vendor id='0x04b9'/>
        <product id='0x0300'/>
        <address bus='1' device='6'/>
      </source>
      <alias name='hostdev3'/>
      <address type='usb' bus='0' port='1.1'/>
    </hostdev>
-------

Any idea on how to handle this case ?

We were thinking about using udev, but it seems that libvirt only supports vendor/id (not unique in our case) and bus/device (not predictable) to identify usb devices.

Thanks,

Maxime Accadia

P.S. We use libvirt 4.0.0 on Ubuntu 18.04






[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux