[Lxc-users] usb devices

Toby Corkindale toby.corkindale at strategicdata.com.au
Tue Aug 3 08:22:07 UTC 2010


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




More information about the lxc-users mailing list