[Lxc-users] File sharing between host and container during startup

Daniel Lezcano daniel.lezcano at free.fr
Sun Jun 6 18:16:40 UTC 2010


On 06/04/2010 05:44 PM, Nirmal Guhan wrote:
> Hi,
>
> I tried to extend the fstab as below:
>
> /etc/resolv.conf  /lxc/lenny/rootfs.lenny/etc/
> resolv.conf none bind 0 0
> /test          /testdir  none bind 0 0<--- I added this line
>
> > From the host :
> # ls /testdir
> a  b  c
>
> > From the container :
> [root at test-fedora lenny]# chroot rootfs.lenny/
> test-fedora:/# ls /test
> test-fedora:/#
>
> But when I do lxc-start I get an error as :
> #lxc-start -n lencon
> lxc-start: No such file or directory - failed to mount '/test' on '/testdir'
>
> Basically what am trying to do is to share the host library files (/lib)
> between the containers.
>
> Any clues on the error above? Please let me know. Also, any better way to
> share the files between host and container will be helpful.
>    

Hi Nimal,

I am not sure to understand what you are trying to achieve. You created 
a system container, but you want to launch it as an application 
container. Can you give your use case if possible, so I may be able to 
give more clues on how to set ip up.

Thanks
   -- Daniel




More information about the lxc-users mailing list