<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">In lxc version 1, it was easy to have access to a connected usb phone in a lxc container:<div class="">Add following in the lxc container config:</div><div class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">lxc.cgroup.devices.allow = c 189:* rwm  # dev/bus/usb</span></div></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">lxc.mount.entry = /dev/bus/usb dev/bus/usb none bind,optional,create=dir</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div></span></div><div class="">But for some reason, when upgrading to lxc 2 (either on debian Stretch, or Debian Jessie with backports) the phone device is not accessible anymore, expect when you run </div><div class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">lxc-device add -n node02 /dev/bus/usb/xxx/yyy</span></div></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">(or with some udev rules to create a fixed link: </span>lxc-device add -n jenkins02 /dev/Samsung-Galaxy-S4)</div><div class=""><br class=""></div><div class="">Installed lxc version:</div><div class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Debian Jessie: 2.0.7-2~bpo8+1</span></div></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Debian Stretch: </span>2.0.7-2+deb9u1</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Debian Jessie: </span>1.0.6-6+deb8u6 (that one works..)</div><div class=""><br class=""></div><div class="">What is the reason for needing to run the lxc-device add command?</div><div class="">For some reason, sometimes the phone seems to reconnect, causing it to get a different path, and being not available anymore in the container, until being re-added.</div><div class=""><br class=""></div><div class="">The pro of the situation is that it is possible to assign usb connected phones to different lxc containers, but as it is hard to check from the host if a phone is still connected properly to the lxc container, it is hard to rerun the lxc-device command.</div><div class=""><br class=""></div></body></html>