Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

USB PCIe card passthrough

Featured Replies

i know you guys have probably have had a flood of us new people after a certain Youtbue video was made about making a NAS/Gaming rig so my apologies for this.

 

I have everything setup, my shares working nicely, plex working smooth, the only problem I am having is passing through my PCIe USB 3.0 card.  I followed the steps in the youtube video I watched, but when I restart the option isn't there for my device to check to pass through.

 

In the video he was using a beta build, so I am not sure how much that makes a difference.

 

I have tried 2 different cards, they are showing up in putty so I know they are there.

 

I am not sure what kind of information you need for me but I am running a Gigabyte gaming 7 on a 4760k intel processer

 

I had my VM working pretty smoothly, but I am currently reinstalling Windows on a new one.

 

One other weird thing I have noticed is, when I plug in a USB memory stick and try to pass it through to the VM, it doesn't show up either.

 

Lemme know what you need from me as far as other info goes.

It's impossible to say why it isn't working until you tell us what you've done so far in terms of xml and lspci etc...

 

And you can't follow the guide on LinusTech tips because we're using a different version of Unraid and KVM management I think is getting a bit of an overhaul...

 

archedraft's guide here.. is very good and will give you a good idea of what info we need...  ;)

  • Author

I hgaven't changed anything in the XML file yet, just edited the Flash drive like the video... I will read through the guide.  If it is the guide I have already looked at, then one question I do have is does it make a difference if you are passing through a usb bus on the board and a pci device.

 

I am pretty new to going this deep into computer related stuff, but I am also a pretty fast learner.  The guide confused me a little as far as the hints went on what exactly to type up in the XML file.  I know what BUS my USB card is already, just not the specific on what to edit in the XML.

 

This is my PCI card here

 

07:00.0 0c03: 1912:0015 (rev 02)

 

 

What would I need to add to my XML file

 

My understanding is that I modify the below pasted code unique to my device. 

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

    <qemu:arg value='vfio-pci,host=00:1a.0,bus=root.1,addr=00.1'/>

 

I have always passed through my mobo USB controllers but a pcie one *should work* as well. Yes that is the correct line to modify with your USB controller info. Just don't forget to add the other two lines before that. You should be adding two -device lines and two arg lines. (Hint #1 in the guide)

  • Author

How would that look then?  I guess this is the confusing part to me, just above my technical expertise.  What two lines am I missing? 

Danny, just go through the steps, record what you're getting and post where you get up to and then we can help you.  Problem is it's very difficult to visualise what someone is doing without seeing the outputs and XMLs

  • Author

These are my 2 ports on the PCIe card

 

Bus 004 Device 002: ID 0781:5580 SanDisk Corp. SDCZ80 Flash Drive

Bus 004 Device 003: ID 0781:5580 SanDisk Corp. SDCZ80 Flash Drive

 

this is my XML

 

<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=01:00.1,bus=root.1,addr=00.1'/>

  </qemu:commandline>

 

The rest is confusing and I don't want to mess it up, but I also want to learn what I am doing....

 

 

 

 

  • Author

this is my system info

 

PCI Devices

 

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: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:1a.0 USB controller: Intel Corporation 9 Series Chipset Family USB EHCI Controller #2

00:1c.0 PCI bridge: Intel Corporation 9 Series Chipset Family PCI Express Root Port 1 (rev d0)

00:1c.2 PCI bridge: Intel Corporation 9 Series Chipset Family PCI Express Root Port 3 (rev d0)

00:1c.3 PCI bridge: Intel Corporation 9 Series Chipset Family PCI Express Root Port 4 (rev d0)

00:1c.4 PCI bridge: Intel Corporation 9 Series Chipset Family PCI Express Root Port 5 (rev d0)

00:1c.7 PCI bridge: Intel Corporation 9 Series Chipset Family PCI Express Root Port 8 (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 GM204 [GeForce GTX 970] (rev a1)

01:00.1 Audio device: NVIDIA Corporation GM204 High Definition Audio Controller (rev a1)

03:00.0 Ethernet controller: Qualcomm Atheros Killer E220x Gigabit Ethernet Controller (rev 10)

04:00.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 41)

07:00.0 USB controller: Renesas Technology Corp. uPD720202 USB 3.0 Host Controller (rev 02)

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:01:00.0

/sys/kernel/iommu_groups/1/devices/0000:01:00.1

/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:1a.0

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

/sys/kernel/iommu_groups/7/devices/0000:00:1c.2

/sys/kernel/iommu_groups/7/devices/0000:00:1c.3

/sys/kernel/iommu_groups/7/devices/0000:00:1c.4

/sys/kernel/iommu_groups/7/devices/0000:00:1c.7

/sys/kernel/iommu_groups/7/devices/0000:03:00.0

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

/sys/kernel/iommu_groups/7/devices/0000:07:00.0

/sys/kernel/iommu_groups/8/devices/0000:00:1d.0

/sys/kernel/iommu_groups/9/devices/0000:00:1f.0

/sys/kernel/iommu_groups/9/devices/0000:00:1f.2

/sys/kernel/iommu_groups/9/devices/0000:00:1f.3

USB Devices

 

Bus 006 Device 002: ID 8087:8001 Intel Corp.

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

Bus 004 Device 003: ID 0781:5580 SanDisk Corp. SDCZ80 Flash Drive

Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

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

Bus 005 Device 002: ID 8087:8009 Intel Corp.

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

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

Bus 001 Device 005: ID 041e:322c Creative Technology, Ltd

Bus 001 Device 004: ID 1784:0011 TopSeed Technology Corp. eHome Infrared Transceiver

Bus 001 Device 003: ID 046d:c24d Logitech, Inc. G710 Gaming Keyboard

Bus 001 Device 006: ID 154b:6545 PNY FD Device

Bus 001 Device 002: ID 046d:c531 Logitech, Inc.

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

SCSI Devices

 

[0:0:0:0]    disk    ATA      ST3000DM001-9YN1 CC4H  /dev/sda

[1:0:0:0]    disk    ATA      ST3000DM001-9YN1 CC4H  /dev/sdb

[2:0:0:0]    disk    ATA      Samsung SSD 850  1B6Q  /dev/sdc

[3:0:0:0]    disk    ATA      TOSHIBA MD04ACA4 FP2A  /dev/sdd

[4:0:0:0]    disk    ATA      Samsung SSD 850  1B6Q  /dev/sde

[5:0:0:0]    disk    ATA      TOSHIBA MD04ACA4 FP2A  /dev/sdf

[6:0:0:0]    disk    PNY      USB 2.0 FD      8.02  /dev/sdg

[8:0:0:0]    disk    SanDisk  Extreme          0001  /dev/sdh

  • Author

Is this close?  I know Im missing something.... 

 

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

    <qemu:arg value='vfio-pci,host=07:00.0,bus=root.1,addr=00.2'/>

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

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

Just to confuse you some more  ;D You can paste this in your XML and it should work:

 

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

 

Add it above this tag:

</devices>

If you try this method, remove the qemu:arg you made following the guide.

 

I added a post in archdrafts guide explaining what wizardry the tag is doing. It's one of the last posts.

  • Author

OLD XML

 

  </hostdev>

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

      <source>

        <vendor id='0x046d'/>

        <product id='0xc531'/>

        <address bus='1' device='2'/>

      </source>

      <alias name='hostdev3'/>

    </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=01:00.1,bus=root.1,addr=00.1'/>

  </qemu:commandline>

</domain>

 

 

NEW XML

    </hostdev>

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

      <source>

        <vendor id='0x046d'/>

        <product id='0xc531'/>

        <address bus='1' device='2'/>

      </source>

      <alias name='hostdev3'/>

    </hostdev>

    <memballoon model='virtio'>

      <alias name='balloon0'/>

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

    </memballoon>

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

      <driver name='vfio'/>

      <source>

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

      </source>

    </hostdev>

</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=01:00.1,bus=root.1,addr=00.1'/>

  </qemu:commandline>

</domain>

 

  • Author

That didn't work, just gave me an execution error

 

internal error: early end of file from monitor: possible problem:

2016-01-03T00:10:23.530856Z qemu-system-x86_64: -device vfio-pci,host=07:00.0,id=hostdev4,bus=pci.0,addr=0x6: vfio: error, group 7 is not viable, please ensure all devices within the iommu_group are bound to their vfio bus driver.

2016-01-03T00:10:23.530871Z qemu-system-x86_64: -device vfio-pci,host=07:00.0,id=hostdev4,bus=pci.0,addr=0x6: vfio: failed to get group 7

2016-01-03T00:10:23.530877Z qemu-system-x86_64: -device vfio-pci,host=07:00.0,id=hostdev4,bus=pci.0,addr=0x6: Device initialization failed

2016-01-03T00:10:23.530883Z qemu-system-x86_64: -device vfio-pci,host=07:00.0,id=hostdev4,bus=pci.0,addr=0x6: Device 'vfio-pci' could not be initialized

 

your code was the first edit i made to my XML too, if that helps

That didn't work, just gave me an execution error

 

internal error: early end of file from monitor: possible problem:

2016-01-03T00:10:23.530856Z qemu-system-x86_64: -device vfio-pci,host=07:00.0,id=hostdev4,bus=pci.0,addr=0x6: vfio: error, group 7 is not viable, please ensure all devices within the iommu_group are bound to their vfio bus driver.

2016-01-03T00:10:23.530871Z qemu-system-x86_64: -device vfio-pci,host=07:00.0,id=hostdev4,bus=pci.0,addr=0x6: vfio: failed to get group 7

2016-01-03T00:10:23.530877Z qemu-system-x86_64: -device vfio-pci,host=07:00.0,id=hostdev4,bus=pci.0,addr=0x6: Device initialization failed

2016-01-03T00:10:23.530883Z qemu-system-x86_64: -device vfio-pci,host=07:00.0,id=hostdev4,bus=pci.0,addr=0x6: Device 'vfio-pci' could not be initialized

 

your code was the first edit i made to my XML too, if that helps

 

Have you turned on PCIe ACS Override? (Settings ==> VM Manager)

  • Author

No, should I?  If so, then should I re-edit my XML with the provided code above /device?

Shouldn't need to change your XML. The USB card is sharing an IOMMU group, that setting can help get around this.

  • Author

Ok, so I just did that and rebooted everything.  What should the next step be?  Thank you, by the way for being so patient, lol.

  • Author

It booted up this time, and the USB card showed up in my device manager, but nothing happened when I plugged my usb stick into it.  Is it still not hot plug-able?

  • Author

I re-booted my system and I had no option to pass through my USB stick to the VM,but it IS showing in device manager.

It should show up, but have you tried installing the drivers for the card?

  • Author

Well shit, id didn't show as an error so I didn't bother to... lol.  I'll give that a try.

  • Author

I tried to update but windows said the driver is already installed.

  • Author

Will i still need to add the gemmu code?

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.