-
Notifications
You must be signed in to change notification settings - Fork 291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how can i pass through USB device in docker for windows(Hyper -v ) #3926
Comments
Can you elaborate on exactly the reproduction steps? |
I have the same issue, not sure whether Hyper-V allows USB pass through due to which MobyVM not able to access the devices |
If it is Windows 10, I'm able to USB flash drive after applying the below steps
|
For USB devices which are not for storage, USB over network might be a usable workaround until sharing the devices is supported by default. See https://github.com/ghdl/docker/tree/feat-usbip/usbip. Ref #4105. |
Issues go stale after 90d of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
/remove-lifecycle stale |
Issues go stale after 90d of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
/remove-lifecycle stale |
Issues go stale after 90 days of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
/remove-lifecycle stale |
Issues go stale after 90 days of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
/remove-lifecycle stale |
According to this doc, it's not supported But technically since you pass an id into a windows container, you should be able to do the same with Linux. Just need to figure out how the backend works. |
I could really use this feature if it was added. |
/remove-lifecycle stale |
I would also need this feature. |
Any update? |
Hey I think this is a limitation of windows not necessarily docker so until windows fixes USB devices for WSL you will have to do with usb over IP solutions (which are far from ideal). |
I am researching the use case "firmware development" and since USB passthrough is necessary for attaching programmers and serial I am interpreting that my best approach with a Windows Host will be a hypervisor with good USB passthrough to a Linux VM that then hosts the Docker containers. USB: Windows->VMWare->LinuxVM->Docker->DockerContainer Is this a reasonable interpretation of the state until Windows Docker Desktop benefits from a hypothetical WSL update? |
@JPHutchins it is. However, I'm not sure you can have an hypervisor with good USB passthrough. It that was feasible, I would have expected either Docker or Microsoft to provide that capability already. Alternatively, you might want to patch the LinuxVM for supporting USB/IP. See https://hdl.github.io/containers/ug/index.html#_usbip_protocol_support_for_docker_desktop. The challenge in this case is finding an open source USB/IP tool on Windows, but it works ok if you are good with using a non open source tool. |
/remove-lifecycle stale |
Issues go stale after 90 days of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
/remove-lifecycle stale |
Would recommend this approach: Microsoft Dev Blog: Connecting USB devices to WSL and just pick up those USB devices in WSL2. I'd say until Microsoft officially supports pushing USB devices down to the WSL level this is the best and only approach as the time of writing this. |
USB support in WSL is poorly documented and not solid. It does not as of this writing solve the problem. |
Yes, agreed with the sentiment expressed. Should've added that the only reason I recommended that approach is that it is the only approach I found to go about this problem. |
Issues go stale after 90 days of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
/remove-lifecycle stale |
There hasn't been any activity on this issue for a long time. Prevent issues from auto-closing with a /lifecycle stale |
/remove-lifecycle stale |
There hasn't been any activity on this issue for a long time. Prevent issues from auto-closing with a /lifecycle stale |
Close this wontfix or work on it ... Letting a robot mark it stale is not a response! |
/remove-lifecycle stale |
I see the original poster has not elaborated on the request for information and has probably abandoned this issue. My specific use case is to generalize embedded development environments with a debugger (see segger j-link for an example here). These devices use vendor supplied drivers. I would also be interested in passing through any generic USB device similarly to how you can pass a USB device from the host into a VirtualBox guest OS (this guide is a simplistic overview in general and not specific to a windows host).
What I would like is a way to specify a USB device connected to the host for use (exclusive or not. No preference here) within the container. Let me know what other information is needed. |
Would like to post my thoughts on this. |
There hasn't been any activity on this issue for a long time. Prevent issues from auto-closing with a /lifecycle stale |
/remove-lifecycle stale |
/remove-lifecycle stale |
1 similar comment
/remove-lifecycle stale |
Setup:
Docker for windows version: 18.09.2
Host: Windows 10, Version 1803 (OS build 17134.765)
Container: Linux/Ubuntu container.
Whenever i insert USB device it will not detect on my linux container. I have tried with many docker run command line option(e.g --device, -V : ), But still the behavior is the same.
USB device is detected if my host OS is Ubuntu and windows 7(with docker toolbox). I have also tried to debug this and dump kernel log but there is no log of my USB device.
The text was updated successfully, but these errors were encountered: