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.

Libvirt Hot Plugin USB - USB Hot Plugin for VMs

Featured Replies

7 minutes ago, dlandon said:

Sounds like an incompatibility with libvirt and BigSur.  Stop your VM, edit the VM xml and select that device at the bottom where the USB devices can be selected, then restart the VM.  See if it attaches then.

 

 

Yes. When i edit xml it working. But i have 3 and more VM started . Some times need attache mouse and keyboard

Edited by Exlife

  • Replies 134
  • Views 46.1k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • I'm not going to be forking this plugin.  Because it is no longer available within Apps, the messaging the FCP is now changed, with it now being advised to switch to USB Manager.  Similar functionalit

  • 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 have

  • I'll have a look.

Posted Images

To start the vm with the usb device is not the problem. But to attach it in running state.

  • Author
3 minutes ago, dadark said:

To start the vm with the usb device is not the problem. But to attach it in running state.

Understood.  That's the information I needed.

 

That indicates that libvirt has an issue.  I'm not sure I will be able to do anything about that.  I don't have a BigSur VM so I can't do any testing.  I'll do a some research and see if there is a solution.

1 hour ago, Exlife said:

Yes. It screen shot

  Hide contents

33333.thumb.jpg.7e930a4080e1dd2d4ab7fde9357005a8.jpg

 

In Results successfully. But In BigSur don't  working mouse or  keyboard

On High Sierra and Mojave all good working

Which usb controller type do you have defined on the VM

24 minutes ago, SimonF said:

Which usb controller type do you have defined on the VM

I have 2 unraid server. On intel and AMD.

intel:

[8086:8c31] 00:14.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI (rev 05)

[8086:8c2d] 00:1a.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #2 (rev 05)

[8086:8c26] 00:1d.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #1 (rev 05)

AMD:

[1022:43d5] 02:00.0 USB controller: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset USB 3.1 XHCI Controller (rev 01)

[1022:43c8] 02:00.1 SATA controller: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset SATA Controller (rev 01)

[1022:145f] 08:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Zeppelin USB 3.0 Host controller

 

Unraid 6.9.2 and 6.10.3 Noone does not  working with Bigsur

 

42 minutes ago, dlandon said:

Understood.  That's the information I needed.

 

That indicates that libvirt has an issue.  I'm not sure I will be able to do anything about that.  I don't have a BigSur VM so I can't do any testing.  I'll do a some research and see if there is a solution.

Whats MasOS you use ?

He don’t have a vm with any macOS.


In the device’s manager and any log of macOS I even don’t see the attached device after hot plug. I compared that with my MacBook.

Edited by dadark

4 minutes ago, Exlife said:

I have 2 unraid server. On intel and AMD.

intel:

[8086:8c31] 00:14.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI (rev 05)

[8086:8c2d] 00:1a.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #2 (rev 05)

[8086:8c26] 00:1d.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #1 (rev 05)

AMD:

[1022:43d5] 02:00.0 USB controller: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset USB 3.1 XHCI Controller (rev 01)

[1022:43c8] 02:00.1 SATA controller: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset SATA Controller (rev 01)

[1022:145f] 08:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Zeppelin USB 3.0 Host controller

 

Unraid 6.9.2 and 6.10.3 Noone does not  working with Bigsur

 

I meant the the version in the VM Template.

image.png.483165272081fc119f7284a52bbeb4ac.png

 

12 minutes ago, SimonF said:

I meant the the version in the VM Template.

image.png.483165272081fc119f7284a52bbeb4ac.png

 

I have 2.0 (EHCI) 

I think I tried 3.0 qemu. But then even at start nothing was working. Maybe because of missing driver for this.

Edited by dadark

21 minutes ago, SimonF said:

Have you tried 3.0 qemu?

I tried now 3.0 (nec XHCI) 3.0 (qemu XHCI). Don't working plugin

  • 4 months later...

Hello
I have a problem with nut, my UPS disconnects intermittently. The UPS is only recognized again by reconnecting the USB cable.
But wenn i use lsusb the UPC is connected: Screenshot. but not in NUT.

NUT UPS-Config:
[UPPSII]
driver = usbhid-ups

port = auto

NUT.conf
MODE=netserver

upsmon.conf
MONITOR [email protected] 1 Monitor4ups ups4monitor master
SHUTDOWNCMD "/sbin/poweroff"
POWERDOWNFLAG /etc/nut/no_killpower
NOTIFYFLAG ONBATT SYSLOG+EXEC
NOTIFYFLAG ONLINE SYSLOG+EXEC
NOTIFYCMD "/usr/sbin/nut-notify"


Do you have an idea
greetings Toby

USV.jpg

  • 3 weeks later...
On 6/26/2018 at 8:12 AM, CraziFuzzy said:

This looks great - I wonder if it could be a but improved.

I am wanting to set up a virtual PC for my daughter on my server, running an HDMI and a USB to her room, where she'll have a monitor, and a powered USB hub to connect keyboard, mouse, headset, etc.  My hold-up is that m motherboard has a pretty poor IOMMU arrangement, so I cannot seem to successfully pass through a USB controller to the VM.  I can simply pass through the USB devices she needs (Keyboard, Mouse, Headset) via USB passthrough, but this doens't allow her to plug in thumbdrives or other devices into her USB hub.

 

I'm wondering if it would be possible to detect when new USB devices are plugged into unRAID, and if they are beneath a defined USB hub, they are auto-hotplugged to a specified virtual machine.

Hi. Did you ever get this to work? I tried the same setup but with a monitor with a USB hub. Using the plugin I successfully hotplugged an external drive and it functions just as it would while connected directly to the onboard ports. Keyboard and mouse are also connected to the monitor hub...all working perfectly!

  • 10 months later...
On 8/23/2022 at 12:36 PM, Exlife said:

Someone use Libvirt Hotplug USB for bigsur ? Didn't work for me 

Monterey to don't work

  • 11 months later...

I seam to also have an issue with my Pixart imaging optical mouse randomly disconnecting.

Works fine for a while, then I hear Windows 11 device unplugged sound. so i have to be reattached by remoting into the webui and attach device driver.

 

Have no idea how to debug or work out what's causing this issue on 6.12.10

Edited by Goldmaster

  • 2 months later...

I'm getting the below error when I try to install the plugin.

 

plugin: bad file MD5: /boot/config/plugins/libvirt.hotplug.usb/libvirt.hotplug.usb-2025.02.04.tgz

Same here, Update and Install dont work.

plugin: bad file MD5: /boot/config/plugins/libvirt.hotplug.usb/libvirt.hotplug.usb-2025.02.04.tgz

 

Edit: Install Error "Executing hook script: pre_plugin_checks plugin: XML file doesn't exist or xml parse error"

Edited by Taiwendo

8 hours ago, dlandon said:

Try installing again.  I just fixed it.

hmm last 10hr still Pending no update & install

Edited by Taiwendo

  • Author
4 hours ago, Taiwendo said:

hmm last 10hr still Pending no update & install

Try removing and reinstalling it.

  • 1 month later...

I have a NUC12 with the latest unraid 7.0 and the latest version of the Libvirt Hot Plugin USB. When I attach an external hard drive (SanDisk E81 2TB) to a Windows 11 virtual machine, the virtual machine cannot detect the new hardware. I tried repeatedly attaching and detaching, but it still doesn't work. I did some tests and found that scanning for new hardware in Windows Device Manager will always block in the attach state, but not in the detach state. Does anyone have a similar situation?

On 3/9/2025 at 10:26 PM, riseyoung said:

I have a NUC12 with the latest unraid 7.0 and the latest version of the Libvirt Hot Plugin USB. When I attach an external hard drive (SanDisk E81 2TB) to a Windows 11 virtual machine, the virtual machine cannot detect the new hardware. I tried repeatedly attaching and detaching, but it still doesn't work. I did some tests and found that scanning for new hardware in Windows Device Manager will always block in the attach state, but not in the detach state. Does anyone have a similar situation?

Got it. I updated virtio-win-0.1.266-1.iso and set the USB Controller to 3.0 in VM Config, then it works well!

  • 1 month later...

Hi I'm new to Unraid and Linux, so excuse my probably stupid question.

 

When I use the hotplug plugin to passthrough an USB disk to my Kubuntu VM the plugin reports a successful passthrough, but in the Kubuntu VM the USB HDD does not seem to show up. What am I doing wrong?

 

Update:

 

I can see the device in the VM with 

lsusb
...
Bus 002 Device 003: ID 174c:235c ASMedia Technology Inc. Ugreen Storage Device
...

 

but I have no clue what to do to actually mount it because it does not show up with 

tom@daily:~$ lsblk
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
vda    253:0    0   25G  0 disk 
├─vda1 253:1    0  300M  0 part /boot/efi
└─vda2 253:2    0 24.7G  0 part /swap
                                /
vdb    253:16   0   20G  0 disk 
└─vdb1 253:17   0   20G  0 part /home
tom@daily:~$ 

 

 

Update 2:

I also tried with an USB flash drive which shows up immediately in the VM, the same is true for an old WD Elements 2.5" HDD enclosure.

 

Still no success with the 2.5" SATA HDD in the USB enclosure from Ugreen though. I have no clue why, Unraid sees the disk and I can mount it with Unassigned Devices (obviously it's not mounted when I try to pass it to the VM)

 

Update 3:
 

tom@daily:~$ sudo dmesg --follow-new 
[835066.847307] usb 2-2: new high-speed USB device number 11 using ehci-pci
[835066.979121] usb 2-2: config 1 interface 0 altsetting 0 bulk endpoint 0x81 has invalid maxpacket 1024
[835066.979129] usb 2-2: config 1 interface 0 altsetting 0 bulk endpoint 0x2 has invalid maxpacket 1024
[835066.979130] usb 2-2: config 1 interface 0 altsetting 1 bulk endpoint 0x81 has invalid maxpacket 1024
[835066.979131] usb 2-2: config 1 interface 0 altsetting 1 bulk endpoint 0x2 has invalid maxpacket 1024
[835066.979132] usb 2-2: config 1 interface 0 altsetting 1 bulk endpoint 0x83 has invalid maxpacket 1024
[835066.979133] usb 2-2: config 1 interface 0 altsetting 1 bulk endpoint 0x4 has invalid maxpacket 1024
[835066.980513] usb 2-2: New USB device found, idVendor=174c, idProduct=235c, bcdDevice= 1.00
[835066.980516] usb 2-2: New USB device strings: Mfr=2, Product=3, SerialNumber=1
[835066.980517] usb 2-2: Product: Ugreen Storage Device
[835066.980518] usb 2-2: Manufacturer: Ugreen
[835066.980519] usb 2-2: SerialNumber: 20D11E800A4F
[835067.005686] scsi host2: uas
[835087.627736] scsi 2:0:0:0: tag#0 uas_eh_abort_handler 0 uas-tag 1 inflight: CMD 
[835087.627744] scsi 2:0:0:0: tag#0 CDB: Inquiry 12 00 00 00 24 00
[835087.635738] scsi host2: uas_eh_device_reset_handler start
[835087.904732] usb 2-2: reset high-speed USB device number 11 using ehci-pci
[835088.061546] scsi host2: uas_eh_device_reset_handler success
[835088.061731] scsi 2:0:0:0: tag#0 uas_eh_abort_handler 0 uas-tag 1 inflight: CMD 
[835088.061736] scsi 2:0:0:0: tag#0 CDB: Test Unit Ready 00 00 00 00 00 00
[835088.061738] scsi host2: uas_eh_device_reset_handler start
[835088.064895] usb 2-2: cmd cmplt err -2
[835088.336725] usb 2-2: reset high-speed USB device number 11 using ehci-pci
[835088.493514] scsi host2: uas_eh_device_reset_handler success
[835088.493522] scsi 2:0:0:0: Device offlined - not ready after error recovery
[835088.493546] scsi 2:0:0:0: rejecting I/O to offline device


This is what I see when connecting the Ugreen enclosures (I have 2). At this point I'm pretty sure this has to be some incompatibility issue between this Ugreen enclosure and Kubuntu or the passthrough.

 

Update 4:

 

It is a passthrough issue!

When I passthough a USB controller to the VM and then attach to Ugreen USB enclosure to this controller, the HDD shows up immediately. Not sure if this is a general passthrough issue or somehow related to this plugin.

 

Thank you!

Edited by Tom082

  • 4 weeks later...

Fix common problems warns me of this on Unraid 7.1.1:

 

Quote

The plugin libvirt.hotplug.usb.plg is not known to Community Applications and is possibly incompatible with your server

 

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...

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.