[SOLVED] cannot passthrough usb device


Recommended Posts

My lsusb result is as follows :

Bus 003 Device 003: ID 058f:6387 Alcor Micro Corp. Flash Drive

Bus 003 Device 002: ID 046d:c31c Logitech, Inc. Keyboard K120 for Business

Bus 003 Device 004: ID 413c:2501 Dell Computer Corp.

Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

 

I tried adding

    <hostdev mode='subsystem' type='usb'>

      <source>

        <vendor id='0x413c'/>

        <product id='0x2501'/>

      </source>

    </hostdev>

Edit : The entry disappear as soon as saved it.

Scenario 2 :

I tried creating a new vm and add any usb device and i get

"Error: internal error: cannot parse vendor id 0x 003 Devi"

 

At the moment the kvm runs but i have no usb devices attached to it, thus no means of control.

I have gigabyte h87n-wifi motherboard.

According to the manual i have 6 x usb 3.0 and 4 x usb 2.0/1.1 ports. However when i tried all the ports at the back, it all connects to bus 3. I find this strange indeed. Hence i cannot do usb passthrough even if i wanted to.

I would appreciate some workarounds. Thanks

 

Link to comment

Anyway this is my xml

<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>

  <name>windows81nvidia</name>

  <uuid>cc411d70-4463-4db7-bf36-d364c0cdaa8b</uuid>

  <memory unit='KiB'>4194304</memory>

  <currentMemory unit='KiB'>3906252</currentMemory>

  <vcpu placement='static'>2</vcpu>

  <resource>

    <partition>/machine</partition>

  </resource>

  <os>

    <type arch='x86_64' machine='pc-q35-2.1'>hvm</type>

    <loader>/usr/share/qemu/bios-256k.bin</loader>

    <boot dev='hd'/>

    <bootmenu enable='yes'/>

  </os>

  <features>

    <acpi/>

    <apic/>

    <pae/>

    <kvm>

      <hidden state='on'/>

    </kvm>

  </features>

  <cpu mode='host-passthrough'>

  </cpu>

  <clock offset='localtime'>

    <timer name='rtc' tickpolicy='catchup'/>

    <timer name='pit' tickpolicy='delay'/>

    <timer name='hpet' present='yes'/>

  </clock>

  <on_poweroff>destroy</on_poweroff>

  <on_reboot>restart</on_reboot>

  <on_crash>destroy</on_crash>

  <pm>

    <suspend-to-mem enabled='no'/>

    <suspend-to-disk enabled='no'/>

  </pm>

  <devices>

    <emulator>/usr/bin/qemu-system-x86_64</emulator>

    <disk type='file' device='disk'>

      <driver name='qemu' type='qcow2' cache='none' io='native'/>

      <source file='/mnt/disk1/vm_images/win81nvidia.qcow2'/>

      <target dev='hda' bus='virtio'/>

      <address type='pci' domain='0x0000' bus='0x02' slot='0x04' function='0x0'/>

    </disk>

    <disk type='file' device='cdrom'>

      <driver name='qemu' type='raw'/>

      <source file='/mnt/disk1/vm_images/installer/Windows8.1.iso'/>

      <target dev='hda' bus='sata'/>

      <readonly/>

      <address type='drive' controller='0' bus='0' target='0' unit='0'/>

    </disk>

    <disk type='file' device='cdrom'>

      <driver name='qemu' type='raw'/>

      <source file='/mnt/disk1/vm_images/installer/virtio-win-0.1-100.iso'/>

      <target dev='hdd' bus='sata'/>

      <readonly/>

      <address type='drive' controller='0' bus='0' target='0' unit='3'/>

    </disk>

    <controller type='pci' index='0' model='pcie-root'/>

    <controller type='pci' index='1' model='dmi-to-pci-bridge'>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/>

    </controller>

    <controller type='pci' index='2' model='pci-bridge'>

      <address type='pci' domain='0x0000' bus='0x01' slot='0x01' function='0x0'/>

    </controller>

    <controller type='sata' index='0'>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>

    </controller>

    <controller type='virtio-serial' index='0'>

      <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x0'/>

    </controller>

    <controller type='usb' index='0' model='ich9-ehci1'>

      <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x7'/>

    </controller>

    <controller type='usb' index='0' model='ich9-uhci1'>

      <master startport='0'/>

      <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x0' multifunction='on'/>

    </controller>

    <controller type='usb' index='0' model='ich9-uhci2'>

      <master startport='2'/>

      <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x1'/>

    </controller>

    <controller type='usb' index='0' model='ich9-uhci3'>

      <master startport='4'/>

      <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x2'/>

    </controller>

    <interface type='bridge'>

      <mac address='52:54:00:46:29:be'/>

      <source bridge='br0'/>

      <model type='virtio'/>

      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/>

    </interface>

    <memballoon model='virtio'>

      <address type='pci' domain='0x0000' bus='0x02' slot='0x05' function='0x0'/>

    </memballoon>

  </devices>

  <qemu:commandline>

    <qemu:arg value='-device'/>

    <qemu:arg value='ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1'/>

    <qemu:arg value='-device'/>

    <qemu:arg value='vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on'/>

    <qemu:arg value='-device'/>

    <qemu:arg value='vfio-pci,host=01:00.1,bus=pcie.0'/>

  </qemu:commandline>

</domain>

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.