[Lxc-users] automount in the container

2010-09-24 Thread Helmut Lichtenberg
Hi, I set up my first container and want to mount the home directories for the users with automount/autofs5. During installation of autofs5 in the container, it complained that it can't create /dev/autofs. Create this node with mknod was possible but did not help. When I want to step into the

Re: [Lxc-users] automount in the container

2010-09-24 Thread Daniel Lezcano
On 09/24/2010 09:02 AM, Helmut Lichtenberg wrote: Hi, I set up my first container and want to mount the home directories for the users with automount/autofs5. During installation of autofs5 in the container, it complained that it can't create /dev/autofs. Create this node with mknod was

Re: [Lxc-users] automount in the container

2010-09-24 Thread Helmut Lichtenberg
Hi Daniel, Daniel Lezcano schrieb am 24. Sep 2010 um 10:05:23 CEST: Can you check if adding the following line in /var/lib/lxc/name/config fix your problem ? lxc.cgroup.devices.allow = c 10:52 rwm # dev/autofs it helped so far, that autofs5 installs without error an /dev/autofs will be

Re: [Lxc-users] automount in the container

2010-09-24 Thread Daniel Lezcano
On 09/24/2010 12:31 PM, Helmut Lichtenberg wrote: Some more experiments: The last lines of an strace look like this: r...@cc2,~: strace ls -l /net/fs-v1 [...] open(/usr/lib/gconv/gconv-modules.cache, O_RDONLY) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=26048, ...}) = 0 mmap(NULL, 26048,

Re: [Lxc-users] automount in the container

2010-09-24 Thread Daniel Lezcano
On 09/24/2010 12:31 PM, Helmut Lichtenberg wrote: Some more experiments: The last lines of an strace look like this: r...@cc2,~: strace ls -l /net/fs-v1 [...] open(/usr/lib/gconv/gconv-modules.cache, O_RDONLY) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=26048, ...}) = 0 mmap(NULL, 26048,

[Lxc-users] Running LXC containers on a laptop

2010-09-24 Thread matto fransen
Hi, When I use br0 on my laptop (with wifi connection) I can connect from the container to the laptop, but not outside the laptop. What is the most easy way to setup wlan0 as gateway for the containers? Thanx! Matto

Re: [Lxc-users] Running LXC containers on a laptop

2010-09-24 Thread Sebastien Pahl
Hi, you need to setup snat or masquerading if you want your containers to access the network. # sysctl -w net.ipv4.ip_forward=1 snat (you need your ): # iptables -t nat -A POSTROUTING -o wlan0 -j SNAT --to-source=WLAN0_IP OR masquerading: # iptables -t nat -A POSTROUTING -o wlan0 -j

Re: [Lxc-users] Running LXC containers on a laptop

2010-09-24 Thread Daniel Lezcano
On 09/24/2010 05:17 PM, Sebastien Pahl wrote: Hi, you need to setup snat or masquerading if you want your containers to access the network. # sysctl -w net.ipv4.ip_forward=1 snat (you need your ): # iptables -t nat -A POSTROUTING -o wlan0 -j SNAT --to-source=WLAN0_IP OR masquerading:

Re: [Lxc-users] Running LXC containers on a laptop

2010-09-24 Thread Sebastien Pahl
On Fri, Sep 24, 2010 at 17:21, Daniel Lezcano daniel.lezc...@free.fr wrote: On 09/24/2010 05:17 PM, Sebastien Pahl wrote: Hi, you need to setup snat or masquerading if you want your containers to access the network. # sysctl -w net.ipv4.ip_forward=1 snat (you need your ): # iptables -t

Re: [Lxc-users] Running LXC containers on a laptop

2010-09-24 Thread Scott Bronson
I'm lazy too, that's why I let libvirt set up and maintain networking for me. apt-get install libvirt Now, set up your guests with: lxc.network.type=veth lxc.network.link=virbr0 lxc.network.flags=up and NATing should just work. FWIW. - Scott

Re: [Lxc-users] Running LXC containers on a laptop

2010-09-24 Thread Sebastien Pahl
I never tried libvirt (I guess all this XML scares me a bit:-P). Are there any good examples of how to use it with lxc? On Fri, Sep 24, 2010 at 17:38, Scott Bronson bron...@rinspin.com wrote: I'm lazy too, that's why I let libvirt set up and maintain networking for me. apt-get install libvirt

Re: [Lxc-users] Running LXC containers on a laptop

2010-09-24 Thread matto fransen
Hi, On Fri, Sep 24, 2010 at 05:20:04PM +0200, Daniel Lezcano wrote: On my host I have also in /etc/network/interfaces: auto br0 iface br0 inet static address 172.20.0.1 netmask 255.255.255.0 bridge_stp off bridge_maxwait 5 pre-up /usr/sbin/brctl addbr br0

Re: [Lxc-users] Running LXC containers on a laptop

2010-09-24 Thread Scott Bronson
On Fri, Sep 24, 2010 at 8:44 AM, Sebastien Pahl s...@dotcloud.com wrote: I never tried libvirt (I guess all this XML scares me a bit:-P). Are there any good examples of how to use it with lxc? Agreed, but if you just use libvirt's network setup and not the rest of it, no need to touch XML. It

Re: [Lxc-users] automount in the container

2010-09-24 Thread Daniel Lezcano
On 09/24/2010 03:03 PM, Daniel Lezcano wrote: On 09/24/2010 12:31 PM, Helmut Lichtenberg wrote: Some more experiments: The last lines of an strace look like this: r...@cc2,~: strace ls -l /net/fs-v1 [...] open(/usr/lib/gconv/gconv-modules.cache, O_RDONLY) = 3 fstat(3,