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


archedraft

511 posts in this topic Last Reply

Recommended Posts

Thanks for the guide.

 

Was able to passthru a whole USB 3.0 PCIe card I got off of Amazon. 

 

https://www.amazon.ca/gp/product/B00PAFDW3M/ref=oh_aui_detailpage_o00_s00?ie=UTF8&psc=1

69390d0386af4134960ffec4a899de2d.png

I tried using the included Sata to Sata adapter but the PC would not boot until I switched to the 4 pin molex power.

 

Before all this i used the GUI settings and added the LCD panel I wanted in my Ubuntu 16.04 VM only.

 

root@unRAID:~# lspci | grep USB

05:00.0 USB controller: Fresco Logic Device 1100 (rev 10)
Otheres but not relavant

 

Got ../../../devices/pci0000:00/0000:00:09.0/0000:05:00.0/usb12  and usb13

 

Used un devices:

    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
      </source>
    </hostdev>

 

Without the separate USB PCIe card and passing the whole card thru I could never pass my mouse,keyboard, and LCD panel without losing either the mouse or keyboard.

 

I got LCDproc working in my VM now but would prefer it to be working for only unRAID stats next.

NFj2wEu.gif

 

The GTX750ti takes up 2 spaces covering up the PCIe x1 next to the PCIe x 16 blue slot.  Have a cheap Nvidia G210 in the black slot and an old Radeon 7K pci card.  So not much room left.

049a0638969c420491362ecdf63686ed.png

 

 

 

 

Link to post
  • Replies 510
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

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 mac

I automated steps 1-9 of this guide.   The output shows USB bus #, PCI Address, and IOMMU group #   Bus 1 PCI 0000:00:1a.0 IOMMU 20     Intel Corp.     Linux Foundation 2.0 root hub Bus 2

I believe users with this specific card (Startech PEXUSB3S44V) have no issues passing them to the machine, but have issues once passed to the machine inside the VM. Mine throws a Code 10 error on the

Posted Images

I am trying to pass through a USB 2.0 PCIe NEC card. I have tried both ways shown but I just can't seem to get it to work. The vm just errors and never start. so I got it back to the start. Any help would great.

 

This is the pci device list section for the card

08:00.0 USB controller: NEC Corporation OHCI USB Controller (rev 43)

08:00.1 USB controller: NEC Corporation OHCI USB Controller (rev 43)

08:00.2 USB controller: NEC Corporation uPD72010x USB 2.0 Controller (rev 04)

 

This is the iommu list for the card

/sys/kernel/iommu_groups/10/devices/0000:00:1c.0

 

This is the readlink for the card

../../../devices/pci0000:00/0000:00:1c.0/0000:07:00.0/000:08:00.2/usb3

 

Here is my XML for the VM

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

  <name>Ashleys</name>

  <uuid>93b4f3b7-14c8-8fe2-76ac-e56a6aca35ee</uuid>

  <metadata>

    <vmtemplate name="Custom" icon="windows7.png" os="windows7"/>

  </metadata>

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

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

  <memoryBacking>

    <nosharepages/>

    <locked/>

  </memoryBacking>

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

  <cputune>

    <vcpupin vcpu='0' cpuset='0'/>

    <vcpupin vcpu='1' cpuset='1'/>

    <vcpupin vcpu='2' cpuset='2'/>

    <vcpupin vcpu='3' cpuset='3'/>

    <vcpupin vcpu='4' cpuset='4'/>

    <vcpupin vcpu='5' cpuset='5'/>

    <vcpupin vcpu='6' cpuset='6'/>

    <vcpupin vcpu='7' cpuset='7'/>

  </cputune>

  <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='8' 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/vdisks/Ashley/vdisk1.img'/>

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

      <boot order='1'/>

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

    </disk>

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

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

      <source file='/mnt/user/isos/win7hp64sp1.iso'/>

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

      <readonly/>

      <boot order='2'/>

      <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/user/isos/virtio-win-0.1.110-1.iso'/>

      <target dev='hdb' bus='ide'/>

      <readonly/>

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

    </disk>

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

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

    </controller>

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

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

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

    </controller>

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

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

    </controller>

    <interface type='bridge'>

      <mac address='52:54:00:03:b6:8c'/>

      <source bridge='br0'/>

      <model type='virtio'/>

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

    </interface>

    <serial type='pty'>

      <target port='0'/>

    </serial>

    <console type='pty'>

      <target type='serial' port='0'/>

    </console>

    <channel type='unix'>

      <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/Ashleys.org.qemu.guest_agent.0'/>

      <target type='virtio' name='org.qemu.guest_agent.0'/>

      <address type='virtio-serial' controller='0' bus='0' port='1'/>

    </channel>

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

      <source>

        <vendor id='0x1241'/>

        <product id='0x1603'/>

      </source>

    </hostdev>

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

      <source>

        <vendor id='0x04b3'/>

        <product id='0x3107'/>

      </source>

    </hostdev>

    <memballoon model='virtio'>

      <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:commandline>

</domain>

 

 

Link to post

I am trying to pass through a USB 2.0 PCIe NEC card. I have tried both ways shown but I just can't seem to get it to work. The vm just errors and never start. so I got it back to the start. Any help would great.

 

This is the pci device list section for the card

08:00.0 USB controller: NEC Corporation OHCI USB Controller (rev 43)

08:00.1 USB controller: NEC Corporation OHCI USB Controller (rev 43)

08:00.2 USB controller: NEC Corporation uPD72010x USB 2.0 Controller (rev 04)

First off you have to pass through all three of these devices it is really only 1 device but it shows up as three.  Why I hated USB2.0 and VMWare.  It had a 6 device limit on pass through on ESXi 5.0 and a USB controller like this used up 3 of the 6 allowed devices.

 

 

I would put the following into your VM's XML and remove everything else you changed trying to add this controller.

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

Link to post

I automated steps 1-9 of this guide.

 

The output shows USB bus #, PCI Address, and IOMMU group #

 

Bus 1 PCI 0000:00:1a.0 IOMMU 20
     Intel Corp.
     Linux Foundation 2.0 root hub

Bus 2 PCI 0000:00:1d.0 IOMMU 26
     Intel Corp.
     Linux Foundation 2.0 root hub

Bus 3 PCI 0000:00:14.0 IOMMU 18
     ASMedia Technology Inc.
     C-Media Electronics, Inc.
     Dell Computer Corp. Keyboard
     HTC (High Tech Computer Corp.)
     HTC (High Tech Computer Corp.)
     HTC (High Tech Computer Corp.)
     HTC (High Tech Computer Corp.)
     HTC (High Tech Computer Corp.)
     Linux Foundation 2.0 root hub
     Microsoft Corp. Wheel Mouse Optical
     SanDisk Corp.
     Standard Microsystems Corp.
     Yubico.com Yubikey NEO(-N) OTP+U2F

Bus 4 PCI 0000:00:14.0 IOMMU 18
     ASMedia Technology Inc.
     Linux Foundation 3.0 root hub

 

 

The above was generated by ssh into the unraid 6 box and running the following

for n in $(lsusb | gawk '{print $2" " }' |uniq | sort)
do
bussNum=$(echo $n | sed -r 's=^0*==g')
bussAddr=$(readlink /sys/bus/usb/devices/usb$bussNum | sed -r 's=.*/devices/==g' | gawk -F'/' '{print $2}')
iommuGroup=$(find . /sys/kernel/iommu_groups | grep $bussAddr | uniq | sed -r 's=/devices.*==g' | sed -r 's=.*/==g')
echo Bus $bussNum PCI $bussAddr IOMMU $iommuGroup
IFS_bk=$IFS
IFS=$'\n'
for y in $(lsusb | grep 'Bus '$n | cut -d' ' -f 7- | sed '/^\s*$/d' | sort)
do
echo '     '$y
done
IFS=$IFS_bk
echo ' '
done

 

 

Link to post

I am trying to pass through a USB 2.0 PCIe NEC card. I have tried both ways shown but I just can't seem to get it to work. The vm just errors and never start. so I got it back to the start. Any help would great.

 

This is the pci device list section for the card

08:00.0 USB controller: NEC Corporation OHCI USB Controller (rev 43)

08:00.1 USB controller: NEC Corporation OHCI USB Controller (rev 43)

08:00.2 USB controller: NEC Corporation uPD72010x USB 2.0 Controller (rev 04)

First off you have to pass through all three of these devices it is really only 1 device but it shows up as three.  Why I hated USB2.0 and VMWare.  It had a 6 device limit on pass through on ESXi 5.0 and a USB controller like this used up 3 of the 6 allowed devices.

 

 

I would put the following into your VM's XML and remove everything else you changed trying to add this controller.

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

 

I tried the above you listed. Still errors out. I'll see if I can get the error and list it tomorrow. Thanks for the help.

Link to post

Unfortunately my X99 Sabertooth has the same issue (all the buses on the same controller) even after BIOS update  :'(

 

lsusb	Bus	Device ID	Device Name
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub	003	00:14.0	USB controller: Intel Corporation C610/X99 series chipset USB xHCI Host Controller (rev 05)
Bus 003 Device 002: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)	003	00:14.0	USB controller: Intel Corporation C610/X99 series chipset USB xHCI Host Controller (rev 05)
Bus 003 Device 003: ID 05e3:0608 Genesys Logic, Inc. Hub	003	00:14.0	USB controller: Intel Corporation C610/X99 series chipset USB xHCI Host Controller (rev 05)
Bus 003 Device 004: ID 8644:800b Intenso GmbG Micro Line (4GB)	003	00:14.0	USB controller: Intel Corporation C610/X99 series chipset USB xHCI Host Controller (rev 05)
Bus 003 Device 005: ID 0c45:62e0 Microdia MSI Starcam Racer	003	00:14.0	USB controller: Intel Corporation C610/X99 series chipset USB xHCI Host Controller (rev 05)
Bus 003 Device 006: ID 174c:2074 ASMedia Technology Inc. ASM1074 High-Speed hub	003	00:14.0	USB controller: Intel Corporation C610/X99 series chipset USB xHCI Host Controller (rev 05)
Bus 003 Device 007: ID 056a:00d1 Wacom Co., Ltd Bamboo Pen & Touch (CTH-460-DE)	003	00:14.0	USB controller: Intel Corporation C610/X99 series chipset USB xHCI Host Controller (rev 05)
Bus 003 Device 008: ID 046d:c517 Logitech, Inc. LX710 Cordless Desktop Laser	003	00:14.0	USB controller: Intel Corporation C610/X99 series chipset USB xHCI Host Controller (rev 05)
Bus 003 Device 009: ID 10f5:0650 Turtle Beach	003	00:14.0	USB controller: Intel Corporation C610/X99 series chipset USB xHCI Host Controller (rev 05)
Bus 003 Device 011: ID 1e3d:2092 Chipsbank Microelectronics Co., Ltd	003	00:14.0	USB controller: Intel Corporation C610/X99 series chipset USB xHCI Host Controller (rev 05)
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub	004	00:14.0	USB controller: Intel Corporation C610/X99 series chipset USB xHCI Host Controller (rev 05)
Bus 004 Device 002: ID 05e3:0732 Genesys Logic, Inc. All-in-One Cardreader	004	00:14.0	USB controller: Intel Corporation C610/X99 series chipset USB xHCI Host Controller (rev 05)
Bus 004 Device 003: ID 174c:3074 ASMedia Technology Inc. ASM1074 SuperSpeed hub	004	00:14.0	USB controller: Intel Corporation C610/X99 series chipset USB xHCI Host Controller (rev 05)
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub	001	00:1a.0	USB controller: Intel Corporation C610/X99 series chipset USB Enhanced Host Controller #2 (rev 05)
Bus 001 Device 002: ID 8087:800a Intel Corp.	001	00:1a.0	USB controller: Intel Corporation C610/X99 series chipset USB Enhanced Host Controller #2 (rev 05)
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub	002	00:1d.0	USB controller: Intel Corporation C610/X99 series chipset USB Enhanced Host Controller #1 (rev 05)
Bus 002 Device 002: ID 8087:8002 Intel Corp.	002	00:1d.0	USB controller: Intel Corporation C610/X99 series chipset USB Enhanced Host Controller #1 (rev 05)
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub	005	08:00.0	USB controller: ASMedia Technology Inc. ASM1142 USB 3.1 Host Controller
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub	006	08:00.0	USB controller: ASMedia Technology Inc. ASM1142 USB 3.1 Host Controller

 

hey testdasi, I'm looking to get the same motherboard and I was wondering if you mean all of your USB 2.0 are on the same controller? can't you just passthrough the asrock usb 3.0??

Link to post

Hi Everyone,

 

Does anyone know how to pass the following through without turning on PCI-E ACSD Override? 

 

root@Tower:~# readlink /sys/bus/usb/devices/usb6

../../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/usb6

 

 

When I turn on the override the card seems to pass through initially.  But then overtime it just disappears.  I will not show up again until I I reboot UNRAID but it will not passthrough again. 

 

Here is what I put in my XML:

 

<hostdev mode='subsystem' type='pci' managed='yes'>

      <driver name='vfio'/>

      <source>

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

      </source>

    </hostdev>

<memballoon model='virtio'>

Link to post
  • 3 weeks later...

WARNING: DO NOT DO THIS UNLESS YOU ARE 100% SURE THAT THE UNRAID USB IS NOT ON THIS CONTROLLER! IF YOU DO THIS WITH THE CONTROLLER THAT UNRAID IS USING YOUR PC/SERVER WILL NOT BOOT!

 

If one or more (four on my server) usb ports dont work after passing through a usb controller you have to do this:

 

Step 1. Go to tools -> system devices and look for the usb controller

 

EQaVi5m.png

 

Step 2. Copy the number that looks like this

 

cjsCgqF.png

 

Step 3. Go back to "Main" and click on "Flash"

 

E2OBFWP.png

 

Step 4. Add this to your syslinux config

pci-stub.ids=8086:8d31

(replace "8086:8d31" with the number from Step 2.)

 

JG3pW7L.png

 

Step 5. Save the Syslinux config FsnMASm.png, shutdown all vms, stop the array and shutdown your pc/server

 

Step 6. After the pc/server is turned off turn off the Power Supply or unplug the power cord and wait ~5-10 Seconds.

 

ehs9XLE.png

 

Step 7. Start the PC/Server

Link to post
  • 2 weeks later...

Once a controller gets past through unRAID no longer can see the controller. Once the VM gets shutdown, unRAID doesn't know that the controller is available so you have to restart the server in order for unRAID to see it again. There may be some sort of script you can create that will let unRAID know that the controller is free.

 

Just double checking--is this still the case? Every time I reboot my Windows VM (e.g., to install windows updates), my USB devices no longer show up and I have to reboot the whole server.

Link to post

 

Once a controller gets past through unRAID no longer can see the controller. Once the VM gets shutdown, unRAID doesn't know that the controller is available so you have to restart the server in order for unRAID to see it again. There may be some sort of script you can create that will let unRAID know that the controller is free.

 

Just double checking--is this still the case? Every time I reboot my Windows VM (e.g., to install windows updates), my USB devices no longer show up and I have to reboot the whole server.

 

Honestly, I'm having a hard time remembering the context of that post. Since then I now PCI-stub my USB controllers on boot so that they show up in unraids 6.2 VM editor. Therefore unRAID isn't  even aware they exist. That said I can stop my windows 10 VM and then start my win 7 VM with the same USB controller and t works just fine. I wonder if you did the same if they would work after a VM reboot?

Link to post

Is there a guide on how to "PCI-Stub" a USB controller?

 

I think I have the same issue as mentioned -- I pass my USB controller to a Windows 10 VM and all works fine. Then after a reboot the lines for passing though the USB controller are missing from the XML file and the USB controller no longer works.

 

I can't remember if this happens every reboot of the VM or just randomly on some reboots.

Link to post

Is there a guide on how to "PCI-Stub" a USB controller?

 

I think I have the same issue as mentioned -- I pass my USB controller to a Windows 10 VM and all works fine. Then after a reboot the lines for passing though the USB controller are missing from the XML file and the USB controller no longer works.

 

I can't remember if this happens every reboot of the VM or just randomly on some reboots.

 

https://lime-technology.com/forum/index.php?topic=36768.msg475897#msg475897

Link to post

Honestly, I'm having a hard time remembering the context of that post. Since then I now PCI-stub my USB controllers on boot so that they show up in unraids 6.2 VM editor. Therefore unRAID isn't  even aware they exist. That said I can stop my windows 10 VM and then start my win 7 VM with the same USB controller and t works just fine. I wonder if you did the same if they would work after a VM reboot?

 

Sorry to dredge up an old post. I just added pci-stubs to my config, and it didn't change anything. Rebooting the VM (or shutting it down and starting it from the GUI) makes all the USB devices on the card I passedthrough disappear. Very strange, but probably just a quirk of my hardware.

Link to post

Honestly, I'm having a hard time remembering the context of that post. Since then I now PCI-stub my USB controllers on boot so that they show up in unraids 6.2 VM editor. Therefore unRAID isn't  even aware they exist. That said I can stop my windows 10 VM and then start my win 7 VM with the same USB controller and t works just fine. I wonder if you did the same if they would work after a VM reboot?

 

Sorry to dredge up an old post. I just added pci-stubs to my config, and it didn't change anything. Rebooting the VM (or shutting it down and starting it from the GUI) makes all the USB devices on the card I passedthrough disappear. Very strange, but probably just a quirk of my hardware.

 

I have the same issue. Once the VM reboots I can't pass the USB card to it.

 

If I go to Tools - System Devices the USB card is still present in PCI devices but it disappears from USB Devices

 

I am using 6.1.9 have no tried PCI-Stub yet. Do you need to be on 6.2 for PCI-Stub to work or does it work for 6.1.9 as well?

Link to post

Honestly, I'm having a hard time remembering the context of that post. Since then I now PCI-stub my USB controllers on boot so that they show up in unraids 6.2 VM editor. Therefore unRAID isn't  even aware they exist. That said I can stop my windows 10 VM and then start my win 7 VM with the same USB controller and t works just fine. I wonder if you did the same if they would work after a VM reboot?

 

Sorry to dredge up an old post. I just added pci-stubs to my config, and it didn't change anything. Rebooting the VM (or shutting it down and starting it from the GUI) makes all the USB devices on the card I passedthrough disappear. Very strange, but probably just a quirk of my hardware.

 

I have the same issue. Once the VM reboots I can't pass the USB card to it.

 

If I go to Tools - System Devices the USB card is still present in PCI devices but it disappears from USB Devices

 

I am using 6.1.9 have no tried PCI-Stub yet. Do you need to be on 6.2 for PCI-Stub to work or does it work for 6.1.9 as well?

 

Stubbing a device makes this device not available to the host system (linux unraid) on booting.

As of version 6.2 any devices that have been stubbed are added to the vm gui so they can be easily assigned to the vm, without having to do it manually as in this post.

 

(i actually prefer to assign the manually as I dont like to have the device stubbed as i like to be able to passthrough  the device without loosing it to the host system when the vm isnt running)

Link to post

Adding it manually is not a problem but I don't know if this will fix my situation.

 

I bought a PCIe USB card just for the VM. Nothing else is going to use it. This is what I am adding to the XML

 

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

 

Just above the </devices> tag.

 

On a fresh reboot of the entire unRaid machine this successfully passes the USB controller sometimes but not always.

 

If the VM is rebooted it stops working.

 

On a fresh reboot the PCIe USB card is listed in System Devices in the PCI devices and USB Devices list. Once the VM is booted it disappears from the USB devices list and never returns even if the VM is shutdown

 

I really can't figure this out. Stuff that never works I know I'm doing something wrong but stuff that works sometimes and not others even when I do the exact same thing is very frustrating.

Link to post

Adding it manually is not a problem but I don't know if this will fix my situation.

 

I bought a PCIe USB card just for the VM. Nothing else is going to use it. This is what I am adding to the XML

 

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

 

Just above the </devices> tag.

 

On a fresh reboot of the entire unRaid machine this successfully passes the USB controller sometimes but not always.

 

If the VM is rebooted it stops working.

 

On a fresh reboot the PCIe USB card is listed in System Devices in the PCI devices and USB Devices list. Once the VM is booted it disappears from the USB devices list and never returns even if the VM is shutdown

 

I really can't figure this out. Stuff that never works I know I'm doing something wrong but stuff that works sometimes and not others even when I do the exact same thing is very frustrating.

 

Which OS are you running? My issues appear to have been fixed by going from Win7 to Win10 with the latest VirtIO drivers.

Link to post

Adding it manually is not a problem but I don't know if this will fix my situation.

 

I bought a PCIe USB card just for the VM. Nothing else is going to use it. This is what I am adding to the XML

 

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

 

Just above the </devices> tag.

 

On a fresh reboot of the entire unRaid machine this successfully passes the USB controller sometimes but not always.

 

If the VM is rebooted it stops working.

 

On a fresh reboot the PCIe USB card is listed in System Devices in the PCI devices and USB Devices list. Once the VM is booted it disappears from the USB devices list and never returns even if the VM is shutdown

 

I really can't figure this out. Stuff that never works I know I'm doing something wrong but stuff that works sometimes and not others even when I do the exact same thing is very frustrating.

 

Which OS are you running? My issues appear to have been fixed by going from Win7 to Win10 with the latest VirtIO drivers.

 

I am using Windows 10 and it appears that I can reboot the VM from Windows and the USB works but if I shut the VM down from unRaid when I start it up again the USB pass-through does not work until I reboot unRaid and add the changes to the XML file. I can live with that especially since I think if I reboot unRaid without starting the VM I won't need to manually add the changes to XML. The VM is never shut down so this isn't a major issue.

Link to post
  • 2 weeks later...

I am having a lot of issues trying to pass-through / PCI-Stub an entire USB 3.0 card.

 

04:00.0 USB controller: ASMedia Technology Inc. Device 1242

 

So 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 isolcpus=11,12,13,14,15,27,28,29,30,31 initrd=/bzroot
[b] pci-stub.ids=2109:0812[/b]
label unRAID OS Safe Mode (no plugins)
  kernel /bzimage
  append initrd=/bzroot unraidsafemode
label Memtest86+
  kernel /memtest

 

I add to the VM's XML files

 

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

 

The USB device doesn't show up in USB Devices under System Devices but still shows under PCI devices so I think I have the PCI-stub part right but the USB controller is still giving me issues so I want to confirm this is all correct?

 

My issue is that as soon as I plug anything into the second USB port of on the card the whole thing stops working.

Link to post

I am having a lot of issues trying to pass-through / PCI-Stub an entire USB 3.0 card.

 

04:00.0 USB controller: ASMedia Technology Inc. Device 1242

 

So 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 isolcpus=11,12,13,14,15,27,28,29,30,31 initrd=/bzroot
[b] pci-stub.ids=2109:0812[/b]
label unRAID OS Safe Mode (no plugins)
  kernel /bzimage
  append initrd=/bzroot unraidsafemode
label Memtest86+
  kernel /memtest

 

I add

 

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

 

The USB device doesn't show up in USB Devices under System Devices but still shows under PCI devices so I think I have the PCI-stub part right but the USB controller is still giving me issues so I want to confirm this is all correct?

You have not added the pci-stub correctly. You have to add it like below.

 

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

 

Try that and see how it goes.

I have an Asmedia 1042 card that I pass through without problems.

Link to post

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???

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.