Re: [Lxc-users] Mount /dev/shm of the host inside a container

2012-01-10 Thread Gordon Henderson
On Tue, 10 Jan 2012, Daniel Lezcano wrote: On 01/10/2012 01:39 AM, Fred Finkelstein wrote: I finally found it with the help of the #lxcontainers irc channel. I have to replace this in lxc.fstab: /dev/shm /dev/shm bind 0 0 with this: /dev/shm /srv/shm none bind 0 0 and I can access it.

Re: [Lxc-users] PostgreSQL - sh: cannot create /dve/null: Permission denied - LXC Issue?

2011-12-24 Thread Gordon Henderson
On Tue, 20 Dec 2011, Patrick Kevin McCaffrey wrote: I'm running into this issue when trying to set up a PostgreSQL server inside one of my containers. The Postgre mailing list seems suspect of my LXC setup, so I thought I'd see if anyone has any input. The outline of my problem is below.

Re: [Lxc-users] Container size minialisation

2011-12-12 Thread Gordon Henderson
On Mon, 12 Dec 2011, István Király - LaKing wrote: Hi folks. I'm trying to compose a system, where lxc containers behave like virtual hosts for a web server. As next step I would like to minimize container size. My question is, what the best, most elegant and fail proof  technique for

Re: [Lxc-users] lxc-destroy does not destroy cgroup

2011-12-12 Thread Gordon Henderson
On Thu, 8 Dec 2011, Arie Skliarouk wrote: When I tried to restart the vserver, it did not came up. Long story short, I found that lxc-destroy did not destroy the cgroup of the same name as the server. The cgroup remains visible in the /sys/fs/cgroup/cpu/master directory. The tasks file is

Re: [Lxc-users] lxc-destroy does not destroy cgroup

2011-12-11 Thread Gordon Henderson
On Sun, 11 Dec 2011, Arie Skliarouk wrote: When I tried to restart the vserver, it did not came up. Long story short, I found that lxc-destroy did not destroy the cgroup of the same name as the server. The cgroup remains visible in the /sys/fs/cgroup/cpu/master directory. The tasks file is

Re: [Lxc-users] lxc-destroy does not destroy cgroup

2011-12-08 Thread Gordon Henderson
On Thu, 8 Dec 2011, Arie Skliarouk wrote: When I tried to restart the vserver, it did not came up. Long story short, I found that lxc-destroy did not destroy the cgroup of the same name as the server. The cgroup remains visible in the /sys/fs/cgroup/cpu/master directory. The tasks file is

Re: [Lxc-users] lxc-destroy does not destroy cgroup

2011-12-08 Thread Gordon Henderson
On Thu, 8 Dec 2011, Arie Skliarouk wrote: On Thu, Dec 8, 2011 at 14:05, Gordon Henderson gor...@drogon.net wrote: On Thu, 8 Dec 2011, Arie Skliarouk wrote: When I tried to restart the vserver, it did not came up. Long story short, I found that lxc-destroy did not destroy the cgroup

Re: [Lxc-users] LXC Container: Network Configuration

2011-12-01 Thread Gordon Henderson
On Thu, 1 Dec 2011, Patrick Kevin McCaffrey wrote: Thanks a bunch, Gordon. I ran route -n inside the container, as saw there was no gateway. Assigning 192.168.80.1 (the address of br0) as the default gateway inside the container works beautifully. I think sometimes we overlook the

[Lxc-users] Host crash after oom killer in a container...

2011-11-24 Thread Gordon Henderson
I've noticed a few oddities recently which has resulted in me needing to reboot (and in once case power cycle) a server which isn't good... I've recently start to set the memoy linits - e.g. lxc.cgroup.memory.limit_in_bytes = 1024M lxc.cgroup.memory.memsw.limit_in_bytes = 1024M That, as

Re: [Lxc-users] NTP in a LXC

2011-11-22 Thread Gordon Henderson
On Tue, 22 Nov 2011, Jeremy MAURO wrote: Hi everyone Is it relevant to setup ntpd on the lxc container? Probably not.. And has anyone setup a ntp-server on a lxc container? Yes, but only by accident. Remember that we only have one kernel here, so I suspect it's a good idea to only have

[Lxc-users] Stats 'n' Stuff

2011-11-12 Thread Gordon Henderson
I'm looking for ways to get stats out of each container on a host - the sort of stuff I'm after is the bandwidth of the network interface and cpu cycles. On the CPU monitoring front there is /cgroup/xxx/cpuacct.stat, memory from memory.usage_in_bytes and memory.memsw.usage_in_bytes ... But

Re: [Lxc-users] Stats 'n' Stuff

2011-11-12 Thread Gordon Henderson
On Sat, 12 Nov 2011, Matt Franz wrote: Yes. The random Ethernet device names make monitoring with munin zenoss or whatever very painful. One of the nice features of openvz is that it uses the container ID in the device name which will be consistent across container reboots and also

Re: [Lxc-users] moving LXC containers to a new server

2011-11-06 Thread Gordon Henderson
On Sun, 6 Nov 2011, Geordy Korte wrote: Hello all, Just a quick question. I have LXC running on a server and have purchased a new server. Now I would like to copy the LXC's to the new server. Do I need to do anything special with the cgroups or just copy the containers from /var/lib/lxc and

Re: [Lxc-users] mknod after instance creation?

2011-11-05 Thread Gordon Henderson
On Sat, 5 Nov 2011, Daniel Lezcano wrote: On 11/05/2011 12:06 AM, Dong-In David Kang wrote: Hi, Is it possible to do mknod after creation of an LXC instance? I need to do mknod not only at bootup time, but also at run-time. This is needed when I want to dynamically add devices to LXC

Re: [Lxc-users] mknod inside a container

2011-11-04 Thread Gordon Henderson
On Fri, 4 Nov 2011, Daniel Lezcano wrote: On 11/04/2011 03:34 PM, Gordon Henderson wrote: I have a container that's used to build a Linux image for an embedded device - and as part of the build script, it creates /dev/ via a sequence of mknod commands Which all fail

[Lxc-users] Startup scripts [Was: Re: security question]

2011-08-21 Thread Gordon Henderson
On Sat, 20 Aug 2011, John wrote: Hi, very interested in this. I've been using LXC for a while but only to segregate functions on my own servers. I am well aware of how delicate the LXC setup is when considering security. For example, unless I customise the init scripts a container can bring

Re: [Lxc-users] Startup scripts [Was: Re: security question]

2011-08-21 Thread Gordon Henderson
On Sun, 21 Aug 2011, John wrote: On 21/08/11 18:01, Gordon Henderson wrote: I've been using the file-rc boot script mechanisms rather than the sysv-rc system for LXC containers. That might seem like a step backwards, but actually, it's fine and gives you much finer ( easier IMO) control over

Re: [Lxc-users] LXC and Tun/Tap ?

2011-07-21 Thread Gordon Henderson
On Thu, 21 Jul 2011, Daniel Lezcano wrote: On 07/13/2011 06:40 PM, Gordon Henderson wrote: ISTR that about a year ago tun/tap use inside an LXC container wasn't possible... Just wondering if things have changed? No nothing was done around that. As the thread is old, can you recall what you

[Lxc-users] Containers in NFS, or ...

2011-07-21 Thread Gordon Henderson
A few months ago there were some posts about running containers in a diskless host - just looking for some more info about this in my ponderous ponderings! I'm not after having a diskless host (although it's an option), but to have a host NFS mount a filesystem of a container, then start

[Lxc-users] LXC and Tun/Tap ?

2011-07-13 Thread Gordon Henderson
ISTR that about a year ago tun/tap use inside an LXC container wasn't possible... Just wondering if things have changed? Thanks, Gordon -- AppSumo Presents a FREE Video for the SourceForge Community by Eric Ries, the

Re: [Lxc-users] LXC vs ESX

2011-06-04 Thread Gordon Henderson
On Sat, 4 Jun 2011, Ulli Horlacher wrote: I have now coupled both: The F*EX service http://fex.uni-stuttgart.de/index.html runs on Ubuntu in LXC on ESX. The throuput is as expected the same as with Ubuntu on ESX alone. LXV vs. ESX not withstanding, it's an intersting concept... However I

Re: [Lxc-users] LXC vs ESX

2011-06-04 Thread Gordon Henderson
On Sat, 4 Jun 2011, Ulli Horlacher wrote: On Sat 2011-06-04 (11:38), Gordon Henderson wrote: However I guess it's just for university types - those with the benefits of Gb upload speeds... The poor people without that benefit - and the majority will have sub 1Mb/sec upload speeds Many home

[Lxc-users] Output of 'top' with lxc.cgroup.memory.limit_in_bytes set?

2011-05-22 Thread Gordon Henderson
I think this has been on the list before, but my arching search is failling me... I've got containers working with memory limitations using lxc.cgroup.memory.limit_in_bytes and lxc.cgroup.memory.memsw.limit_in_bytes and I can prove that it's working by writing a program to malloc memory and

Re: [Lxc-users] Output of 'top' with lxc.cgroup.memory.limit_in_bytes set?

2011-05-22 Thread Gordon Henderson
On Sun, 22 May 2011, Gordon Henderson wrote: I think this has been on the list before, but my arching search is failling me... I've got containers working with memory limitations using lxc.cgroup.memory.limit_in_bytes and lxc.cgroup.memory.memsw.limit_in_bytes and I can prove that it's

Re: [Lxc-users] disk limit?

2011-05-19 Thread Gordon Henderson
On Wed, 18 May 2011, Serge Hallyn wrote: dd if=/dev/zero of=/srv/container1.rootfs.img bs=1M skip=1 count=1 That ought to be seek=1, not skip. (you skip the input, seek the outout) I'm not a fan of this though - if you create the image file(s) using dd there is a good chance it's

Re: [Lxc-users] mapping host PID - container PID

2011-04-28 Thread Gordon Henderson
On Thu, 28 Apr 2011, Ulli Horlacher wrote: Is there a way to get the corresponding host PID for a container PID? For example: inside the the container the process init has always PID 1. But what PID has this process in the host process table? ps aux | grep ... is not what I am looking for,

[Lxc-users] LXC and sched_setscheduler ?

2011-04-10 Thread Gordon Henderson
I have a program that calls sched_setscheduler - however it fails when run inside a container - it doesn't overly impact anything, but I'm wondering if it's because I've missed something or that it's just not supported? Any clues? Gordon

Re: [Lxc-users] Moving lxc containers

2011-04-08 Thread Gordon Henderson
On Sun, 27 Mar 2011, Amit Uttamchandani wrote: I'm just wondering what the best way is to move an lxc container? Can I just tar the root filesystem and untar it on another system? Or should I rsync it over? I understand that before doing any of the above, the container should be shutdown

Re: [Lxc-users] limiting RAM usage and disk space usage

2010-12-03 Thread Gordon Henderson
On Fri, 3 Dec 2010, Matt Rechenburg wrote: Hi Lxc team, actually I would vote against a loop mount. I would vote to allow the local systems administrator the choice of what suits them best. And since there's no reason to explicitly block loopback mounts, then don't do it. Much easier and

Re: [Lxc-users] limiting RAM usage and disk space usage

2010-12-03 Thread Gordon Henderson
On Fri, 3 Dec 2010, Serge E. Hallyn wrote: Quoting Matt Rechenburg (m...@openqrm.com): Hi Lxc team, actually I would vote against a loop mount. Note that this wouldn't take the place of LVMs :) But since LVMs require you to have installed your distro in a particular way to begin with (or

Re: [Lxc-users] limiting RAM usage and disk space usage

2010-12-02 Thread Gordon Henderson
On Mon, 29 Nov 2010, Trent W. Buck wrote: Siju George sgeorge...@gmail.com writes: 1) how do I limit the RAM usage of a container? In lxc.conf(5): lxc.cgroup.memory.limit_in_bytes = 256M lxc.cgroup.memory.memsw.limit_in_bytes = 1G 2) how do I limit the disk usage of a container ?

[Lxc-users] LXC and IPv6

2010-11-18 Thread Gordon Henderson
Anyone tried LXC with IPv6? Any reason it shouldn't just work? Cheers, Gordon -- Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 L3. Spend

[Lxc-users] Container Filesystem in a file (loopback mount)

2010-09-30 Thread Gordon Henderson
Looking to put hard limits on a containers filesystem size by creating a fixed-length file, putting a filesystem in it, loopback mounting it, then using that as the containers root ... I've not tried it yet, but wondering if anyone has done anything like this? Any pitfalls? (Other than maybe

Re: [Lxc-users] Container Filesystem in a file (loopback mount)

2010-09-30 Thread Gordon Henderson
On Thu, 30 Sep 2010, Daniel Lezcano wrote: On 09/30/2010 11:04 AM, Gordon Henderson wrote: Looking to put hard limits on a containers filesystem size by creating a fixed-length file, putting a filesystem in it, loopback mounting it, then using that as the containers root ... I've

Re: [Lxc-users] Cannot start a container with a new MAC address

2010-08-27 Thread Gordon Henderson
On Fri, 27 Aug 2010, Sebastien Douche wrote: I created a container with an interface. I stop it, I change the MAC address, restart it: lxc-start: ioctl failure : Cannot assign requested address lxc-start: failed to setup hw address for 'eth0' lxc-start: failed to setup netdev lxc-start:

Re: [Lxc-users] Firewalling ...

2010-07-02 Thread Gordon Henderson
- Original Message - From: Gordon Henderson gor...@drogon.net To: lxc-users@lists.sourceforge.net Sent: Friday, July 2, 2010 8:09:52 AM Subject: Re: [Lxc-users] Firewalling ... On Fri, 2 Jul 2010, Daniel Lezcano wrote: On 07/02/2010 03:06 PM, Gordon Henderson wrote: Further to my

Re: [Lxc-users] Benchmarking with LXC

2010-06-13 Thread Gordon Henderson
On Fri, 11 Jun 2010, Richard Thornton wrote: Gordon wrote: Are you sure it's wise to even consider LXC here? And can one PC really keep up with 20Gb/sec of Ethernet traffic? i.e. How do you know the bottleneck here won't be the PC rather than the firewall appliance... I'd seriously

Re: [Lxc-users] Benchmarking with LXC

2010-06-10 Thread Gordon Henderson
On Thu, 10 Jun 2010, Richard Thornton wrote: Hi, I wish to use netperf to benchmark a firewall appliance but I only want to use a single physical 10GbE adapter. So I have my PC and the firewall. I wasy thinking two LXC containers, netperf-client and netperf-server, basically I want to

Re: [Lxc-users] Copy-on-write hard-link / hashify feature

2010-06-10 Thread Gordon Henderson
On Thu, 10 Jun 2010, John Drescher wrote: BTW, a second option is lessfs. http://www.lessfs.com/wordpress/?page_id=50 What about the KSM kernel option? It's aimed at KVM I think and in the kernel from 2.6.32. See: http://lwn.net/Articles/306704/ and http://lwn.net/Articles/330589/ Not

Re: [Lxc-users] Set default GW

2010-06-09 Thread Gordon Henderson
On Wed, 9 Jun 2010, Bodhi Zazen wrote: Daniel - Thank you for answering, not a big deal. Gordon - Aye, that is what I do for containers. For applications I write an init script #!/bin/bash route add default gw 192.168.0.1 eth0 Additional commands / config service start foo or what

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

2010-06-06 Thread Gordon Henderson
On Sun, 6 Jun 2010, Nirmal Guhan wrote: I want to run my application on fedora as a container and use the libraries (/lib, /usr/lib) from the host (so my application container size is small). I did lxc-create but lxc-execute failed (I had sent a mail earlier on this). Suggestion was to use

Re: [Lxc-users] LXC a feature complete replacement of OpenVZ?

2010-05-13 Thread Gordon Henderson
On Thu, 13 May 2010, Christian Haintz wrote: Hi, At first LXC seams to be a great work from what we have read already. There are still a few open questions for us (we are currently running dozens of OpenVZ Hardwarenodes). I can't answer for the developers, but here's my