Jump to content
archedraft

***GUIDE*** Passthrough Entire PCI USB Controller

509 posts in this topic Last Reply

Recommended Posts

So I was able to sucessfully get a USB controller to show up in the VM pass through tab through Linus' method in this video.

 

 

I can pass any one usb controller through at a time (except for the one unraid is running on for obvious reasons).

 

However, I cannot seem to find a way to pass through multiple PCIE/ USB devices/ controllers at once.

 

I am trying to pass through all USB controllers that aren't being used by unraid, a SATA III PCIe controller (so that I can plug drives directly into windows, and a WiFi card (for when I am using my desktop without a wired network interface to unraid (I'm in college so the network is weird and I don't want to give everyone access to my server)

 

Can you please guide me in the right direction to get this to work.

 

Completely different question: is there a way to just transfer/ clone my current windows install so that I dont have to re-download everything???

 

You use the same method as for the usb controller shown in linus method. You find the vendor/product id and add it after the one you allready have in the syslinux.cfg. Seperate them with a comma.

Share this post


Link to post

Still having issues with USB passthrough -- everything was fine for 17 days but for reasons I can't figure out my VM suddenly changed to a strange IP (something that has happened before) resulting in lost connectivity and the only way to fix it is to reboot the unRaid machine.

 

When I reboot the unRaid the USB passthough does not work. I reboot unRaid a couple of time and edit the XML even though I'm not making any changes and suddenly after a few reboots it starts to work again.

 

This is my entire XML file

 

<domain type='kvm' id='4' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  <name>KP-Ofiice</name>
  <uuid>53662b7a-d29a-63aa-f802-ca9321149187</uuid>
  <description>KP's Main Work Computer</description>
  <metadata>
    <vmtemplate name="Custom" icon="windows.png" os="windows"/>
  </metadata>
  <memory unit='KiB'>51380224</memory>
  <currentMemory unit='KiB'>51380224</currentMemory>
  <memoryBacking>
    <nosharepages/>
    <locked/>
  </memoryBacking>
  <vcpu placement='static'>10</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='15'/>
    <vcpupin vcpu='1' cpuset='16'/>
    <vcpupin vcpu='2' cpuset='17'/>
    <vcpupin vcpu='3' cpuset='18'/>
    <vcpupin vcpu='4' cpuset='19'/>
    <vcpupin vcpu='5' cpuset='27'/>
    <vcpupin vcpu='6' cpuset='28'/>
    <vcpupin vcpu='7' cpuset='29'/>
    <vcpupin vcpu='8' cpuset='30'/>
    <vcpupin vcpu='9' cpuset='31'/>
    <emulatorpin cpuset='0,16'/>
  </cputune>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64' machine='pc-i440fx-2.3'>hvm</type>
  </os>
  <features>
    <acpi/>
    <apic/>
    <hyperv>
      <relaxed state='on'/>
      <vapic state='on'/>
      <spinlocks state='on' retries='8191'/>
    </hyperv>
  </features>
  <cpu mode='host-passthrough'>
    <topology sockets='1' cores='10' threads='1'/>
  </cpu>
  <clock offset='localtime'>
    <timer name='hypervclock' present='yes'/>
    <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/cache/VMs/KP-Ofiice/vdisk1.img'/>
      <backingStore/>
      <target dev='hdc' bus='virtio'/>
      <boot order='1'/>
      <alias name='virtio-disk2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </disk>
    <controller type='usb' index='0'>
      <alias name='usb'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    </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:1a:35:d9'/>
      <source bridge='br0'/>
      <target dev='vnet3'/>
      <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/3'/>
      <target port='0'/>
      <alias name='serial0'/>
    </serial>
    <console type='pty' tty='/dev/pts/3'>
      <source path='/dev/pts/3'/>
      <target type='serial' port='0'/>
      <alias name='serial0'/>
    </console>
    <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/KP-Ofiice.org.qemu.guest_agent.0'/>
      <target type='virtio' name='org.qemu.guest_agent.0' state='connected'/>
      <alias name='channel0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
      </source>
      <alias name='hostdev0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </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=05: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.0,bus=root.1,addr=01.0'/>
  </qemu:commandline>
</domain>

 

This is my syslinux

 

default /syslinux/menu.c32
menu title Lime Technology
prompt 0
timeout 50
label unRAID OS
  menu default
  kernel /bzimage
  append initrd=/bzroot
  append pci-stub.ids=2109:0812 isolcpus=11,12,13,14,15,27,28,29,30,31 initrd=/bzroot
label unRAID OS Safe Mode (no plugins)
  kernel /bzimage
  append initrd=/bzroot unraidsafemode
label Memtest86+
  kernel /memtest

 

This is the relevant PCI Devices

 

01:00.0 Audio device: Creative Labs SB Recon3D (rev 01)
04:00.0 USB controller: ASMedia Technology Inc. Device 1242
05:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Turks XT [Radeon HD 6670/7670]

 

I don't think I am doing anything wrong but obviously I must be.

Share this post


Link to post

It could be that your usb controller isnt being released after the vm issue. So when you restart the vm it is not being passed through. Sometimes you have to fully powerdown to release hardware so this could be why it took you a few reboots to get it back .

 

So you are stubbing the usb card and passing it through using the host dev method. You could try the qemu:arg method instead if you continue to have problems. That is the method i have used in the past with great sucess. But i am by no means an expert.

 

Just one thing not related to usb problem. when i was looking at your xml. I see you are isolating cpus in your syslinux

 

append pci-stub.ids=2109:0812 isolcpus=11,12,13,14,15,27,28,29,30,31 initrd=/bzroot

 

but your xml you pin

 <cputune>
    <vcpupin vcpu='0' cpuset='15'/>
    <vcpupin vcpu='1' cpuset='16'/>
    <vcpupin vcpu='2' cpuset='17'/>
    <vcpupin vcpu='3' cpuset='18'/>
    <vcpupin vcpu='4' cpuset='19'/>
    <vcpupin vcpu='5' cpuset='27'/>
    <vcpupin vcpu='6' cpuset='28'/>
    <vcpupin vcpu='7' cpuset='29'/>
    <vcpupin vcpu='8' cpuset='30'/>
    <vcpupin vcpu='9' cpuset='31'/>
    <emulatorpin cpuset='0,16'/>
  </cputune>

 

should be

 

 <cputune>
    <vcpupin vcpu='0' cpuset='11'/>
    <vcpupin vcpu='1' cpuset='12'/>
    <vcpupin vcpu='2' cpuset='13'/>
    <vcpupin vcpu='3' cpuset='14'/>
    <vcpupin vcpu='4' cpuset='15'/>
    <vcpupin vcpu='5' cpuset='27'/>
    <vcpupin vcpu='6' cpuset='28'/>
    <vcpupin vcpu='7' cpuset='29'/>
    <vcpupin vcpu='8' cpuset='30'/>
    <vcpupin vcpu='9' cpuset='31'/>
    <emulatorpin cpuset='0,16'/>
  </cputune>

 

to match the isocpu you defined in the syslinux

 

 

 

Share this post


Link to post

Thanks. I have no idea how that happened with the wrong CPUs -- obviously they are supposed to match. Will fix that.

Share this post


Link to post

Changing the XML required a shutdown of the VM -- problem with the passthrough appeared. Shutdown unRaid and then restarted didn't help. Second reboot and all was fine. I'll have to try the qemu:arg method because even though this isn't a VM I reboot often having to shut down the entire unRaid system every time I do and reboot it multiple times is not ideal.

Share this post


Link to post

Is it possible to hide multiple PCI USB controllers from the host that have the same product/vendor ID?

 

lspci -n gives me:

06:00.0 0c03: 104c:8241 (rev 02)
07:00.0 0c03: 104c:8241 (rev 02)

 

I've added this to syslinux.cfg:

pci-stub.ids=104c:8241

 

However, one of the cards is still visible. Am I supposed to add the same again using:

pci-stub.ids=104c:8241,104c:8241

?

Share this post


Link to post

Is it possible to hide multiple PCI USB controllers from the host that have the same product/vendor ID?

 

lspci -n gives me:

06:00.0 0c03: 104c:8241 (rev 02)
07:00.0 0c03: 104c:8241 (rev 02)

 

I've added this to syslinux.cfg:

pci-stub.ids=104c:8241

 

However, one of the cards is still visible. Am I supposed to add the same again using:

pci-stub.ids=104c:8241,104c:8241

?

 

You could try to use the below instead. The drawback is that you have to configure the pass through in the XML manually and can't choose it in the VM Template if you're on 6.2RC.

 

xen-pciback.hide=(06:00.0)(07:00.0)

Share this post


Link to post

Intent:

This guide will take you through the process of passing through an entire PCI USB Controller instead of doing it individually. One benefit is that USB will be plug n play on your virtual machines. Also, I have found that if you pass through USB devices separately the device name could change which will cause the VM to not start, but if you pass through the entire controller you will avoid this.

 

 

 

hi archedraft,

is it possible that i see 4 usb controllers on a gigabyte ga-z97x-ud3h, but when i try all the usb ports, lsusb says that my usb device is on controller 003 all the times? (also my unraid usb is on controller 003)

 

00:00.0 Host bridge: Intel Corporation 4th Gen Core Processor DRAM Controller (rev 06)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller (rev 06)
00:01.1 PCI bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x8 Controller (rev 06)
00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller (rev 06)
00:03.0 Audio device: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller (rev 06)
00:14.0 USB controller: Intel Corporation 9 Series Chipset Family USB xHCI Controller
00:16.0 Communication controller: Intel Corporation 9 Series Chipset Family ME Interface #1
00:19.0 Ethernet controller: Intel Corporation Ethernet Connection I217-V
00:1a.0 USB controller: Intel Corporation 9 Series Chipset Family USB EHCI Controller #2
00:1b.0 Audio device: Intel Corporation 9 Series Chipset Family HD Audio Controller
00:1c.0 PCI bridge: Intel Corporation 9 Series Chipset Family PCI Express Root Port 1 (rev d0)
00:1c.3 PCI bridge: Intel Corporation 9 Series Chipset Family PCI Express Root Port 4 (rev d0)
00:1d.0 USB controller: Intel Corporation 9 Series Chipset Family USB EHCI Controller #1
00:1f.0 ISA bridge: Intel Corporation 9 Series Chipset Family Z97 LPC Controller
00:1f.2 SATA controller: Intel Corporation 9 Series Chipset Family SATA Controller [AHCI Mode]
00:1f.3 SMBus: Intel Corporation 9 Series Chipset Family SMBus Controller
01:00.0 VGA compatible controller: NVIDIA Corporation GF110 [GeForce GTX 570] (rev a1)
01:00.1 Audio device: NVIDIA Corporation GF110 High Definition Audio Controller (rev a1)
02:00.0 VGA compatible controller: NVIDIA Corporation G92 [GeForce GT 230 OEM] (rev a2)
04:00.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 41)

 

Bus 002 Device 002: ID 8087:8001 Intel Corp.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8009 Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 004: ID 093a:2510 Pixart Imaging, Inc. Optical Mouse
Bus 003 Device 003: ID 04ca:002f Lite-On Technology Corp.
Bus 003 Device 006: ID 045e:0748 Microsoft Corp.
Bus 003 Device 005: ID 1043:8012 iCreate Technologies Corp. Flash Disk 256 MB
Bus 003 Device 002: ID 058f:6387 Alcor Micro Corp. Flash Drive
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

 

the only devicesi have connected are the last 6 on bus 003, what are all others Linux Foundation 3.0 root hub and Intel Corp. devices?

 

thanks for help

Share this post


Link to post

I was passing a entire USB card through and it wasn't perfect (reboot would make it stop working until I rebooted entire unRaid twice) but now even with that annoying issue it just won't work since I upgraded to 6.2.

 

Is there anything different about how to do this for 6.2?

 

04:00.0 USB controller [0c03]: ASMedia Technology Inc. ASM1142 USB 3.1 Host Controller [1b21:1242]

 

default /syslinux/menu.c32
menu title Lime Technology
prompt 0
timeout 50
label unRAID OS
  menu default
  kernel /bzimage
  append initrd=/bzroot
  append pci-stub.ids=2109:0812 isolcpus=11,12,13,14,15,27,28,29,30,31 initrd=/bzroot
label unRAID OS GUI Mode
  kernel /bzimage
  append initrd=/bzroot,/bzroot-gui
label unRAID OS Safe Mode (no plugins, no GUI)
  kernel /bzimage
  append initrd=/bzroot unraidsafemode
label Memtest86+
  kernel /memtest

 

<devices>
    <emulator>/usr/local/sbin/qemu</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/cache/VMs/KP-Ofiice/vdisk1.img'/>
      <backingStore/>
      <target dev='hdc' bus='virtio'/>
      <boot order='1'/>
      <alias name='virtio-disk2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </disk>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <alias name='usb'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <alias name='usb'/>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0' multifunction='on'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <alias name='usb'/>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <alias name='usb'/>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x2'/>
    </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:1a:35:d9'/>
      <source bridge='br0'/>
      <target dev='vnet3'/>
      <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/3'/>
      <target port='0'/>
      <alias name='serial0'/>
    </serial>
    <console type='pty' tty='/dev/pts/3'>
      <source path='/dev/pts/3'/>
      <target type='serial' port='0'/>
      <alias name='serial0'/>
    </console>
    <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/domain-KP-Ofiice/org.qemu.guest_agent.0'/>
      <target type='virtio' name='org.qemu.guest_agent.0' state='connected'/>
      <alias name='channel0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <hostdev mode='subsystem' type='pci' managed='yes' xvga='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
      </source>
      <alias name='hostdev0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
      </source>
      <alias name='hostdev1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
      </source>
      <alias name='hostdev2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
    </hostdev>
    <memballoon model='virtio'>
      <alias name='balloon0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
    </memballoon>
  </devices>
</domain>

 

I've tried having the unRaid editor pass through the USB card and I've tried adding it manually by coping the hostdev from my pre-upgrade XML file. Neither works.

 

I upgraded to 6.2 and since I was at it I took the opportunity to upgrade Windows 10 to anniversary update and now the passthrough just won't work and I'm also getting stuck on the bios text 20-30% of the time.

Share this post


Link to post

I'm setting up unraid for the first time so this is my first time of passig trough. Before I try and fail, can someone claify this for me:

I do not have any addition PCI USB Card yet, only onboard. So lspci | grep USB gives me only one device.

 

However, I do have two buses on that controller - every 3.0 onboard usb on the back is on bus 001 and so is the front 3.0 port.

 

Bus 002 is the internal 2.0 header. I used a header to female usb cable and im running the unraid stick from there to have it inside the case, so Unraid runs from bus 002.

 

 

 

So am I good with just one controller by only passing trough Bus 001, or do I have to pass trough the whole controller and therefor need to get a PCI Card, since I only have one onboard ?

 

Im asking because the tutorial gives me the impression that I can just pass trough bus 001, but the thread name implies it has to be the whole controller.

 

Thanks for the tutorial and any answer !

 

Edit: Guess I'll need a pcie card...oh well

 

 

Share this post


Link to post

I'm setting up unraid for the first time so this is my first time of passig trough. Before I try and fail, can someone claify this for me:

I do not have any addition PCI USB Card yet, only onboard. So lspci | grep USB gives me only one device.

 

However, I do have two buses on that controller - every 3.0 onboard usb on the back is on bus 001 and so is the front 3.0 port.

 

Bus 002 is the internal 2.0 header. I used a header to female usb cable and im running the unraid stick from there to have it inside the case, so Unraid runs from bus 002.

 

 

 

So am I good with just one controller by only passing trough Bus 001, or do I have to pass trough the whole controller and therefor need to get a PCI Card, since I only have one onboard ?

 

Im asking because the tutorial gives me the impression that I can just pass trough bus 001, but the thread name implies it has to be the whole controller.

 

Thanks for the tutorial and any answer !

 

Edit: Guess I'll need a pcie card...oh well

 

I'm a noob myself but since no one has responded in a few days I'll do my best.

 

1) You can pass-through any USB device plugged in to a port but the device will not be hot-swapable.

 

2) You can pass-through an entire controller in which case the USB ports will function like normal USB ports on the VM. If your motherboard has two controllers then you can pass-through the one that the unRaid USB is not on -- there is a topic explaining how to do this. The whole thing seemed much more complicated than just passing-through an entire card so I went with that which is what this topic addresses.

 

3) There is a plugin (haven't tested it yet but people like it) that allows you to make individual USB ports hot-swapable,

 

Anyway that is the best I can offer -- I think it is correct but I'm pretty new at this myself.

Share this post


Link to post

Hey Guys,

 

I already passed through an usb controller before. That works fine for my Windows 10 VM. But everytime I pass through the whole controller for my Windows 7 VM all the devices on the controller turn off and don't turn on again (Usually when I start the win10 VM they also turn off/on once). I don't know why and would like to fix that. I use <hostdev> to pass through the controller.

Share this post


Link to post

Hey Guys,

 

I already passed through an usb controller before. That works fine for my Windows 10 VM. But everytime I pass through the whole controller for my Windows 7 VM all the devices on the controller turn off and don't turn on again (Usually when I start the win10 VM they also turn off/on once). I don't know why and would like to fix that. I use <hostdev> to pass through the controller.

 

It sounds like you should stub the USB controller so unraid doesn't use use it. The info on how to do this should be in the first post in the 6.2 announcement thread.

Share this post


Link to post

Hey Guys,

 

I already passed through an usb controller before. That works fine for my Windows 10 VM. But everytime I pass through the whole controller for my Windows 7 VM all the devices on the controller turn off and don't turn on again (Usually when I start the win10 VM they also turn off/on once). I don't know why and would like to fix that. I use <hostdev> to pass through the controller.

 

It sounds like you should stub the USB controller so unraid doesn't use use it. The info on how to do this should be in the first post in the 6.2 announcement thread.

 

Tried that but it didn't change anything. As soon as I turn on the VM the devices on the controller don't work anymore. The lights on mouse/keyboard turn off, but not on my sound card. Tried to switch ports on the controller, but the devices don't work, but since the lights don't turn off the controller seems to be "on" atleast.

Share this post


Link to post

Hey Guys,

 

I already passed through an usb controller before. That works fine for my Windows 10 VM. But everytime I pass through the whole controller for my Windows 7 VM all the devices on the controller turn off and don't turn on again (Usually when I start the win10 VM they also turn off/on once). I don't know why and would like to fix that. I use <hostdev> to pass through the controller.

 

It sounds like you should stub the USB controller so unraid doesn't use use it. The info on how to do this should be in the first post in the 6.2 announcement thread.

 

Tried that but it didn't change anything. As soon as I turn on the VM the devices on the controller don't work anymore. The lights on mouse/keyboard turn off, but not on my sound card. Tried to switch ports on the controller, but the devices don't work, but since the lights don't turn off the controller seems to be "on" atleast.

 

Ok I was able to fix this by installing the USB controller's drivers, in my case VIA Labs drivers. I did this by connecting keyboard/mouse to another controller and accessing the vm with vnc so that I could use them. This was only necessary on Win7, that's why I was confused. Win10 included these drivers.

Share this post


Link to post

Hi, I'm giving up on this, can't figure out what I'm doing wrong.

I have a USB2 PCI 5 ports card that I want to passthrough to a windows 10 VM

 

Here's my server configuration, I have my Kingston Technology DataTraveler G4 flash drive pluged in one of the USB ports on the PCI

root@unraid:~# lspci | grep USB
00:1a.0 USB controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #4
00:1a.1 USB controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #5
00:1a.2 USB controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #6
00:1a.7 USB controller: Intel Corporation 82801JI (ICH10 Family) USB2 EHCI Controller #2
00:1d.0 USB controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #1
00:1d.1 USB controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #2
00:1d.2 USB controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #3
00:1d.7 USB controller: Intel Corporation 82801JI (ICH10 Family) USB2 EHCI Controller #1
08:04.0 USB controller: VIA Technologies, Inc. VT82xx/62xx UHCI USB 1.1 Controller (rev 61)
08:04.1 USB controller: VIA Technologies, Inc. VT82xx/62xx UHCI USB 1.1 Controller (rev 61)
08:04.2 USB controller: VIA Technologies, Inc. USB 2.0 (rev 63)
root@unraid:~# lsusb
Bus 003 Device 002: ID 0951:1666 Kingston Technology DataTraveler G4
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 011 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 010 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 009 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 002: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 0781:5406 SanDisk Corp. Cruzer Micro U3
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
root@unraid:~# readlink /sys/bus/usb/devices/usb3
../../../devices/pci0000:00/0000:00:1e.0/0000:08:04.2/usb3

 

Here's what I figured out to put in my xml

<hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x08' slot='0x04' function='0x2'/>
      </source>
    </hostdev>

 

And here's the error I get when I try to start the VM

Execution error

internal error: early end of file from monitor, possible problem: 2016-10-23T00:08:35.093062Z qemu-system-x86_64: -device vfio-pci,host=08:04.2,id=hostdev1,bus=pci.0,addr=0x8: vfio: error, group 11 is not viable, please ensure all devices within the iommu_group are bound to their vfio bus driver.
2016-10-23T00:08:35.093119Z qemu-system-x86_64: -device vfio-pci,host=08:04.2,id=hostdev1,bus=pci.0,addr=0x8: vfio: failed to get group 11
2016-10-23T00:08:35.093139Z qemu-system-x86_64: -device vfio-pci,host=08:04.2,id=hostdev1,bus=pci.0,addr=0x8: Device initialization failed

 

Please help me figure this out.

 

Thank you

Share this post


Link to post

Hi, I'm giving up on this, can't figure out what I'm doing wrong.

I have a USB2 PCI 5 ports card that I want to passthrough to a windows 10 VM

 

Here's my server configuration, I have my Kingston Technology DataTraveler G4 flash drive pluged in one of the USB ports on the PCI

root@unraid:~# lspci | grep USB
00:1a.0 USB controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #4
00:1a.1 USB controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #5
00:1a.2 USB controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #6
00:1a.7 USB controller: Intel Corporation 82801JI (ICH10 Family) USB2 EHCI Controller #2
00:1d.0 USB controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #1
00:1d.1 USB controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #2
00:1d.2 USB controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #3
00:1d.7 USB controller: Intel Corporation 82801JI (ICH10 Family) USB2 EHCI Controller #1
08:04.0 USB controller: VIA Technologies, Inc. VT82xx/62xx UHCI USB 1.1 Controller (rev 61)
08:04.1 USB controller: VIA Technologies, Inc. VT82xx/62xx UHCI USB 1.1 Controller (rev 61)
08:04.2 USB controller: VIA Technologies, Inc. USB 2.0 (rev 63)
root@unraid:~# lsusb
Bus 003 Device 002: ID 0951:1666 Kingston Technology DataTraveler G4
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 011 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 010 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 009 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 002: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 0781:5406 SanDisk Corp. Cruzer Micro U3
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
root@unraid:~# readlink /sys/bus/usb/devices/usb3
../../../devices/pci0000:00/0000:00:1e.0/0000:08:04.2/usb3

 

Here's what I figured out to put in my xml

<hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x08' slot='0x04' function='0x2'/>
      </source>
    </hostdev>

 

And here's the error I get when I try to start the VM

Execution error

internal error: early end of file from monitor, possible problem: 2016-10-23T00:08:35.093062Z qemu-system-x86_64: -device vfio-pci,host=08:04.2,id=hostdev1,bus=pci.0,addr=0x8: vfio: error, group 11 is not viable, please ensure all devices within the iommu_group are bound to their vfio bus driver.
2016-10-23T00:08:35.093119Z qemu-system-x86_64: -device vfio-pci,host=08:04.2,id=hostdev1,bus=pci.0,addr=0x8: vfio: failed to get group 11
2016-10-23T00:08:35.093139Z qemu-system-x86_64: -device vfio-pci,host=08:04.2,id=hostdev1,bus=pci.0,addr=0x8: Device initialization failed

 

Please help me figure this out.

 

Thank you

 

You are just trying to pass through one of the controllers of your USB card. Since they are all in the same iommu group (I guess), you need to pass through the other two also.

 

So make two more sections in the XML for 08:04.0 and 08:04.1 and it should work.

 

If you are running 6.2 you could stub the USB card and select it in the VM template instead. That way you do not loose any changes you have done manually to the XML if you want to edit the template using the edit mode.

Instructions for stubbing is in the 6.2 announcement thread.

Share this post


Link to post

Thank you so much saarg, that was part of the problem.

I've been able to passthrough only 2 of the 5 usb ports on the PCI card but that will do because I need only one to plug my usb hub on an extender cable.

 

Share this post


Link to post

I was looking for a little direction with USB pass-through to the virtual machine.  

 

I bought two of these USB PCI-E cards https://www.amazon.com/Anker%C2%AE-Uspeed-Express-20-pin-Connector/dp/B007SJGGAE/ref=sr_1_1?ie=UTF8&qid=1477500141&sr=8-1&keywords=anker+usb+pcie 

 

What I am experiencing is the following issues when the USB PCI-E card(s) are being pass to the VM(s)

 

1. When I pass-through one of the USB controllers to VM1, VM1 boots up and everything seems to work great. When I go to reboot VM1 from inside the VM (Windows) , 9 out of 10 times you get VM1 failing to reboot. It just gives you a black screen and then I have to use the web connection from my phone to the UNRAID server and use virtual machine manager to force shutdown the VM then boot it up again. 

 

1a. Shutting down VM1 then using the UNRAID virtual machine manager to boot it up works just fine. I am not experincing where I have to reboot the physical UNRAID server. 

 

1b. When I use the UNRAID virtual machine manager to reboot VM1, it will actuall reboot and come back up no problems. Just when you reboot it from Windows is when it fails to come back online. 

 

2. When I pass-through both USB controllers, one to VM1 and the other to VM2 I still experiencing the same issues as above but also the following. When both VM's are running and I reboot or shutdown VM1, VM2 will lockup and I have to force shut it down then bring it back online and visa versa.  

 

I have noticed that both devices have the same ID  

04:00.0 USB controller [0c03]: VIA Technologies, Inc. VL805 USB 3.0 Host Controller [1106:3483]  

06:00.0 USB controller [0c03]: VIA Technologies, Inc. VL805 USB 3.0 Host Controller [1106:3483] 

 

IOMMU Groups 

/sys/kernel/iommu_groups/30/devices/0000:04:00.0 

/sys/kernel/iommu_groups/32/devices/0000:06:00.0 

 

I have also tried the following ways to pass-through the USB controllers and they all pass-through using each method but all expirince the same issues as I mentioned above. 

 

1. Hostdev 

2. Qume 

3. Stubbing  

 

I am using WIndows 10 with machine type Q35-25 and OVMF BIOS and I have tried switching the machine type to i440fx-2.5 but does not help any. I cant recall if I tried the seaBIOS FYI. 

 

Thanks kindly for any help

Share this post


Link to post

Hi,

 

I have the Gigabyte GA-X99 SOC Force m/b.

 

On top of the X99 chipset USB controllers there are 2 x USB 3.0/2.0 controllers: Renesas uPD720210 Hub

Each Renesas controller provides 4 ports.

 

The PCI device list does not show these controllers (although they work, unraid detects connected devices and allows passing them to guests)

 

00:00.0 Host bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 DMI2 (rev 02)
00:01.0 PCI bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port 1 (rev 02)
00:02.0 PCI bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port 2 (rev 02)
00:03.0 PCI bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port 3 (rev 02)
00:03.2 PCI bridge: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCI Express Root Port 3 (rev 02)
00:05.0 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Address Map, VTd_Misc, System Management (rev 02)
00:05.1 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Hot Plug (rev 02)
00:05.2 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 RAS, Control Status and Global Errors (rev 02)
00:11.0 Unassigned class [ff00]: Intel Corporation C610/X99 series chipset SPSR (rev 05)
00:11.4 SATA controller: Intel Corporation C610/X99 series chipset sSATA Controller [AHCI mode] (rev 05)
00:14.0 USB controller: Intel Corporation C610/X99 series chipset USB xHCI Host Controller (rev 05)
00:16.0 Communication controller: Intel Corporation C610/X99 series chipset MEI Controller #1 (rev 05)
00:19.0 Ethernet controller: Intel Corporation Ethernet Connection (2) I218-V (rev 05)
00:1b.0 Audio device: Intel Corporation C610/X99 series chipset HD Audio Controller (rev 05)
00:1f.0 ISA bridge: Intel Corporation C610/X99 series chipset LPC Controller (rev 05)
00:1f.2 SATA controller: Intel Corporation C610/X99 series chipset 6-Port SATA Controller [AHCI mode] (rev 05)
00:1f.3 SMBus: Intel Corporation C610/X99 series chipset SMBus Controller (rev 05)
01:00.0 Serial Attached SCSI controller: LSI Logic / Symbios Logic SAS2008 PCI-Express Fusion-MPT SAS-2 [Falcon] (rev 03)
02:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Hawaii XT / Grenada XT [Radeon R9 290X/390X]
02:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Hawaii HDMI Audio
03:00.0 Serial Attached SCSI controller: LSI Logic / Symbios Logic SAS2008 PCI-Express Fusion-MPT SAS-2 [Falcon] (rev 03)
04:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Caicos [Radeon HD 6450/7450/8450 / R5 230 OEM]
04:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Caicos HDMI Audio [Radeon HD 6400 Series]
ff:0b.0 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 R3 QPI Link 0 & 1 Monitoring (rev 02)
ff:0b.1 Performance counters: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 R3 QPI Link 0 & 1 Monitoring (rev 02)
ff:0b.2 Performance counters: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 R3 QPI Link 0 & 1 Monitoring (rev 02)
ff:0c.0 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Unicast Registers (rev 02)
ff:0c.1 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Unicast Registers (rev 02)
ff:0c.2 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Unicast Registers (rev 02)
ff:0c.3 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Unicast Registers (rev 02)
ff:0c.4 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Unicast Registers (rev 02)
ff:0c.5 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Unicast Registers (rev 02)
ff:0f.0 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Buffered Ring Agent (rev 02)
ff:0f.1 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Buffered Ring Agent (rev 02)
ff:0f.4 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 System Address Decoder & Broadcast Registers (rev 02)
ff:0f.5 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 System Address Decoder & Broadcast Registers (rev 02)
ff:0f.6 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 System Address Decoder & Broadcast Registers (rev 02)
ff:10.0 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCIe Ring Interface (rev 02)
ff:10.1 Performance counters: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 PCIe Ring Interface (rev 02)
ff:10.5 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Scratchpad & Semaphore Registers (rev 02)
ff:10.6 Performance counters: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Scratchpad & Semaphore Registers (rev 02)
ff:10.7 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Scratchpad & Semaphore Registers (rev 02)
ff:12.0 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Home Agent 0 (rev 02)
ff:12.1 Performance counters: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Home Agent 0 (rev 02)
ff:13.0 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Integrated Memory Controller 0 Target Address, Thermal & RAS Registers (rev 02)
ff:13.1 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Integrated Memory Controller 0 Target Address, Thermal & RAS Registers (rev 02)
ff:13.2 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Integrated Memory Controller 0 Channel Target Address Decoder (rev 02)
ff:13.3 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Integrated Memory Controller 0 Channel Target Address Decoder (rev 02)
ff:13.4 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Integrated Memory Controller 0 Channel Target Address Decoder (rev 02)
ff:13.5 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Integrated Memory Controller 0 Channel Target Address Decoder (rev 02)
ff:13.6 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 DDRIO Channel 0/1 Broadcast (rev 02)
ff:13.7 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 DDRIO Global Broadcast (rev 02)
ff:14.0 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Integrated Memory Controller 0 Channel 0 Thermal Control (rev 02)
ff:14.1 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Integrated Memory Controller 0 Channel 1 Thermal Control (rev 02)
ff:14.2 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Integrated Memory Controller 0 Channel 0 ERROR Registers (rev 02)
ff:14.3 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Integrated Memory Controller 0 Channel 1 ERROR Registers (rev 02)
ff:14.4 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 DDRIO (VMSE) 0 & 1 (rev 02)
ff:14.5 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 DDRIO (VMSE) 0 & 1 (rev 02)
ff:14.6 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 DDRIO (VMSE) 0 & 1 (rev 02)
ff:14.7 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 DDRIO (VMSE) 0 & 1 (rev 02)
ff:15.0 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Integrated Memory Controller 0 Channel 2 Thermal Control (rev 02)
ff:15.1 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Integrated Memory Controller 0 Channel 3 Thermal Control (rev 02)
ff:15.2 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Integrated Memory Controller 0 Channel 2 ERROR Registers (rev 02)
ff:15.3 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Integrated Memory Controller 0 Channel 3 ERROR Registers (rev 02)
ff:16.0 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Integrated Memory Controller 1 Target Address, Thermal & RAS Registers (rev 02)
ff:16.6 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 DDRIO Channel 2/3 Broadcast (rev 02)
ff:16.7 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 DDRIO Global Broadcast (rev 02)
ff:17.0 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Integrated Memory Controller 1 Channel 0 Thermal Control (rev 02)
ff:17.4 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 DDRIO (VMSE) 2 & 3 (rev 02)
ff:17.5 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 DDRIO (VMSE) 2 & 3 (rev 02)
ff:17.6 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 DDRIO (VMSE) 2 & 3 (rev 02)
ff:17.7 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 DDRIO (VMSE) 2 & 3 (rev 02)
ff:1e.0 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Power Control Unit (rev 02)
ff:1e.1 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Power Control Unit (rev 02)
ff:1e.2 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Power Control Unit (rev 02)
ff:1e.3 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Power Control Unit (rev 02)
ff:1e.4 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 Power Control Unit (rev 02)
ff:1f.0 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 VCU (rev 02)
ff:1f.2 System peripheral: Intel Corporation Xeon E7 v3/Xeon E5 v3/Core i7 VCU (rev 02)

 

You might notice 3 items in the list referring to USB controllers, these belong to the chipset.

The m/b comes with 18 ports, 10 from the chipset 8 from the Renesas controllers.

 

6765_13_gigabyte_ga_x99_soc_force_motherboard_overview_and_overclocking_guide.png

 

You can see from the layout the 3 "unnamed" USB controllers, 2 x USB 2 (2x4 ports) and 1x USB 3 (2 ports) = total of 10 chipset ports.

 

I'm not able to find the PCI Bridge for the Renesas controllers.

 

Help is much appreciated, thank you!!!

Share this post


Link to post

When I pass through a PCIE USB 3.0 controller (Fresco Logic) many times when I restart the virtual machine it will fail to attach the controller and sometimes will hard-lock the host system.

 

I currently have the controller stubbed in the syslinux boot config file.

 

I have a hard drive, keyboard, wmc ir receiver, and some other devices occasionally plugged in to the controller.

 

There is also a GTX 650 ti being passed through to the VM in addition to the USB 3.0 card

 

The current VM is using SeaBios and running Windows 7 64-bit

 

I did have another VM running OVMF that didn't appear to have this issue

 

PCI Devices

00:00.0 Host bridge [0600]: Intel Corporation 4th Gen Core Processor DRAM Controller [8086:0c00] (rev 06)
00:01.0 PCI bridge [0604]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller [8086:0c01] (rev 06)
00:01.1 PCI bridge [0604]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x8 Controller [8086:0c05] (rev 06)
00:02.0 VGA compatible controller [0300]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller [8086:0412] (rev 06)
00:03.0 Audio device [0403]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller [8086:0c0c] (rev 06)
00:14.0 USB controller [0c03]: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI [8086:8c31] (rev 04)
00:16.0 Communication controller [0780]: Intel Corporation 8 Series/C220 Series Chipset Family MEI Controller #1 [8086:8c3a] (rev 04)
00:19.0 Ethernet controller [0200]: Intel Corporation Ethernet Connection I217-V [8086:153b] (rev 04)
00:1a.0 USB controller [0c03]: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #2 [8086:8c2d] (rev 04)
00:1c.0 PCI bridge [0604]: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #1 [8086:8c10] (rev d4)
00:1c.4 PCI bridge [0604]: Intel Corporation 82801 PCI Bridge [8086:244e] (rev d4)
00:1c.5 PCI bridge [0604]: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #6 [8086:8c1a] (rev d4)
00:1d.0 USB controller [0c03]: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #1 [8086:8c26] (rev 04)
00:1f.0 ISA bridge [0601]: Intel Corporation Z87 Express LPC Controller [8086:8c44] (rev 04)
00:1f.2 SATA controller [0106]: Intel Corporation 8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [AHCI mode] [8086:8c02] (rev 04)
00:1f.3 SMBus [0c05]: Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller [8086:8c22] (rev 04)
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GK106 [GeForce GTX 650 Ti] [10de:11c6] (rev a1)
01:00.1 Audio device [0403]: NVIDIA Corporation GK106 HDMI Audio Controller [10de:0e0b] (rev a1)
02:00.0 USB controller [0c03]: Fresco Logic FL1100 USB 3.0 Host Controller [1b73:1100] (rev 10)
04:00.0 PCI bridge [0604]: Intel Corporation 82801 PCI Bridge [8086:244e] (rev 41)
06:00.0 SATA controller [0106]: Marvell Technology Group Ltd. 88SE9172 SATA 6Gb/s Controller [1b4b:9172] (rev 11)

 

IOMMU Groups

/sys/kernel/iommu_groups/0/devices/0000:00:00.0
/sys/kernel/iommu_groups/1/devices/0000:00:01.0
/sys/kernel/iommu_groups/1/devices/0000:00:01.1
/sys/kernel/iommu_groups/1/devices/0000:01:00.0
/sys/kernel/iommu_groups/1/devices/0000:01:00.1
/sys/kernel/iommu_groups/1/devices/0000:02:00.0
/sys/kernel/iommu_groups/2/devices/0000:00:02.0
/sys/kernel/iommu_groups/3/devices/0000:00:03.0
/sys/kernel/iommu_groups/4/devices/0000:00:14.0
/sys/kernel/iommu_groups/5/devices/0000:00:16.0
/sys/kernel/iommu_groups/6/devices/0000:00:19.0
/sys/kernel/iommu_groups/7/devices/0000:00:1a.0
/sys/kernel/iommu_groups/8/devices/0000:00:1c.0
/sys/kernel/iommu_groups/9/devices/0000:00:1c.4
/sys/kernel/iommu_groups/9/devices/0000:04:00.0
/sys/kernel/iommu_groups/10/devices/0000:00:1c.5
/sys/kernel/iommu_groups/11/devices/0000:00:1d.0
/sys/kernel/iommu_groups/12/devices/0000:00:1f.0
/sys/kernel/iommu_groups/12/devices/0000:00:1f.2
/sys/kernel/iommu_groups/12/devices/0000:00:1f.3
/sys/kernel/iommu_groups/13/devices/0000:06:00.0

 

internal error: process exited while connecting to monitor: 

2016-11-14T06:17:33.252370Z qemu-system-x86_64: -device vfio-pci,host=02:00.0,id=hostdev2,bus=pci.0,addr=0x8: vfio: Error: Failed to setup INTx fd: Device or resource busy

2016-11-14T06:17:33.252732Z qemu-system-x86_64: -device vfio-pci,host=02:00.0,id=hostdev2,bus=pci.0,addr=0x8: Device initialization failed

Share this post


Link to post

I am having something very similar happening with my PCIe USB card(s) when passing them to my VM(s) and I have a post about it one or two up from yours. I am running Windows 10  and if I reboot the VM, the VM will lock up but not my physical host. My workaround for this is the following until I can figure the problem and may work for you.

 

1. From the Windows environment, instead of rebooting the normal way  try this, open your web browser and navigate to the UNRAID Web management page. 

 

2. Once at the UNRAID web management page navigate to the VMs tab, click the running VM you want to restart, and select restart. 

 

Restarting the VM with PCIe USB card pass-through, through the UNRAID web management has been the only way I have gotten the VM to actually reboot and come back online without locking up. Let me know if that helped.  

 

Also I did notice that when I shut down the VM through the normal Windows shutdown that the VM will shut down just fine, then I can start the VM back up as another option I use from time to time.

 

Capture2.PNG.e3aef9707651d6fbf78548d1a50ab9f0.PNG

Share this post


Link to post

Having a similar problem... Running 6.3RC4 and stubbed my Fresco 1100 USB3.0 PCIe card. When I start any VM for the first time it boots correctly and the PCIe card is detected correctly... When I close the VM and change to another VM the USB is not being "released"... and message below is shown. Is there a way to force the card to release, besides rebooting the whole server?

 

internal error: early end of file from monitor, possible problem: 2016-11-18T17:02:14.904122Z qemu-system-x86_64: -device vfio-pci,host=03:00.0,id=hostdev2,bus=pci.2,addr=0x6: vfio: Error: Failed to setup INTx fd: Device or resource busy

2016-11-18T17:02:16.786970Z qemu-system-x86_64: -device vfio-pci,host=03:00.0,id=hostdev2,bus=pci.2,addr=0x6: Device initialization failed

 

Nov 18 22:30:48 unRAID kernel: vfio_cap_init: 0000:03:00.0 hiding cap 0xff

Nov 18 22:30:48 unRAID kernel: vfio_cap_init: 0000:03:00.0 hiding cap 0xff

Nov 18 22:30:48 unRAID kernel: genirq: Flags mismatch irq 16. 00000000 (vfio-intx(0000:03:00.0)) vs. 00000080 (ehci_hcd:usb1)

Nov 18 22:30:48 unRAID kernel: vfio-pci 0000:03:00.0: Refused to change power state, currently in D3

Nov 18 22:30:49 unRAID kernel: vfio-pci 0000:03:00.0: timed out waiting for pending transaction; performing function level reset anyway

Nov 18 22:30:50 unRAID kernel: vfio-pci 0000:03:00.0: Failed to return from FLR

Nov 18 22:30:51 unRAID kernel: br0: port 3(vnet1) entered disabled state

Nov 18 22:30:51 unRAID kernel: device vnet1 left promiscuous mode

Nov 18 22:30:51 unRAID kernel: br0: port 3(vnet1) entered disabled state

Nov 18 22:30:51 unRAID kernel: vgaarb: device changed decodes: PCI:0000:02:00.0,olddecodes=io+mem,decodes=io+mem:owns=none

Nov 18 22:30:51 unRAID kernel: vfio-pci 0000:03:00.0: Refused to change power state, currently in D3

Nov 18 22:30:51 unRAID kernel: pci-stub 0000:03:00.0: claimed by stub

Share this post


Link to post

Having a similar problem... Running 6.3RC4 and stubbed my Fresco 1100 USB3.0 PCIe card. When I start any VM for the first time it boots correctly and the PCIe card is detected correctly... When I close the VM and change to another VM the USB is not being "released"... and message below is shown. Is there a way to force the card to release, besides rebooting the whole server?

 

internal error: early end of file from monitor, possible problem: 2016-11-18T17:02:14.904122Z qemu-system-x86_64: -device vfio-pci,host=03:00.0,id=hostdev2,bus=pci.2,addr=0x6: vfio: Error: Failed to setup INTx fd: Device or resource busy

2016-11-18T17:02:16.786970Z qemu-system-x86_64: -device vfio-pci,host=03:00.0,id=hostdev2,bus=pci.2,addr=0x6: Device initialization failed

 

Nov 18 22:30:48 unRAID kernel: vfio_cap_init: 0000:03:00.0 hiding cap 0xff

Nov 18 22:30:48 unRAID kernel: vfio_cap_init: 0000:03:00.0 hiding cap 0xff

Nov 18 22:30:48 unRAID kernel: genirq: Flags mismatch irq 16. 00000000 (vfio-intx(0000:03:00.0)) vs. 00000080 (ehci_hcd:usb1)

Nov 18 22:30:48 unRAID kernel: vfio-pci 0000:03:00.0: Refused to change power state, currently in D3

Nov 18 22:30:49 unRAID kernel: vfio-pci 0000:03:00.0: timed out waiting for pending transaction; performing function level reset anyway

Nov 18 22:30:50 unRAID kernel: vfio-pci 0000:03:00.0: Failed to return from FLR

Nov 18 22:30:51 unRAID kernel: br0: port 3(vnet1) entered disabled state

Nov 18 22:30:51 unRAID kernel: device vnet1 left promiscuous mode

Nov 18 22:30:51 unRAID kernel: br0: port 3(vnet1) entered disabled state

Nov 18 22:30:51 unRAID kernel: vgaarb: device changed decodes: PCI:0000:02:00.0,olddecodes=io+mem,decodes=io+mem:owns=none

Nov 18 22:30:51 unRAID kernel: vfio-pci 0000:03:00.0: Refused to change power state, currently in D3

Nov 18 22:30:51 unRAID kernel: pci-stub 0000:03:00.0: claimed by stub

 

This is the exact same problem I have, same card and everything.

 

In my case, the host will also occasionally hard lock when attempting to start rather than an error message.

 

I didn't seem to have the "Device or resource busy" error if I chose OVMF over SeaBios though but there were still occasional hard locks happening randomly.

 

For now I just pass through the individual devices but that obviously isn't ideal with the VM USB controller only being USB 2.0

Share this post


Link to post

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.