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

Bodhi Zazen bodhi.zazen at montanalinux.org
Fri Jun 4 19:00:42 UTC 2010


You syntax is off

Should be

/testdir /lxc/lenny/rootfs.lenny/test bind 0 0

----- Original Message -----
From: "Nirmal Guhan" <vavatutu at gmail.com>
To: lxc-users at lists.sourceforge.net
Sent: Friday, June 4, 2010 9:44:19 AM
Subject: [Lxc-users] File sharing between host and container during startup

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.

--Nirmal


------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________ Lxc-users mailing list
Lxc-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users




More information about the lxc-users mailing list