[lxc-users] Making a container behave like a VM(ish)

Dwight Engen dwight.engen at oracle.com
Tue Mar 11 19:49:09 UTC 2014


On Tue, 11 Mar 2014 15:18:52 +0000
Tom Taylor <tom at tommyt.co.uk> wrote:

> There are two things missing that I'm wondering if it would be
> possible to emulate in someway ...
> 
> Firstly is the memory, even when you restrict the amount of RAM
> available to a container, userspace can still see the whole RAM of
> the box?  Is it possible to make this look realistic?

I believe libvirt-lxc mounts a fuse fs to make /proc/meminfo look
"realistic" inside the container, but I don't know which values it
modifies. You can use lxc-info from outside to check on actual memory
use.

> Secondly there is no root device when you do a df.  I guess I need to
> generate an mtab somewhow but I'm not sure what to put in there.
> 
> The reason I'm after these is I have developers writing code and they
> like to keep an eye on memory and disk usage (well they do when they
> run out anyway) and commands like this don't really behave like they
> would in a normal system.
> 
> Does that make sense?



More information about the lxc-users mailing list