July 28, 20205 yr Hello @Skitals, I have the same issue as the person you quoted. As you mentioned our AMD boards have a single vendorID for all the usb controllers =(. I installed VFIO-PCI Config and I use it to pass my pci drive (it works great!). But when I try to use for my audio device the computer hangs, I believe it is hanging because its grabbing all the usb controllers =/. These are my selections: My server also hangs if I try to append pcie_no_flr=1022:1485,1022:149c vfio-pci.ids=1022:1485,1022:149c as it makes my unraid usb drive unmount during boot, making it unusable. I feel the same thing happens when I ty to pass 0b:00.* devices =/. I also tried just doing it via the XML: <devices> <emulator>/usr/local/sbin/qemu</emulator> <disk type='file' device='disk'> <driver name='qemu' type='raw' cache='writeback'/> <source file='/mnt/user/isos/spaces_win_clover.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/isos/virtio-win-0.1.173-2.iso'/> <target dev='hdb' bus='sata'/> <readonly/> <address type='drive' controller='0' bus='0' target='0' unit='1'/> </disk> <controller type='pci' index='0' model='pci-root'/> <controller type='sata' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </controller> <controller type='virtio-serial' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> </controller> <controller type='usb' index='0' model='ich9-ehci1'> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x7'/> </controller> <controller type='usb' index='0' model='ich9-uhci1'> <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'> <master startport='2'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x1'/> </controller> <controller type='usb' index='0' model='ich9-uhci3'> <master startport='4'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x2'/> </controller> <interface type='bridge'> <mac address='xx:54:xx:6f:xx:xx'/> <source bridge='br0'/> <model type='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </interface> <serial type='pty'> <target type='isa-serial' port='0'> <model name='isa-serial'/> </target> </serial> <console type='pty'> <target type='serial' port='0'/> </console> <channel type='unix'> <target type='virtio' name='org.qemu.guest_agent.0'/> <address type='virtio-serial' controller='0' bus='0' port='1'/> </channel> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <hostdev mode='subsystem' type='pci' managed='yes'> <driver name='vfio'/> <source> <address domain='0x0000' bus='0x09' slot='0x00' function='0x0'/> </source> <rom file='/mnt/user/isos/zotak-1070.rom'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0' multifunction='on'/> </hostdev> <hostdev mode='subsystem' type='pci' managed='yes'> <driver name='vfio'/> <source> <address domain='0x0000' bus='0x09' slot='0x00' function='0x1'/> </source> <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x1'/> </hostdev> <hostdev mode='subsystem' type='pci' managed='yes'> <driver name='vfio'/> <source> <address domain='0x0000' bus='0x03' slot='0x00' function='0x0'/> </source> <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/> </hostdev> <hostdev mode='subsystem' type='pci' managed='yes'> <driver name='vfio'/> <source> <address domain='0x0000' bus='0x04' slot='0x00' function='0x0'/> </source> <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/> </hostdev> <hostdev mode='subsystem' type='pci' managed='yes'> <driver name='vfio'/> <source> <address domain='0x0000' bus='0x0b' slot='0x00' function='0x0'/> </source> <address type='pci' domain='0x0000' bus='0x00' slot='0x0b' function='0x0' multifunction='on'/> </hostdev> <hostdev mode='subsystem' type='pci' managed='yes'> <driver name='vfio'/> <source> <address domain='0x0000' bus='0x0b' slot='0x00' function='0x1'/> </source> <address type='pci' domain='0x0000' bus='0x00' slot='0x0c' function='0x0'/> </hostdev> <hostdev mode='subsystem' type='pci' managed='yes'> <driver name='vfio'/> <source> <address domain='0x0000' bus='0x0b' slot='0x00' function='0x3'/> </source> <address type='pci' domain='0x0000' bus='0x00' slot='0x0d' function='0x0'/> </hostdev> <hostdev mode='subsystem' type='pci' managed='yes'> <driver name='vfio'/> <source> <address domain='0x0000' bus='0x0b' slot='0x00' function='0x4'/> </source> <address type='pci' domain='0x0000' bus='0x00' slot='0x0e' function='0x0'/> </hostdev> <memballoon model='none'/> </devices> With and without multifunction='on' they both un mount my unraid drive. Edited July 28, 20205 yr by RaidBoi1904
December 13, 20205 yr On 6/27/2019 at 11:43 AM, jonp said: I would definitely create a post in the feature request forum. This isn't really something we would directly develop ourselves, but if we could find a way to "script" around this, I could see us devoting some time to doing that. As of right now, it's not a development priority because there just aren't enough users out there complaining about it. There are plenty of things we want to see improved and this is one of them, but we have to tackle things in the order of what's going to bring the most value to the most people first, and this definitely slides down the task list as a result. Excuse me JONP, you know if. Is any team working on a solution like this? https://www.labsrc.com/unraid-automatic-usb-hotplugging-libvirt/ In the link that I add there is also the solution to connect two devices with the same VID and the same PID. in my case I need to connect an xbox controller to each virtual machine, (I have two virtual machines) I imagine an option in UnRaid where I configure which usb ports I want to pass to which virtual machine (without having to buy additional hardware) and not worry about VIDs or PIDs already look in the forum for "FEATURE REQUESTS ", but I can't find anything related. Thank you for confirming if you know anything about this topic. if you don't know anything about this topic. I will create the request. I think that the solution to pass through several devices with the same supplier / product is not to pass the USB port to the machine, nor to pass the device to the machine. The solution must be similar to the Parsec application that passes devices through the Network, this would require a plug-in to be installed on the host VM and in the unraid, a plugin should be installed where the configuration of the devices is carried out Edited December 13, 20205 yr by JhonScript
December 14, 20205 yr 13 hours ago, JhonScript said: Excuse me JONP, you know if. Is any team working on a solution like this? https://www.labsrc.com/unraid-automatic-usb-hotplugging-libvirt/ In the link that I add there is also the solution to connect two devices with the same VID and the same PID. in my case I need to connect an xbox controller to each virtual machine, (I have two virtual machines) I imagine an option in UnRaid where I configure which usb ports I want to pass to which virtual machine (without having to buy additional hardware) and not worry about VIDs or PIDs already look in the forum for "FEATURE REQUESTS ", but I can't find anything related. Thank you for confirming if you know anything about this topic. if you don't know anything about this topic. I will create the request. I think that the solution to pass through several devices with the same supplier / product is not to pass the USB port to the machine, nor to pass the device to the machine. The solution must be similar to the Parsec application that passes devices through the Network, this would require a plug-in to be installed on the host VM and in the unraid, a plugin should be installed where the configuration of the devices is carried out This is not an active development project for us at this time. Please create a feature request if you can't find one. Thank you!
February 2, 20215 yr Community Expert I will add this to the feature request also. I have started writing a plugin for usbip support, and was looking for ways to identify if usb devices are allocated to other services to restrict people from adding to usbip. I have already disabled the boot flash drive. But there doesn't seem to be an easy way to see USB devices allocated or in use at a host level for VMs, but came across this thread whilst looking for solutions. Within the plugin I have all the details about the USB devices including serial number if the device uses it as some do not like the keyboard and BMC(kb and mouse) on my system. So I have started to see if I can add VMs. Currently working on the processing of udev rules to support updates to my list if someone plugs in devices, but this could also be enhanced to include attaching to the VM if it is running. I will use dlandons libvirt-hot-plug plugin to assist with this so you will need to have it installed also. And likewise remove from VM if unplugged. If I can find a way to be informed of a VM being started I may also be able to allocate devices after it has started. My plugin is still in beta but I have added VMs to the screen so far but it is way off being ready for use. My current VMs defined on this system.
February 3, 20215 yr 5 hours ago, SimonF said: And likewise remove from VM if unplugged. THIS would be huge. There are MANY threads on here of people saying their VM is broken because a passed through USB device is no longer attached, and the VM won't start. If you can help limetech provide a single point of USB comprehensive device management it would be very helpful.
February 10, 20215 yr Community Expert On 2/3/2021 at 12:21 AM, jonathanm said: THIS would be huge. There are MANY threads on here of people saying their VM is broken because a passed through USB device is no longer attached, and the VM won't start. If you can help limetech provide a single point of USB comprehensive device management it would be very helpful. The plugin now connects devices to a VM when it starts if specified in the settings, but you need to manually add a few lines to the qemu hooks file details on support page, working on how to do safely for install. Plugging in a USB device if defined will connect to the VM if it is running.
February 14, 20215 yr Community Expert On 12/13/2020 at 5:43 PM, JhonScript said: I think that the solution to pass through several devices with the same supplier / product is not to pass the USB port to the machine, nor to pass the device to the machine. Check out my plugin USB Manager. Edited October 9, 20214 yr by SimonF
May 19, 20215 yr This worked for me. I could pass through same realtek wifi usb adapters. <hostdev mode='subsystem' type='usb' managed='yes'> <source> <address bus='3' device='10'/> </source> <alias name='hostdev0'/> <address type='usb' bus='0' port='2'/> </hostdev> <hostdev mode='subsystem' type='usb' managed='yes'> <source> <address bus='3' device='9'/> </source> <alias name='hostdev1'/> <address type='usb' bus='0' port='3'/> </hostdev>
April 11, 20233 yr This workaround just worked without issue for me when connecting 2 external WD hard drives (that showed the same ID) to a windows 10 VM. Both drives show in explorer and can be worked with without issue. Thanks!
September 17, 20241 yr On 5/19/2021 at 9:02 AM, queefgirl said: This worked for me. I could pass through same realtek wifi usb adapters. <hostdev mode='subsystem' type='usb' managed='yes'> <source> <address bus='3' device='10'/> </source> <alias name='hostdev0'/> <address type='usb' bus='0' port='2'/> </hostdev> <hostdev mode='subsystem' type='usb' managed='yes'> <source> <address bus='3' device='9'/> </source> <alias name='hostdev1'/> <address type='usb' bus='0' port='3'/> </hostdev> This one really helped me passing one ZigBee and one Thread-Device to the Home Assistant-VM at the same time.
January 4Jan 4 I ran into this exact problem when trying to connect two USB devices from the same vendor to unRAID. The solution for me that worked much cleaner was to install the USB Manager plugin that's available in the community apps plugin. After doing so, I was able to remove the mappings from the VM (which was causing the starting issue) and, instead, map the port to the VM through the USB Manager plugin. By mapping the ports (as opposed to the devices), this allowed the VM to start correctly and for me to use the USB devices as normal. No XML code changes are required when doing this method and you can configure USB manager to automatically map the ports at VM start or reconnect the ports if you remove and plug the USB device back in.
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.