USB Devices with Private Beta on OS X

Are there plans to support passing of USB devices to Docker containers via xhyve? For example passing thru an Android device to the container to run commands like ADB.

4 Likes

One thing to note is that the upstream xhyve project specifically says there is no USB support: https://github.com/mist64/xhyve

In the case of adb, it should be possible to do adb over network. If you must use the device’s USB interface, then it may be possible to set up a proxy, but I am by no means an expert on adb-- it just seems like it may be possible.

I’ll go ahead and move this over to the docker-for-mac forum group so the folks working on the beta will chime in if they have anything to add.

Sadly this also means if you want to share your video camera or sound devices you cannot :frowning:

Got a similar problem with the pass through of USB devices. A recognized device simply cannot be mapped. I have tried the following options.

–device /dev/tty.usbserial-A903BD58

% no error. But also not visible working device in the docker

–device=/dev/tty.usbserial-A903BD58:/dev/ttyUSB0

% no error. But also not working

-v /dev/tty.usbserial-A903BD58:/dev/ttyUSB0

% this actually produces an error. like /devtty.usbserial-A903BD58 cannot be shared. And there is no way to mention this in the Docker preferences.

Are there any ideas or plans as to how this can be resolved. Or when you look into fixing this. When we can expect this fix?

My diagnostic ID is: 246100BE-FD68-4671-8F01-B54F414101AC

1 Like

Same issue here. Anybody has successfully run ADB on TCP to workaround this?

Same same.

–device doesn’t seem to be supported :frowning:

Hi @yellowdocker,

I am in the same boat as you - trying to map through a usb serial port. Did you manage to come up with some work around?

The workaround that I have on OSX is to revert back to the docker toolkit for all the stuff that require device mappings from a docker to the physical machine. This is clearly a limitation of the current xhyve component that docker is using.

It is a bit weak, and not even a solution, I agree. But still it works and the toolkit can work nicely in a same environment where you have a docker 1.12 beta running.

Remember that to switch on your USB device in docker toolkit, you also need to switch it on in virtual box!

T.

+1 on all the above comments. Tried with mknod but doesn’t seem to cooperate either:

[root:/work] 1 # mknod ftdi_serial c 18 19
mknod: 'ftdi_serial': Function not implemented

Same here, I have a MacBook Pro Mid-2012 (meaning no Bluetooth 4.0) so I’m trying to run my Docker container with a Bluetooth 4.0 USB Dongle but can’t access it on Docker.

Same here. Looking forward to such a feature.

Same issue for me.
I’m trying to set up container to run android-cts test on device connected to Jenkins slave. Docker container does not see any connected devices.

osx: 10.12.5
docker version: 17.06.0-ce, build 02c1d87

Kinematic allows to enable VM when it start. And I see that VM is being created and active in VirtualBox if I enable this option. However, I could not find proper manual how to force docker to use that VM.