2

I have 3 modems with the same Vendor ID and Product ID (12d1:1001). I need to set up a USB device forwarding to guest system (Ubuntu).

This is what I have in my virtual machine's config:

<hostdev mode='subsystem' type='usb' managed='no'>
    <source>
        <vendor id='0x12d1'/>
        <product id='0x1001'/>
        <address bus='1' device='13'/>
    </source>
</hostdev>
<hostdev mode='subsystem' type='usb' managed='no'>
   <source>
       <vendor id='0x12d1'/>
       <product id='0x1001'/>
       <address bus='1' device='14'/>
   </source>
</hostdev>
<hostdev mode='subsystem' type='usb' managed='no'>
   <source>
      <vendor id='0x12d1'/>
      <product id='0x1001'/>
      <address bus='1' device='15'/>
   </source>
</hostdev>

It works fine until the system is rebooted because of a Device ID (i. e. Device 013 part) is changed. My question is how to bind these devices to a virtual machine NOT using Device ID part? This is my lsusb:

root@host:~# lsusb
Bus 001 Device 006: ID 046b:ff10 American Megatrends, Inc. Virtual Keyboard and Mouse
Bus 001 Device 004: ID 046b:ff01 American Megatrends, Inc. 
Bus 001 Device 014: ID 12d1:1001 Huawei Technologies Co., Ltd. E169/E620/E800 HSDPA Modem
Bus 001 Device 015: ID 12d1:1001 Huawei Technologies Co., Ltd. E169/E620/E800 HSDPA Modem
Bus 001 Device 013: ID 12d1:1001 Huawei Technologies Co., Ltd. E169/E620/E800 HSDPA Modem
Bus 001 Device 012: ID 050d:0237 Belkin Components F5U237 USB 2.0 7-Port Hub
Bus 001 Device 011: ID 050d:0237 Belkin Components F5U237 USB 2.0 7-Port Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 04d9:1400 Holtek Semiconductor, Inc. PS/2 keyboard + mouse controller
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Thank you very much for any answer!

1

Qemu itself supports the passthrough of devices by physical ports. You can ind out which address the second port on your front panel has and tell qemu to forward every device without touching the driver to the VM. But this function is not supported in libvirt until now. It is also not supported as a qemu-consol command from virsh.

An Other possibility would be to pass a PCI-Card to the VM, where the device is attached to. So transferring two PCI Cards to the machine will make a difference. Most of the time it is impossible to transfer the control of on motherboards monted USB-Devices. They are all in one PCI-Group together with other mandatory devices for the Host system. Only devices of a group can be transferred together.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.