Z
Z
zotovp2020-04-12 17:41:24
Bluetooth
zotovp, 2020-04-12 17:41:24

How to forward in LXD (Ubuntu 18.04) HCI0 (Bluetooth) inside the container?

Good afternoon! Can someone tell me something: I have
a host on Ubuntu 18.04, I use LXD on it and I want the hci0 device to be available inside the container. All my attempts have led to the fact that the device itself is inside the container, but the bluetoothd service does not see it when it starts.
What I did:
-created a container
-added two parameters to the container configuration:
1. security.nesting: "true"
2. security.privileged: "true"
-also tried to forward the device itself:
blue:
productid: "8087"
type: usb
vendorid: 0a2b
what I see inside the container:

#ls -la /sys/class/bluetooth/hci0
lrwxrwxrwx 1 root root 0 Apr 12 15:36 /sys/class/bluetooth/hci0 -> ../../devices/pci0000:00/0000:00:14.0/usb1/1-14/1-14:1.0/bluetooth/hci0


service bluetooth status
● bluetooth.service - Bluetooth service
   Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:bluetoothd(8)

bluetoothd[3129]: Adapter handling initialization failed
systemd[1]: bluetooth.service: Main process exited, code=exited, status=1/FAILURE
systemd[1]: bluetooth.service: Failed with result 'exit-code'.
systemd[1]: Starting Bluetooth service...
bluetoothd[11817]: Bluetooth daemon 5.48
systemd[1]: Started Bluetooth service.
bluetoothd[11817]: Failed to access management interface
bluetoothd[11817]: Adapter handling initialization failed
systemd[1]: bluetooth.service: Main process exited, code=exited, status=1/FAILURE
systemd[1]: bluetooth.service: Failed with result 'exit-code'.


#hciconfig hci0
Can't open HCI socket.: Address family not supported by protocol


If anyone has any thoughts on this, please share!
Thanks in advance!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question