VM USB Passthrough Multiple Devices with the same Vendor/Product


Recommended Posts

 

 

In my case I need to connect a 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 I don't care about VIDs or PIDs.

 

I think the solution to go through multiple devices with the same vendor / product is not to pass the USB port to the machine, nor to pass the device to the machine.

 

The solution should be similar to the Parsec application that passes devices through the Network, this requires installing a plug-in in the host VM and in the unraid a plugin should be installed where the configuration of the devices is carried out.

Link to comment
  • 1 month later...

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.

 

image.thumb.png.28438658842f9bb3ccaec3935bf121c1.png

 

My current VMs defined on this system.

 

image.thumb.png.b87a4ffc657abe723279ffae4c6f0756.png

Link to comment

I am still working on this, but now have the option to connect multiple devices of the same vendor/product to a VM.

 

Currently it is still dependent on USBIP commands which I am planning to change. Also not released yet but its will auto connect to a VM when the usb is plugged in and the VM is running.

 

Whilst it is using USBIP commands it is limited to > 6.9.0-rc2 but hopefully soon I will release version that will run on 6.8.

 

 

image.thumb.png.407a251ad46266a048cec71fd7176fab.png

Link to comment
  • 2 months later...
On 2/8/2021 at 12:17 PM, SimonF said:

Version 08.02.2021 released today. This is still a beta release.

 

udev rules are in now place. If VM defined and Autoconnect is set USB device will be connected to the VM when plugged in. Minimum release level changed to 6.8.

 

thanks a lot, will this work for unraid 6.9?

Link to comment
49 minutes ago, SimonF said:

Yes runs on 6.9, 6.8 is minimum release.

 

Screen from 6.9.1

 

image.thumb.png.b8c9ff49917a6f73ad807c81c9c9cbfd.png

hooo excellent, thank you very much. have you been able to find something so you don't have to add the script manually? very good solution men. install unraid 6.9 but Dynamix Sleep is failing. as soon as that is solved I will install again and install the "USB MANAGER" plugin

Link to comment

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.