VM keeps dropping connected USB device


Recommended Posts

Hi Guys,

 

Just wondering if anyone would be able to help me with the issue I am currently experiencing.

 

I have a Windows 10 VM currently running on my UNRAID Server. On this Windows 10 VM I have some software running which interacts with my home Weather Station.

 

The indoor unit of this weather station is currently plugged into my UNRAID server and has been passed through to my Windows 10 VM. 

 

The issue I am having is that the indoor unit works great with the USB pass through for only a couple of days before it randomly just disconnects. To reconnect the indoor unit I must untick the check box under 'USB Devices' in the VM settings. Whilst doing that I do receive a 'VM Creation Error' which states the following, "error: Failed to attach device from /tmp/hotattach.tmp error: internal error: cannot parse product 0x0003#remove". Once clicking 'OK' to that error, I re-tick the USB device under the VM settings again and the indoor unit starts operating as normal. 

 

I have also noticed the following error in the VM logs everytime the USB device disconnects: "libusb: error [udev_hotplug_event] ignoring udev action bind".

 

Has anyone else experienced a similar issue with their USB passthrough?

 

Any help will be greatly appreciated. 

Link to comment

There are a few views on this but no replies.  I will say that I personally have seen disconnect issues, but I don't use individual device passthrough.  I pass through the controller, and sometimes see a disconnect/reconnect when transferring large files (that breaks the transfer) but it always reattaches the device.  

 

Have you tried passing through the controller?  It should at least easily facilitate the reconnect when it drops.  No need to buy another controller, you can pass through one of the controllers on your mobo.

  • Like 1
Link to comment

It isn't.  There are guides like this one here: https://forums.unraid.net/topic/35112-guide-passthrough-entire-pci-usb-controller/

However it isn't very up-to-date.  Here's the typical process:

Go to /Tools/SysDevs and look for your USB controllers.  You're looking for all USB controllers.  An example would be 

[1022:145c] 09:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) USB 3.0 Host Controller

You can also buy PCI->USB expansion cards to more easily find a USB controller.

Next is to follow the linked guide, and find out what USB ports map to what buses.  This is important for your motherboard, but not as important if you bought your own USB card.

Map any of the controllers (your expansion card OR a controller on your motherboard that is NOT the same bus your Unraid flash drive is on) to the ports it controls.

In your flash drive config, add the line 

vfio-pci.ids=1022:145c

between "append" and any other configs (like isolcpus) but replace the 8-digit value with the corresponding 8-digit PCI identifier you pulled in our first step.

Reboot your rig, and note in your VM config that the USB controller should now be on the list of passable devices at the bottom.

 

Sorry for errors in the guide, a few drinks in.  YMMV

Link to comment

Looks like passing through the controller might of done the job!

 

USB connection has been running since Sunday without any drop outs, will post if I come across any issues again.

 

Thanks for the advice mate, appreciated!

Link to comment
  • 1 year later...

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.