Virtual Machine and Bluetooth dongle losing connection

Hello
I have a HA install running on a VM install on my windows workstation.
Used Hyper-V for a long time, until i started experimenting with LD2410B mmwave sensors (to control lights) over Bluetooth and wanted to use my realtek-bluetooth dongle and realized Hyper-V and USB pass-through isn’t working…

So i moved my install to vmware, It seemed fine at first, only thing was that the dongle would disconnect after 1-2 hours and needed to restart the vm to get it working again…

So now I’m on Virtualbox.
It is more stable. but still get the same connection issue as seen below

I tried all sorts of “fixes” like adding adapter after ha is booted, pass-through via USB hub, auto connect hard-coded in vm instance and some other stuff…
Im about to order a new dongle with the home to get a more compatible one (and to get better range).
But before I do i throw this out there to see if anyone of you had similar problems and maybe know of a workaround?

I will try to move to a dedicated machine for HA some day, but for now VM is the way to go.
Already have some docker instances and a plex server so computer is always on anyway.

I’m having the same issue. I’m running ha on VirtualBox VM. But I had many months of reliable bluetooth connectivity until recently. My host PC is windows pro 10. The bluetooth adapter is a Realtek. I see the following in the log:
Log Details (WARNING)

Logger: bluetooth_auto_recovery.recover
Source: components/bluetooth/util.py:78
First occurred: 3:08:22 PM (117 occurrences)
Last logged: 3:54:47 PM

  • Bluetooth adapter hci0 [00:00:00:00:00:00] could not be reset:
  • Closing Bluetooth adapter hci0 [00:00:00:00:00:00] failed: [Errno 9] Bad file descriptor
  • Could not determine the power state of the Bluetooth adapter hci0 [00:00:00:00:00:00] due to timeout after 5 seconds
  • Could not cycle the Bluetooth adapter hci0 [00:00:00:00:00:00]: [Errno 110] Operation timed out

Logger: bluetooth_auto_recovery.recover
Source: runner.py:179
First occurred: 3:08:58 PM (30 occurrences)
Last logged: 3:56:27 PM

Bluetooth management socket connection lost: [Errno 22] Invalid argument

I have no solution to date.

:+1:
I added “custom bluetooth tracker” to my HA which is on VM.
Now it was working properly

ScreenShot_20230818213739

Im having the same problem with the built-in bluetooth but it also happens with Zigbee SkyConnect dongle. I’m running Home Assistant OS on VirtualBox in a Intel NUC with Windows 10.

I set my skyconnect for my VM to port 0001 and remote in the drop down to any to keep it locked to the same port:

image

image

and did the same for the intel one that was showing up:

image

My nuc is running W11 currently. I have yet to retest any bluetooth dongle as I have yet to buy another one after testing the two I had when I was trying to diagnose why they were failing to show up in my VM (will prob go the network proxy route via an esp32 setup instead of usb if I can’t get a usb dongle to work in my setup as they issue was they were getting errored out at the driver level on the host anyway when looking at device manager at the time).