[Lxc-users] usb devices

Nirmal Guhan vavatutu at gmail.com
Thu Aug 5 21:47:34 UTC 2010


On Tue, Aug 3, 2010 at 1:22 AM, Toby Corkindale
<toby.corkindale at strategicdata.com.au> wrote:
> On 03/08/10 17:44, Nirmal Guhan wrote:
>> On Mon, Aug 2, 2010 at 6:07 PM, Toby Corkindale
>> <toby.corkindale at strategicdata.com.au>  wrote:
>>> On 03/08/10 09:04, Nirmal Guhan wrote:
>>>> 4) Hot swap does not work within the container. After usb device is
>>>> reinserted, container cannot recognize it but host can.
>>>> 5) "mount" within the container  always displays just one single line
>>>> while I have few more in fstab including the above /media stuff.
>>>>        none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
>>>
>>> Again, that's because of the way LXC works with the filesystem.
>>>
>>> Perhaps you could just bind-mount the whole /media directory into the
>>> guest containers, to their /media directory? That might work better for
>>> you, although still not quite what you want.
>>
>> Thanks Toby. I doubt if this will address #1 and #4 above. Basically,
>> how to make hot swap work? Or what are the workaround to get
>> notifications if I have to manually mount/umount.
>
>
> I think you would need to adjust the devices permissions for your
> container, for the usb nodes.. but I'm not sure.. then the container
> could talk to the USB devices over USB, and handle the hotswapping.
> However I'd expect conflicts to occur with the host trying to talk to
> the same device.
> Try adding this to your config file?
>
> lxc.cgroup.devices.allow = c 189:* rwm
>
> I'm no expert and I haven't tried this myself, mind, so you might prefer
> to wait for someone more qualified to answer.
>
> -Toby
>
Can you explain what this config means and 189 in particular? I tried
this but did not help in hot swap. I believe that is because udev is
not supported within the container and yes, you are correct about
host/guest accessing the same device.

Any plans to support udev and usb pass-through in lxc ?

--Nirmal




More information about the lxc-users mailing list