USB device not showing up in windows VM


d.bech

Recommended Posts

C0o0o0o0o0L...

 

So this device (a USB condencer mic) was working fine up until today. Nothing has changed that I am aware of but currently windows won't recognise it. Nothing in audio devices, nothing in device manager.

 

Unraid is see it fine.

 

Bus 001 Device 024: ID 17a0:0303 Samson Technologies Corp. C01U Pro condenser microphone

 

And I have passed it through.

 

<hostdev mode='subsystem' type='usb' managed='yes'>
      <source>
        <vendor id='0x17a0'/>
        <product id='0x0303'/>
        <address bus='1' device='23'/>
      </source>
      <alias name='hostdev0'/>
</hostdev>

 

I've tried it in another PC and it shows up and functions as normal.

 

I've tried moving it around to other USB ports that I know are working with other devices

 

I've tried with the VMs USB controller in nec-xhci mode and in the default mode.

 

I'm really at a loss for what to do, this device has had some trouble showing up in this VM in the past but a reboot of the VM has always gotten it back

 

full XML

 

<domain type='kvm' id='8' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  <name>Windows 10</name>
  <uuid>fc8280c4-7269-a6dd-ebdf-41fd12e5cf5e</uuid>
  <description>Windows 10 64bit</description>
  <metadata>
    <vmtemplate name="Custom" icon="windows.png" os="windows"/>
  </metadata>
  <memory unit='KiB'>8388608</memory>
  <currentMemory unit='KiB'>8388608</currentMemory>
  <memoryBacking>
    <nosharepages/>
    <locked/>
  </memoryBacking>
  <vcpu placement='static'>4</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='0'/>
    <vcpupin vcpu='1' cpuset='1'/>
    <vcpupin vcpu='2' cpuset='2'/>
    <vcpupin vcpu='3' cpuset='3'/>
  </cputune>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64' machine='pc-i440fx-2.3'>hvm</type>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cpu mode='host-passthrough'>
    <topology sockets='1' cores='4' threads='1'/>
  </cpu>
  <clock offset='localtime'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/user/boot/Windows 10/vdisk1.img'/>
      <backingStore/>
      <target dev='hdb' bus='virtio'/>
      <boot order='1'/>
      <alias name='virtio-disk1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </disk>
    <controller type='usb' index='0' model='nec-xhci'>
      <alias name='usb'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'>
      <alias name='pci.0'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <alias name='virtio-serial0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:ce:26:89'/>
      <source bridge='br0'/>
      <target dev='vnet0'/>
      <model type='virtio'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </interface>
    <serial type='pty'>
      <source path='/dev/pts/0'/>
      <target port='0'/>
      <alias name='serial0'/>
    </serial>
    <console type='pty' tty='/dev/pts/0'>
      <source path='/dev/pts/0'/>
      <target type='serial' port='0'/>
      <alias name='serial0'/>
    </console>
    <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/Windows 10.org.qemu.guest_agent.0'/>
      <target type='virtio' name='org.qemu.guest_agent.0' state='disconnected'/>
      <alias name='channel0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <hostdev mode='subsystem' type='usb' managed='yes'>
      <source>
        <vendor id='0x17a0'/>
        <product id='0x0303'/>
        <address bus='1' device='23'/>
      </source>
      <alias name='hostdev0'/>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='yes'>
      <source>
        <vendor id='0x045e'/>
        <product id='0x02e6'/>
        <address bus='1' device='19'/>
      </source>
      <alias name='hostdev1'/>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='yes'>
      <source>
        <vendor id='0x046d'/>
        <product id='0xc52b'/>
        <address bus='1' device='20'/>
      </source>
      <alias name='hostdev2'/>
    </hostdev>
    <memballoon model='virtio'>
      <alias name='balloon0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </memballoon>
  </devices>
  <qemu:commandline>
    <qemu:arg value='-device'/>
    <qemu:arg value='ioh3420,bus=pci.0,addr=1c.0,multifunction=on,port=2,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=00:1b.0,bus=root.1,addr=01.0'/>
  </qemu:commandline>
</domain>

 

unraid-diagnostics-20160206-1733.zip

Link to comment

It's because in the lsusb output you posted it's device 24 and in your pass through tag it's device 23  ;)

Rebooting probably made it device 23 again.

 

huh so it was. Before booting the VM though the XML is just vedor and product ids so it was picking the wrong device number somehow?

Link to comment

It's because in the lsusb output you posted it's device 24 and in your pass through tag it's device 23  ;)

Rebooting probably made it device 23 again.

 

huh so it was. Before booting the VM though the XML is just vedor and product ids so it was picking the wrong device number somehow?

I thought you had put in the device id, but I guess you copied the tag while the VM was running?

Somehow your usb device got disconnected and connected again, giving it a new device id.

Link to comment

It's because in the lsusb output you posted it's device 24 and in your pass through tag it's device 23  ;)

Rebooting probably made it device 23 again.

 

huh so it was. Before booting the VM though the XML is just vedor and product ids so it was picking the wrong device number somehow?

I thought you had put in the device id, but I guess you copied the tag while the VM was running?

Somehow your usb device got disconnected and connected again, giving it a new device id.

 

Yea copied while it was running. Must have, it seems to do that oftenish. I do experience the lights on some devices flicer during the VMs boot. maybe they all get dissconnected and reconnected then and just that device is lucky enough to get a new number

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.