[6.12.8] USB device deselected from VM passthrough after server reboot


Recommended Posts

Hi all,

 

I have a problem with the USB passthrough to a Linux VM (Home Assistant). My Bluetooth dongle, a Cambridge Silicon adapter, is always being unselected in the VM configuration after I do a reboot of the server. I have a Sonoff Zigbee dongle which works just fine. It is selected via the same procedure.

I have already tried switching the USB port and connecting the Bluetooth dongle to the same controller as the Zigbee dongle. Unfortunately, the result remains unchanged.

The device is listed as "(HCI mode"). Does this play any role in this case?
Moreover, I have noticed that once I apply the settings in the VM config and then refresh the page, both main and optional are checked in the menu, altough I only selected the device only inside the left column in the first place:

 

unraid-vm-usb.thumb.png.9161f394a95b2e9ff65bebb8dac4d196.png

 

Any idea why this is happening?
Appreciate your help!

 

Kind regards

Edited by Gemuesefraumann
Link to comment
  • Gemuesefraumann changed the title to [6.12.8] USB device deselected from VM passthrough after server reboot
23 hours ago, Gemuesefraumann said:

Hi all,

 

I have a problem with the USB passthrough to a Linux VM (Home Assistant). My Bluetooth dongle, a Cambridge Silicon adapter, is always being unselected in the VM configuration after I do a reboot of the server. I have a Sonoff Zigbee dongle which works just fine. It is selected via the same procedure.

I have already tried switching the USB port and connecting the Bluetooth dongle to the same controller as the Zigbee dongle. Unfortunately, the result remains unchanged.

The device is listed as "(HCI mode"). Does this play any role in this case?
Moreover, I have noticed that once I apply the settings in the VM config and then refresh the page, both main and optional are checked in the menu, altough I only selected the device only inside the left column in the first place:

 

unraid-vm-usb.thumb.png.9161f394a95b2e9ff65bebb8dac4d196.png

 

Any idea why this is happening?
Appreciate your help!

 

Kind regards

Could you post diagnostics

Link to comment

Maybe I should add: The dongle is working flawlessly in my Home Assistant VM once I reassign the adapter in the VM configuration after system reboot. The issue is that it always reverts back and removes the dongle from the selected devices once the system reboots or the array is restarted.

 

Both my Zigbee Dongle as well as a USB soundcard I tried the other day are being applied permanently and presist in the VM configuration even after reboot. The issue thus appears to be somehow specific to the bluetooth dongle. I just don't get why the selection of that device resets all the time. Since it does also occur after restarting the array, I don't think that it is related to something like the USB power management, boot order or something.

 

Do you think excluding the device from the host is the solution here?

 

 

Link to comment
10 hours ago, Gemuesefraumann said:

Maybe I should add: The dongle is working flawlessly in my Home Assistant VM once I reassign the adapter in the VM configuration after system reboot. The issue is that it always reverts back and removes the dongle from the selected devices once the system reboots or the array is restarted.

 

Both my Zigbee Dongle as well as a USB soundcard I tried the other day are being applied permanently and presist in the VM configuration even after reboot. The issue thus appears to be somehow specific to the bluetooth dongle. I just don't get why the selection of that device resets all the time. Since it does also occur after restarting the array, I don't think that it is related to something like the USB power management, boot order or something.

 

Do you think excluding the device from the host is the solution here?

 

 

So the USB device is remove from the VM in the template?

 

How do you re-add the device to the xml. You could try using my USB Manager and see if that fixes you issue. Not sure why the template option does not work. If you can provide screen shots before and after, also a new syslog just after you start the VM.

 

Example settings below for a USB Bluetooth device. If you use this method you dont need to have in VM template.

 

image.png

 

image.png

Link to comment
Posted (edited)
On 3/23/2024 at 8:18 AM, SimonF said:

So the USB device is remove from the VM in the template?

The device is still visible but unselected in the GUI after reboot or array restart.

There is also a strange phenomenon with that editor that always applies the "optional" tag once I save and refresh the page.

 

Here is what the XML looks like:

    <hostdev mode='subsystem' type='usb' managed='no'>
      <source startupPolicy='optional'>
        <vendor id='0x0a12'/>
        <product id='0x0001'/>
        <address bus='1' device='2'/>
      </source>
      <alias name='hostdev1'/>
      <address type='usb' bus='0' port='3'/>
    </hostdev>

 

The optional-policy seems to apply the following rule (accoding to this post):

 

Quote

optional | drop if missing at any start attempt

 

No idea if this is relevant for this issue.

 

 ---

In the meantime I also installed your USB Manage and it looks like that has solved the issue. I have attached my USB devices to the VM only through the Manager now and the connection is correctly being established even after reboot.

 

Thank you very much for your kind support and the development of that great tool! :)

 

 

 

Edited by Gemuesefraumann
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.