[Lxc-users] limiting RAM usage and disk space usage
Serge E. Hallyn
serge.hallyn at canonical.com
Fri Dec 3 07:19:41 UTC 2010
Quoting Michael H. Warfield (mhw at WittsEnd.com):
> > > It seems to me that a little extension to lxc-create which creates
> > > the container inside a loopback fs would be pretty neat.
> >
> > Wouldn't simply adding the rootfs to the fstab conf with the file system
> > image and the "-o loop" option do it? I would think it would. I
> > haven't tried it in lxc but I do it all the time just for general
> > mounting and day to day work.
>
> So this is an excerpt from one of my LXC VM's fstab (I normally use an
> explicit bind mount for them):
>
> /srv/lxc/private/1004 /srv/lxc/rootfs none bind 0 0
>
> Now... Wouldn't this work as well? Untested:
>
> /srv/lxc/private/disk.image /srv/lxc/rootfs none loop 0 0
>
> Seems to me that if the bind option works the loop option should as
> well.
Right, for using the container. lxc-create would presumably need a
loving touch to make it mount that before doing debootstrap
or whatever
-serge
More information about the lxc-users
mailing list