scorcho99 Posted October 19, 2015 Share Posted October 19, 2015 Well, that blacklist option doesn't seem to do anything. Does anyone who knows linux and unraid better than I know of a way to prevent the xhci / usb3 driver from ever loading? Its really the last idea I have after pci-stub failed. I don't need unraid to use any of the USB3 controllers at all. I'm wondering if others have problems? Can anyone test installing a USB3 device to a USB3 port (BEFORE turning on the host) that is passed through to a VM and tell me if the device appears OK in the VM? I ran a lot of tests and everything works perfectly if I have USB2 devices connected. I tested with external hard drive, flash drives, usb mouse and usb sound cards. On both the pci-e card and on the onboard controllers. I even used an extension cable to turn a USB3 device that had caused the problem into a 2.0 one and it worked fine. Its only USB3 devices that mess things up. Between that and the inability to get old PCI (classic) devices working I'm pretty much stuck on this project. Quote Link to comment
Acps Posted October 20, 2015 Share Posted October 20, 2015 archedraft, I have a few more things I would like to see if you could help me. I went ahead a bought a PCIe USB 3.0 expansion card. I installed it and started testing all the 3.0 ports. There are 7 total, 5 external and 2 internal, all 3.0. Here is what I have so far. lspci | grep USB: 00:14.0 USB controller: Intel Corporation 9 Series Chipset Family USB xHCI Controller 00:1a.0 USB controller: Intel Corporation 9 Series Chipset Family USB EHCI Controller #2 00:1d.0 USB controller: Intel Corporation 9 Series Chipset Family USB EHCI Controller #1 06:00.0 USB controller: Fresco Logic Device 1100 (rev 10) The Intel controller is my onboard USB ports, and the Fresco Logic Device is my PCIe USB 3.0 expansion card. Internal - lsusb: Bus 003 Device 004: ID 154b:00ad PNY Bus 004 Device 008: ID 154b:00ad PNY External - lsusb: Bus 004 Device 003: ID 154b:00ad PNY Bus 004 Device 004: ID 154b:00ad PNY Bus 004 Device 005: ID 154b:00ad PNY Bus 004 Device 006: ID 154b:00ad PNY Bus 004 Device 007: ID 154b:00ad PNY readlink /sys/bus/usb/devices/usb: ../../../devices/pci0000:00/0000:00:14.0/usb1 ../../../devices/pci0000:00/0000:00:14.0/usb2 ../../../devices/pci0000:00/0000:00:1c.4/0000:06:00.0/usb3 ../../../devices/pci0000:00/0000:00:1c.4/0000:06:00.0/usb4 ../../../devices/pci0000:00/0000:00:1a.0/usb5 ../../../devices/pci0000:00/0000:00:1d.0/usb6 System Devices - 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:1b.0 /sys/kernel/iommu_groups/8/devices/0000:00:1c.0 /sys/kernel/iommu_groups/8/devices/0000:00:1c.2 /sys/kernel/iommu_groups/8/devices/0000:00:1c.3 /sys/kernel/iommu_groups/8/devices/0000:00:1c.4 /sys/kernel/iommu_groups/8/devices/0000:03:00.0 /sys/kernel/iommu_groups/8/devices/0000:04:00.0 /sys/kernel/iommu_groups/8/devices/0000:06:00.0 /sys/kernel/iommu_groups/9/devices/0000:00:1d.0 /sys/kernel/iommu_groups/10/devices/0000:00:1f.0 /sys/kernel/iommu_groups/10/devices/0000:00:1f.2 /sys/kernel/iommu_groups/10/devices/0000:00:1f.3 System Devices - 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: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.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: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 GM107 [GeForce GTX 750 Ti] (rev a2) 01:00.1 Audio device: NVIDIA Corporation Device 0fbc (rev a1) 03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 0c) 04:00.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 41) 06:00.0 USB controller: Fresco Logic Device 1100 (rev 10) [\code] System Devices - USB Devices: [code] 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 002: ID 2109:0812 Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 003 Device 002: ID 2109:2812 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 004: ID 0781:5567 SanDisk Corp. Cruzer Blade Bus 001 Device 003: ID 051d:0002 American Power Conversion Uninterruptible Power Supply Bus 001 Device 002: ID 046d:c52b Logitech, Inc. Unifying Receiver Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub I tried passing through: 06:00.0 USB controller: Fresco Logic Device 1100 (rev 10), however that did not work, multiple errors. My unRaid USB is the SanDisk Cruzer, on Bus 01, which is located on a 2.0 USB port on the motherboard. A few things I have noticed is that "readlink /sys/bus/usb/devices/usb" for Bus 3 and 4, produce an extra address that the other ones do. I think this might be related to : 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) Which makes some sense, however that is only 5 of the 7 USB ports. I am assuming that these are the 5 external ports. Then there are the 2 internal ports. The extremely odd thing is the fact that all 5 of the external ports are on Bus 4, which makes sense, but then the internal ports, one is on Bus 3 and one is on Bus 4. So a total of 6 on Bus 4 and 1 on Bus 3. So I am lost at what to do next, maybe there is something I need to do in the Bios??? Or could it be a driver issue? I don't know what I should try next to pass through this USB card. Any help I would greatly appreciate it. Thanks again for the help from before! Look forward to hearing from you! Quote Link to comment
zunfire Posted October 22, 2015 Share Posted October 22, 2015 lspci | grep USB 00:12.0 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI0 Controller 00:12.2 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB EHCI Controller 00:13.0 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI0 Controller 00:13.2 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB EHCI Controller 00:14.5 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI2 Controller 00:16.0 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI0 Controller 00:16.2 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB EHCI Controller 02:00.0 USB controller: VIA Technologies, Inc. Device 3483 (rev 01) lsusb Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 002 Device 002: ID 0951:1665 Kingston Technology Digital DataTraveler SE9 64GB Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 005 Device 002: ID 046d:c52b Logitech, Inc. Unifying Receiver Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub *NOT PASS THROUGH BUS 002!!!* Want to pass Bus 001 Readlink usbx devices/pci0000:00/0000:00:16.2/usb3 devices/pci0000:00/0000:00:16.0/usb7 devices/pci0000:00/0000:00:14.5/usb6 devices/pci0000:00/0000:00:13.2/usb2 devices/pci0000:00/0000:00:13.0/usb5 devices/pci0000:00/0000:00:12.2/usb1 devices/pci0000:00/0000:00:12.0/usb4 OIMMU /sys/kernel/iommu_groups/0/devices/0000:00:00.0 /sys/kernel/iommu_groups/1/devices/0000:00:02.0 /sys/kernel/iommu_groups/2/devices/0000:00:09.0 /sys/kernel/iommu_groups/3/devices/0000:00:0a.0 /sys/kernel/iommu_groups/4/devices/0000:00:11.0 /sys/kernel/iommu_groups/5/devices/0000:00:12.0 /sys/kernel/iommu_groups/5/devices/0000:00:12.2 /sys/kernel/iommu_groups/6/devices/0000:00:13.0 /sys/kernel/iommu_groups/6/devices/0000:00:13.2 /sys/kernel/iommu_groups/7/devices/0000:00:14.0 /sys/kernel/iommu_groups/8/devices/0000:00:14.2 /sys/kernel/iommu_groups/9/devices/0000:00:14.3 /sys/kernel/iommu_groups/10/devices/0000:00:14.4 /sys/kernel/iommu_groups/10/devices/0000:04:0e.0 /sys/kernel/iommu_groups/11/devices/0000:00:14.5 /sys/kernel/iommu_groups/12/devices/0000:00:15.0 /sys/kernel/iommu_groups/13/devices/0000:00:15.3 /sys/kernel/iommu_groups/14/devices/0000:00:16.0 /sys/kernel/iommu_groups/14/devices/0000:00:16.2 /sys/kernel/iommu_groups/15/devices/0000:01:00.0 /sys/kernel/iommu_groups/15/devices/0000:01:00.1 /sys/kernel/iommu_groups/16/devices/0000:02:00.0 /sys/kernel/iommu_groups/17/devices/0000:03:00.0 /sys/kernel/iommu_groups/18/devices/0000:05:00.0 /sys/kernel/iommu_groups/19/devices/0000:06:00.0 VIFO skiped no longer needed 6.1 My XML <domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'> <name>Windows</name> <uuid>3989ba1a-c56a-91e3-2afa-ef6d9a381ce3</uuid> <description>Windows 7</description> <metadata> <vmtemplate name="Custom" icon="windows7.png" os="windows7"/> </metadata> <memory unit='KiB'>6291456</memory> <currentMemory unit='KiB'>6291456</currentMemory> <memoryBacking> <nosharepages/> <locked/> </memoryBacking> <vcpu placement='static'>4</vcpu> <cputune> <vcpupin vcpu='0' cpuset='0'/> <vcpupin vcpu='1' cpuset='1'/> <vcpupin vcpu='2' cpuset='2'/> <vcpupin vcpu='3' cpuset='3'/> </cputune> <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='4' 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/vDISK/Windows/vdisk1.img'/> <target dev='hdb' bus='virtio'/> <boot order='1'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> </disk> <disk type='file' device='disk'> <driver name='qemu' type='raw' cache='writeback'/> <source file='/mnt/user/Extra/Windows/vdisk2.img'/> <target dev='hdc' bus='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu' type='raw'/> <source file='/mnt/user/ISOs/virtio-win-0.1.102.iso'/> <target dev='hda' bus='ide'/> <readonly/> <boot order='2'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </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:e2:05:6c'/> <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/Windows.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='0x046d'/> <product id='0xc52b'/> </source> </hostdev> <memballoon model='virtio'> <address type='pci' domain='0x0000' bus='0x00' slot='0x06' 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.0'/> </qemu:commandline> </domain> Trying few things geting same kind of error <qemu:arg value='-device'/> <qemu:arg value='vfio-pci,host=00:12.2,bus=root.1,addr=00.1'/> and this <qemu:arg value='-device'/> <qemu:arg value='vfio-pci,host=00:12.0,bus=root.1,addr=00.1'/> Geting Execution error internal error: early end of file from monitor: possible problem: 2015-10-22T09:49:42.212958Z qemu-system-x86_64: -device vfio-pci,host=00:12.2,bus=root.1,addr=00.1: PCI: slot 0 function 1 not available for vfio-pci, in use by vfio-pci 2015-10-22T09:49:42.213026Z qemu-system-x86_64: -device vfio-pci,host=00:12.2,bus=root.1,addr=00.1: Device 'vfio-pci' could not be initialized Trying to add this in Go file, but still fails. /usr/local/sbin/vfio-bind 0000:00:12.0 0000:00:12.2 Am missing something SOLVED, i think ?? I can now hot plug usb things. Method used guide, but still wounder why this method did not work for me and litle confused what is diffrent about this two method. Added <hostdev mode='subsystem' type='pci' managed='yes'> <driver name='vfio'/> <source> <address domain='0x0000' bus='0x00' slot='0x12' function='0x2'/> </source> </hostdev> Quote Link to comment
jsn0327 Posted October 22, 2015 Share Posted October 22, 2015 I followed this guide to passthrough the USB controller that my FUJITSU SnapScan document scanner is connected to, but I am getting an error when I try to start my Windows 8.1 VM about the following line; which the guide says is required. <qemu:arg value='ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1'/> I don't understand why this line is required as it is written? What if my server does not have the device ioh3420 on bus pice.0 with address 1c.0? Please see the attached screenshots. My XML for the VM is below. I'm running unRAID 6.1.3. Thanks! <domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'> <name>Windows 8.1 Pro</name> <uuid>aae3aec8-0c54-1c45-8158-21412c2505c3</uuid> <description>Windows 8.1 Pro</description> <metadata> <vmtemplate name="Custom" icon="windows.png" os="windows"/> </metadata> <memory unit='KiB'>4194304</memory> <currentMemory unit='KiB'>2097152</currentMemory> <memoryBacking> <nosharepages/> <locked/> </memoryBacking> <vcpu placement='static'>2</vcpu> <cputune> <vcpupin vcpu='0' cpuset='0'/> <vcpupin vcpu='1' cpuset='1'/> </cputune> <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='2' 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/VM/win8/Windows 8.1 Pro/vdisk1.img'/> <target dev='hdc' bus='virtio'/> <boot order='1'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu' type='raw'/> <source file='/mnt/user/Software/Apps/! Operating Systems !/Windows 8.1 Pro (Official from MS)/Windows8.1Pro.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/cache/Apps/TEMP/virtio-win-0.1.96.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='0x04' function='0x0'/> </controller> <interface type='bridge'> <mac address='52:54:00:de:c3:a8'/> <source bridge='br0'/> <model type='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' 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/Windows 8.1 Pro.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> <input type='tablet' bus='usb'/> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes' websocket='-1' listen='0.0.0.0' keymap='en-us'> <listen type='address' address='0.0.0.0'/> </graphics> <video> <model type='vmvga' vram='16384' heads='1'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </video> <memballoon model='virtio'> <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> </memballoon> </devices> <qemu:commandline> <qemu:arg value='-device'/> <qemu:arg value='ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1'/> <qemu:arg value='-device'/> <qemu:arg value='vfio-pci,host=00:12.0,bus=root.1,addr=00.0'/> </qemu:commandline> </domain> Quote Link to comment
archedraft Posted November 5, 2015 Author Share Posted November 5, 2015 So I am lost at what to do next, maybe there is something I need to do in the Bios??? Or could it be a driver issue? I don't know what I should try next to pass through this USB card. Any help I would greatly appreciate it. Thanks again for the help from before! Look forward to hearing from you! Have you tired using this instead of the 06 lines? 0000:00:1c.4 Another option would be to move your unRAID usb to the new internal card and then pass through the motherboard USB? Just a thought. Quote Link to comment
archedraft Posted November 5, 2015 Author Share Posted November 5, 2015 SOLVED, i think ?? I can now hot plug usb things. Method used guide, but still wounder why this method did not work for me and litle confused what is diffrent about this two method. Added <hostdev mode='subsystem' type='pci' managed='yes'> <driver name='vfio'/> <source> <address domain='0x0000' bus='0x00' slot='0x12' function='0x2'/> </source> </hostdev> Are you passing through a graphics card as well? If not I think the issue is that instead of <qemu:arg value='-device'/> <qemu:arg value='vfio-pci,host=00:12.2,bus=root.1,addr=00.1'/> It should have been: <qemu:arg value='-device'/> <qemu:arg value='vfio-pci,host=00:12.2,bus=root.1,addr=00.0'/> Quote Link to comment
archedraft Posted November 5, 2015 Author Share Posted November 5, 2015 I followed this guide to passthrough the USB controller that my FUJITSU SnapScan document scanner is connected to, but I am getting an error when I try to start my Windows 8.1 VM about the following line; which the guide says is required. <qemu:arg value='ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1'/> I don't understand why this line is required as it is written? What if my server does not have the device ioh3420 on bus pice.0 with address 1c.0? Please see the attached screenshots. My XML for the VM is below. I'm running unRAID 6.1.3. Thanks! What does it say if you remove the follow and try and start? <qemu:arg value='-device'/> <qemu:arg value='ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1'/> Quote Link to comment
ars92 Posted November 22, 2015 Share Posted November 22, 2015 Somrething really weird is happening when i was trying to identify the bus my usb ports are on. Ok, so I am connecting a thumbdrive from Kingston to each USB port to identify the bus. SO I plug into this certain port and the below shows when i run the command lsusb root@Tower:~# lsusb Bus 004 Device 002: ID 8087:8000 Intel Corp. Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 003 Device 002: ID 8087:8008 Intel Corp. Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 004: ID 0930:6545 Toshiba Corp. Kingston DataTraveler 102/2.0 / HEMA Flash Drive 2 GB / PNY Attache 4GB Stick Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 003: ID 0718:0246 Imation Corp. Bus 001 Device 002: ID 046d:c52e Logitech, Inc. MK260 Wireless Combo Receiver Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Notice the Kingston thumdrive showing that its connected to Bus 2 right? I connect my APC USB cable to the same port and thsi is what it shows root@Tower:~# lsusb Bus 004 Device 002: ID 8087:8000 Intel Corp. Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 003 Device 002: ID 8087:8008 Intel Corp. Bus 003 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 011: ID 051d:0003 American Power Conversion UPS Bus 001 Device 003: ID 0718:0246 Imation Corp. Bus 001 Device 002: ID 046d:c52e Logitech, Inc. MK260 Wireless Combo Receiver Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub So from bus 002 it became bus 001! I actually want to pas through bus 001 as it seems to have the most ports and I only need two ports for unRAID itself (APC UPS and the OS itself) But if it always changes like this Im afraid im almost definitely gonna end up getting my OS USB controller to pass through... Any ideas as to why would the bus keep on changing? Would it be because both Bus 001 and 002 are connected to the same PCI controller? root@Tower:~# readlink /sys/bus/usb/devices/usb1 ../../../devices/pci0000:00/0000:00:14.0/usb1 root@Tower:~# readlink /sys/bus/usb/devices/usb2 ../../../devices/pci0000:00/0000:00:14.0/usb2 root@Tower:~# Edit: seems to be all the usb ports are under 1 bus/controller. Gonna have to get an external one or try out jonp's suggestion once i have the time....sigh.... Quote Link to comment
comfox Posted December 22, 2015 Share Posted December 22, 2015 Hey all, hoping you can help me out. Is it possible to have the motherboard switch USB buses for the USB slots? I am following the instructions and moving a ADATA 32GB USB3.0 stick from slot to slot but no matter what slot I put it in the lsusb command lists the stick on buss two. Even when I pull out a usb cord from a slot that lsusb lists as bus 1 as soon as I plug in the ADATA stick lsusb then lists it as buss 2. This is making it impossible for me to figure out what USB buss to passthrough. Model: Custom M/B: MSI - Z87-G45 GAMING (MS-7821) CPU: Intel® Core™ i7-4790K CPU @ 4.00GHz HVM: Enabled IOMMU: Enabled Cache: 1024 kB, 256 kB, 8192 kB Memory: 16384 MB (max. installable capacity 32 GB) Network: eth0: 1000Mb/s - Full Duplex eth1: not connected Kernel: Linux 4.1.13-unRAID x86_64 OpenSSL: 1.0.1p Quote Link to comment
jamesyt666 Posted December 31, 2015 Share Posted December 31, 2015 Hi all, i am struggling getting my usb devices to pass through to my virtual machines. Here is what i am doing, hopefully one of you will be able to point out what i have missed. Following the guide lspci | grep USB 00:1a.0 USB controller: Intel Corporation C600/X79 series chipset USB2 Enhanced Host Controller #2 00:1d.0 USB controller: Intel Corporation C600/X79 series chipset USB2 Enhanced Host Controller #1 08:00.0 USB controller: ASMedia Technology Inc. ASM1042 SuperSpeed USB Host Controller 09:00.0 USB controller: ASMedia Technology Inc. ASM1042 SuperSpeed USB Host Controller lsusb What I want to send to one VM Bus 006 Device 004: ID 046d:c049 Logitech, Inc. G5 Laser Mouse Bus 006 Device 003: ID 045e:0752 Microsoft Corp. Wired Keyboard 400 Bus 006 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 006 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub What I want to send to another VM Bus 003 Device 007: ID 046d:c222 Logitech, Inc. G15 Keyboard / LCD Bus 003 Device 006: ID 046d:c221 Logitech, Inc. G11/G15 Keyboard / Keyboard Bus 003 Device 005: ID 046d:c223 Logitech, Inc. G11/G15 Keyboard / USB Hub Bus 003 Device 004: ID 046d:c24a Logitech, Inc. G600 Gaming Mouse Bus 003 Device 003: ID 0738:1302 Mad Catz, Inc. Bus 003 Device 002: ID 2109:3431 Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Unraid Key Bus 005 Device 004: ID 0951:1665 Kingston Technology Digital DataTraveler SE9 64GB Bus 005 Device 003: ID 2433:b111 Bus 005 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub The next step readlink /sys/bus/usb/devices/usb6 ../../../devices/pci0000:00/0000:00:1d.0/usb6 readlink /sys/bus/usb/devices/usb3 ../../../devices/pci0000:00/0000:00:1c.3/0000:09:00.0/usb3 so I know my two devices are 00:1d.0 and 09:00.0 my IOMMU Groups are /sys/kernel/iommu_groups/24/devices/0000:09:00.0 /sys/kernel/iommu_groups/16/devices/0000:00:1d.0 /sys/kernel/iommu_groups/9/devices/0000:00:1a.0 << UNRAID OS I create a VM, add in some disks, graphics soundcard etc and I didn’t tick any usb devices manually as i want to pass the whole controller I changed the xml in my VM (highlighted) to be as follows <qemu:commandline> <qemu:arg value='-device'/> <qemu:arg value='ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1'/> <qemu:arg value='-device'/> <qemu:arg value='vfio-pci,host=02:00.0,bus=pcie.0,multifunction=on,x-vga=on'/> <qemu:arg value='-device'/> <qemu:arg value='vfio-pci,host=03:00.1,bus=pcie.0'/> <qemu:arg value='-device'/> <qemu:arg value='vfio-pci,host=00:1b.0,bus=pcie.0'/> <qemu:arg value='-device'/> <qemu:arg value='vfio-pci,host=09:00.0,bus=root.1,addr=00.1'/> </qemu:commandline> I then start the VM and it boots up, selects the correct graphics. Goes to the windows install but my keyboard and mouse do nothing. What am I missing? Quote Link to comment
saarg Posted December 31, 2015 Share Posted December 31, 2015 Have you tried just passing through the mouse and keyboard in the template instead of the whole controller? Then you pass through the controller after windows is installed. It looks like my motherboard (Asus Z9PE-D8 WS) and the controller you are passing through is USB 3 and then I think you need drivers first. Quote Link to comment
jamesyt666 Posted January 1, 2016 Share Posted January 1, 2016 Just giving that a try now, will let you know what happens!! Edit Mine is a P9 X79 Pro, just restarting the box! fingers crossed Quote Link to comment
jamesyt666 Posted January 1, 2016 Share Posted January 1, 2016 So I installed the drivers and rebooted, once the VM comes up in unRAID USB devices all the devices on that controller disappear and nothing happens in the VM. the only way to get them to come back is to do a reboot of the physical computer and restart unRAID. edit, ok so researched and it is supposed to vanish as it has been passed through to the VM, only issue is the VM shows no new devices, the VM already has the usb 3 drivers installed but nothing comes up. Any thoughts Quote Link to comment
Swampy Posted January 2, 2016 Share Posted January 2, 2016 Im hoping to gain your support in resolving my pass thru issue with USB ports. I followed the instruction on page 1. Here is my data: PCI Device 00:14.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI (rev 05) IOMMU Groups /sys/kernel/iommu_groups/1/devices/0000:00:14.0 After running line command /sys/kernel/iommu_groups/1/devices/0000:00:14.0 The USB 1 & 2 are no longer available which are both in group 1 as seen from the remaining USB. USB Devices Bus 006 Device 002: ID 8087:8000 Intel Corp. Bus 006 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 002: ID 05dc:a761 Lexar Media, Inc. Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 005 Device 002: ID 8087:8008 Intel Corp. Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub So far so good so I added this to the XML: <qemu:commandline> <qemu:arg value='-device'/> <qemu:arg value='vfio-pci,host=00:14.0,bus=root.1,addr=00.0'/> </qemu:commandline> During launching of the VM I get the error [glow=red,2,300]"-device vfio-pci,host=00:14.0,bus=root 1,address=00.0: Bus 'root. 1' not found"[/glow] Here is my XML for review: <domain type='kvm'> <name>Test 8</name> <uuid>738883d4-0137-3e4e-7bc9-8da467c306eb</uuid> <description>test 8</description> <metadata> <vmtemplate name="Custom" icon="windows.png" os="windows"/> </metadata> <memory unit='KiB'>10485760</memory> <currentMemory unit='KiB'>10485760</currentMemory> <memoryBacking> <nosharepages/> <locked/> </memoryBacking> <vcpu placement='static'>6</vcpu> <cputune> <vcpupin vcpu='0' cpuset='2'/> <vcpupin vcpu='1' cpuset='3'/> <vcpupin vcpu='2' cpuset='4'/> <vcpupin vcpu='3' cpuset='5'/> <vcpupin vcpu='4' cpuset='6'/> <vcpupin vcpu='5' 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='6' 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/cache/appdata/ISO share/Test 3/Secondary.img'/> <target dev='hdc' bus='virtio'/> <boot order='1'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu' type='raw'/> <source file='/mnt/cache/appdata/ISO share/Windows 10 Pro/Win10.PRO.img'/> <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/cache/appdata/ISO share/virtio-win-0.1.102.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='0x04' function='0x0'/> </controller> <interface type='bridge'> <mac address='52:54:00:1a:34:b4'/> <source bridge='br0'/> <model type='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' 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/Test 3.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> <input type='tablet' bus='usb'/> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes' websocket='-1' listen='0.0.0.0' keymap='en-us'> <listen type='address' address='0.0.0.0'/> </graphics> <video> <model type='vmvga' vram='16384' heads='1'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </video> <hostdev mode='subsystem' type='pci' managed='yes'> <driver name='vfio'/> <source> <address domain='0x0000' bus='0x00' slot='0x1b' function='0x0'/> </source> <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> </hostdev> <memballoon model='virtio'> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> </memballoon> </devices> <qemu:commandline> <qemu:arg value='-device'/> <qemu:arg value='vfio-pci,host=00:14.0,bus=root.1,addr=00.0'/> </qemu:commandline> </domain> Best Regards Quote Link to comment
archedraft Posted January 2, 2016 Author Share Posted January 2, 2016 I think you need to add this first <qemu:arg value='-device'/> <qemu:arg value='ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1'/> <qemu:arg value='-device'/> <qemu:arg value='vfio-pci,host=00:14.0,bus=root.1,addr=00.0'/> Quote Link to comment
archedraft Posted January 2, 2016 Author Share Posted January 2, 2016 <qemu:commandline> <qemu:arg value='-device'/> <qemu:arg value='ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1'/> <qemu:arg value='-device'/> <qemu:arg value='vfio-pci,host=02:00.0,bus=pcie.0,multifunction=on,x-vga=on'/> <qemu:arg value='-device'/> <qemu:arg value='vfio-pci,host=03:00.1,bus=pcie.0'/> <qemu:arg value='-device'/> <qemu:arg value='vfio-pci,host=00:1b.0,bus=pcie.0'/> <qemu:arg value='-device'/> <qemu:arg value='vfio-pci,host=09:00.0,bus=root.1,addr=00.1'/> </qemu:commandline> Does it work if you remove those bolded items above? Quote Link to comment
Swampy Posted January 2, 2016 Share Posted January 2, 2016 I think you need to add this first <qemu:arg value='-device'/> <qemu:arg value='ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1'/> <qemu:arg value='-device'/> <qemu:arg value='vfio-pci,host=00:14.0,bus=root.1,addr=00.0'/> Hi again. No that didn't work. I didn't add this before because I thought it was for a card. Anyways it throws an error for the following: <qemu:arg value='ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1'/>[/b] It it possibly the address as I highlighted above? Thanks Quote Link to comment
jamesyt666 Posted January 2, 2016 Share Posted January 2, 2016 Just tried that but one is my graphics so I get a black screen!! :-) I am banging my head against this at the moment, I have also tried passing across a different usb controller instead of the usb3 one and the same thing happens. I have also just tried using <controller type='usb' index='0' model='nec-xhci'> </controller> On the VM in device manager it now says USB 3.0 host controller however nothing works in those usb ports at all. Its like there is no power going to them at all so mouse, keyboard joystick etc don't even appear in the device manager edit miss read your bold, brb testing Quote Link to comment
jamesyt666 Posted January 2, 2016 Share Posted January 2, 2016 Nope that makes no difference Quote Link to comment
archedraft Posted January 2, 2016 Author Share Posted January 2, 2016 I think you need to add this first <qemu:arg value='-device'/> <qemu:arg value='ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1'/> <qemu:arg value='-device'/> <qemu:arg value='vfio-pci,host=00:14.0,bus=root.1,addr=00.0'/> Hi again. No that didn't work. I didn't add this before because I thought it was for a card. Anyways it throws an error for the following: <qemu:arg value='ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1'/>[/b] It it possibly the address as I highlighted above? Thanks Depends on what the error message says? Can you post a screen shot? Quote Link to comment
archedraft Posted January 2, 2016 Author Share Posted January 2, 2016 Nope that makes no difference Have you tried passing through a different USB bus? Maybe something is screwy with the one you are trying. Quote Link to comment
jamesyt666 Posted January 2, 2016 Share Posted January 2, 2016 yup I already tried that, and still nothing. to me it seems like the VM does not see the USB controller even though I have passed it through. Quote Link to comment
archedraft Posted January 2, 2016 Author Share Posted January 2, 2016 yup I already tried that, and still nothing. to me it seems like the VM does not see the USB controller even though I have passed it through. What's OS are you running? Quote Link to comment
jamesyt666 Posted January 2, 2016 Share Posted January 2, 2016 Win10 x64, I am just copying over a win 7 iso to try but would rather stick with 10 as I upgraded my install key! Quote Link to comment
archedraft Posted January 2, 2016 Author Share Posted January 2, 2016 Win10 x64, I am just copying over a win 7 iso to try but would rather stick with 10 as I upgraded my install key! Hmm yeah either should work just fine... So it boots up give fine without error but doesn't find the USB controller, correct? Does the device manager show an unknown device? Maybe check your mobo website for drivers? Other than that I don't have a clue Quote Link to comment
Recommended Posts
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.