fadudba Posted May 7, 2020 Share Posted May 7, 2020 Hi! thanks for the plugin. I have an issue with some disks. when I tried to attach them I got this error error: Failed to attach device from /tmp/libvirthotplugusb.xml error: internal error: unable to execute QEMU command 'device_add': failed to open host usb device 2:3 I tried different usb ports and nothing? can you help me? thanks Quote Link to comment
methanoid Posted May 22, 2020 Share Posted May 22, 2020 Is there a clever way to script plug/unplug? With one GPU, I may want to close one VM and open another. I can do that by scripting it What would be good would be to script unplugging the USB devices from that VM before loading the next VM which would plug in the same devices. I would pass through USB controllers (and do) but not much use for Windows XP (no USB3) or Windows 2000 (no USB3) when my mobo only has USB3 controllers, no PCI slots for a USB2 controller and the only PCIe USB2 controller I found is stupid expensive for what it is. Scripting unplug after each VM close would be such a help. I assume its some sort of virsh detach command? @dlandon ?? Quote Link to comment
dlandon Posted May 22, 2020 Author Share Posted May 22, 2020 49 minutes ago, methanoid said: I assume its some sort of virsh detach command? Yes. Quote Link to comment
AlexMex Posted May 24, 2020 Share Posted May 24, 2020 How did I miss this plugin before? Meanwhile I can't find a way to passthrough my USB controller it's a nice solution. Quote Link to comment
hrubak Posted June 1, 2020 Share Posted June 1, 2020 Hello guys, I would like to know, whether this plugin can be used to assign 2 same ID devices to different VMs? The thing is, that I am running 3 VMs and I have 2 same mechanical keyboards ( Kingston hyperx alloy with same HWID), which is preventing them from being assigned to more than 1 VM, as unraid only shows 1 device and won't start the second VM because of this. I am thinking that I will most likely need to pass through 1 of the USB controllers (assuming that my X79 MB has the possibility). However looking at this plugin I am thinking that it could possibly be used to assign the 2nd mechanical keyboard to the other VM. Could you please let me know, whether this is possible? Thanks in advance. Quote Link to comment
craigr Posted August 3, 2020 Share Posted August 3, 2020 (edited) This app rocks. Both of my USB controllers are in the same IOMMU group and I am out of PCIe slots so adding another controller would not be an option. Not quite as good as hot swapping natively Windows, but certainly much much much better than nothing. Thanks for pointing it out! Best regards, craigr Edited August 3, 2020 by craigr Quote Link to comment
mikeyosm Posted January 10, 2021 Share Posted January 10, 2021 For those that are interested, I have found an article here that describes how to set up usb hot plug. https://www.labsrc.com/unraid-automatic-usb-hotplugging-libvirt/#comments I havent tested it myself but ideally it would be nice to see an expansion of this plugin to enable auto hot plug without having to use the UNRAID GUI. 1 Quote Link to comment
Forusim Posted February 2, 2021 Share Posted February 2, 2021 (edited) On 1/10/2021 at 8:09 PM, mikeyosm said: For those that are interested, I have found an article here that describes how to set up usb hot plug. https://www.labsrc.com/unraid-automatic-usb-hotplugging-libvirt/#comments I havent tested it myself but ideally it would be nice to see an expansion of this plugin to enable auto hot plug without having to use the UNRAID GUI. Thank you for this link! This is exactly, what I was looking for in my case with USB-Switch (like KVM-Switch without video). Had to do some tweaking though, because the scripts were not executed from flash drive by default. Adding "/bin/bash" before "/boot/config/script.sh" calls solved my issues. Would be great, if this plug-in could be enhanced with this auto hot plugging or even incorporated directly into Unraid. Edited February 2, 2021 by Forusim Quote Link to comment
garydapogi Posted March 7, 2021 Share Posted March 7, 2021 Does anyone know another plugin which can work with this plugin to automate it? I need to automatically reattach a mouse to a VM. Part of my workflow is to suspend a Linux VM, then suspend the unRaid server too. Then wake up the unRaid server, then manually wakeup the Linux VM after. Problem is, USB mouse does not work after waking up the Linux VM. So Im using this - usb hotplug plugin to reattach the USB mouse. It has been great so far, however, I need to automate things. Can anyone jump in and help please? NOTE: 1. My Unraid server is only being used to Virtualize Linux Mint and Windows 10. Part of my job and workflow to use these OSes simultaneously. 2. Im suspending the Linux VM to preserve the state and save on power bills. 3. I can't let the Unraid server running 24/7 since power outages is frequent in my town and I only have 3-minute UPS backup. Quote Link to comment
SimonF Posted March 7, 2021 Share Posted March 7, 2021 1 hour ago, garydapogi said: another plugin Have a look at my usbip_gui plugin I am planning to rename it to usb manager Quote Link to comment
garydapogi Posted March 7, 2021 Share Posted March 7, 2021 1 hour ago, SimonF said: Have a look at my usbip_gui plugin I am planning to rename it to usb manager I found your plugin from the plugin menu of Unraid, installed it and went to the setting page, however it went to a blank white screen. I hit browser refresh several times, but no good. So I did a reboot, unRaid did not bootup. So I powered off my system. I powered it back on, but it did not switched on - WEIRD! After an hour of tinkering, machine did not power on still. What a coincidence. Not sure what went wrong, but another prob of mine is how to revert back the unRaid USB. So noob of me Quote Link to comment
SimonF Posted March 7, 2021 Share Posted March 7, 2021 (edited) Have you tried booting in safemode, i.e. with no plugins? @garydapogi Maybe open a general support also Edited March 7, 2021 by SimonF Quote Link to comment
garydapogi Posted March 7, 2021 Share Posted March 7, 2021 8 minutes ago, SimonF said: Have you tried booting in safemode, i.e. with no plugins? @garydapogi Maybe open a general support also Will try that out when I fixed the machine. As of now, still not powering on. Quote Link to comment
Big Dan T Posted June 23, 2021 Share Posted June 23, 2021 Hi, Random question, has anyone been able to pass an iphone 12 to a VM using this plugin ? For the life of me i cant get my system to see the iphone 12, it doesnt appear in the list. My old Ipod video does however. Cheers Quote Link to comment
Govnah Posted October 1, 2021 Share Posted October 1, 2021 Trying to use this plugin to determine my NZXT AIO cooler and can't determine how to perform the following: Installed the plugin and attached to VM, but no idea how to obtain the information posted above, and suggestions? Thanks Quote Link to comment
dlandon Posted October 1, 2021 Author Share Posted October 1, 2021 2 hours ago, Govnah said: Trying to use this plugin to determine my NZXT AIO cooler and can't determine how to perform the following: Installed the plugin and attached to VM, but no idea how to obtain the information posted above, and suggestions? Thanks What is it you are trying to do? Quote Link to comment
Govnah Posted October 1, 2021 Share Posted October 1, 2021 Us the Liquidctl docker app for my AIO cooler: avpnusr/liquidctl - Docker Image | Docker Hub Prerequisites I highly recommend to use the following plugin for UnRAID from the Community Applications: Libvirt Hotplug USB Determine your USB-serial and "bus port" I use this for easy detection of the serial of the USB-device, as which the AIO-cooler will be detected. As there is no guarantee, the AIO-cooler will be mapped to the container alone, the serial explicitly addresses this device. Also you need the "port" from the usb bus, so you can map the device to the container. In my example this would be /sys/bus/usb/devices/3-6.3 Quote Link to comment
SimonF Posted October 1, 2021 Share Posted October 1, 2021 1 hour ago, Govnah said: Us the Liquidctl docker app for my AIO cooler: avpnusr/liquidctl - Docker Image | Docker Hub Prerequisites I highly recommend to use the following plugin for UnRAID from the Community Applications: Libvirt Hotplug USB Determine your USB-serial and "bus port" I use this for easy detection of the serial of the USB-device, as which the AIO-cooler will be detected. As there is no guarantee, the AIO-cooler will be mapped to the container alone, the serial explicitly addresses this device. Also you need the "port" from the usb bus, so you can map the device to the container. In my example this would be /sys/bus/usb/devices/3-6.3 The image is from my plugin not USB hotplug. Which version of Unraid are you using, on 6.10 the usb port number is now in system devices. Quote Link to comment
Govnah Posted October 1, 2021 Share Posted October 1, 2021 (edited) Yes, 6.10 RC1 and I will take a look. So the information provided For the Serial I assume is: iSerial 3 00000000001A Based on the output below: root@unRAID-Prod:/dev/bus/usb/009# lsusb -D /dev/bus/usb/009/004 Device: ID 1e71:2007 NZXT NZXT USB Device Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 0 bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 idVendor 0x1e71 NZXT idProduct 0x2007 bcdDevice 2.00 iManufacturer 1 NZXT. - Inc. iProduct 2 NZXT USB Device iSerial 3 00000000001A bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 0x0029 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xc0 Self Powered MaxPower 100mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 3 Human Interface Device bInterfaceSubClass 0 bInterfaceProtocol 0 iInterface 0 HID Device Descriptor: bLength 9 bDescriptorType 33 bcdHID 1.11 bCountryCode 0 Not supported bNumDescriptors 1 bDescriptorType 34 Report wDescriptorLength 412 Report Descriptors: ** UNAVAILABLE ** Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 1 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x01 EP 1 OUT bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 1 can't get device qualifier: Resource temporarily unavailable can't get debug descriptor: Resource temporarily unavailable Device Status: 0x0001 Self Powered Edited October 1, 2021 by Govnah Quote Link to comment
SimonF Posted October 1, 2021 Share Posted October 1, 2021 59 minutes ago, Govnah said: /dev/bus/usb/009/004 have you tried this ^ or /sys/bus/usb/device/9-6.2 for device? Quote Link to comment
Shantarius Posted November 26, 2021 Share Posted November 26, 2021 Hi, i passthrough a USB Printer to a Debian VM with this Plugin. I have checked the Box in the VM Setting to passtrhough the printer and the printer is available in the VM: root@debian11-103:~# lsusb Bus 001 Device 004: ID 03f0:132a HP, Inc HP LaserJet 200 color M251n Bus 001 Device 002: ID 0627:0001 Adomax Technology Co., Ltd QEMU USB Tablet 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 Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub root@debian11-103:~# If i turn off the printer, the printer i not more available in the VM. If then i turn on the printer, the printer does not connect automatically to the VM. I must manually add the printer to the VM in the VM-Tab. How can i passthrough automatically to the VM after turning on the Printer? Thx Chris Quote Link to comment
SimonF Posted November 26, 2021 Share Posted November 26, 2021 (edited) 11 minutes ago, Shantarius said: How can i passthrough automatically to the VM after turning on the Printer Have a look at my usb manager plugin as can auto connect a device when detected by the system. You can specify by port or device. Edited November 26, 2021 by SimonF Quote Link to comment
Shantarius Posted November 27, 2021 Share Posted November 27, 2021 13 hours ago, SimonF said: Have a look at my usb manager plugin as can auto connect a device when detected by the system. You can specify by port or device. Wow this is great and exactly what i need. Now i can use a Debian VM use as a (AirPrint)Printserver. If the Printer is off, the printjob is waiting in the cups-scheduler until i have turned on the printer and the printer auto connects to the VM 🙂 Very nice! Quote Link to comment
masterdot Posted February 1, 2022 Share Posted February 1, 2022 Hey there, I did find a issue with your plugin... My VM is called This 'n That and I cant assign it. Think the ' makes the issue. Sorry for that error: failed to get domain 'This ' Could you make it work for my domain? Thanks for that! Quote Link to comment
dlandon Posted February 1, 2022 Author Share Posted February 1, 2022 6 hours ago, masterdot said: Hey there, I did find a issue with your plugin... My VM is called This 'n That and I cant assign it. Think the ' makes the issue. Sorry for that error: failed to get domain 'This ' Could you make it work for my domain? Thanks for that! I'll have a look. 1 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.