[lxc-users] lxc-destroy fails somehow

Serge Hallyn serge.hallyn at ubuntu.com
Fri Mar 14 16:30:12 UTC 2014


Quoting Nels Nelson (nels.n.nelson at gmail.com):
> On Wed, Mar 12, 2014 at 5:16 PM, Serge Hallyn <serge.hallyn at ubuntu.com>wrote:
> >
> > You gave lxc-start '-P /var/lib/lxc/test'.  For lxc-create, you did
> > not give that option, but you gave a custom config file.
> 
> 
> Greetings, Serge,-
> 
> My understanding is that lxc-create will initially create the container
> configuration in /var/lib/lxc/test by default.  Is this not correct?  If it
> is correct, then why couldn't I specify that path for the previously
> created container instance when I start it using the following?
> 
>     # lxc-start -P /var/lib/lxc/test

The path specified with -P is the path *under* which containers sit.
So for all containers under /var/lib/lxc, you would use /var/lib/lxc
as the 'lxcpath' for -P.

	lxc-start -P /var/lib/lxc -n test

If your container is under /opt/lxc, so /opt/lxc/test/rootfs is the
rootfs, then

	lxc-start -P /opt/lxc -n test

> Any recommendations on how to successfully start a lxc
> container whose rootfs will fit onto a 10MB lvm disk image
> which does nothing but run in the background and wait for
> lxc-attach to invoke commands on it?
> 
> I would just use lxc-execute, but of course it doesn't support
> the fssize or bdev parameters.  Nor does the container
> created by
> 
>     # lxc-create -t ubuntu -n test
> 
> have a small enough footprint for my purposes.  In fact, the
> only template which does seem small enough is lxc-sshd,
> but it doesn't seem to work quite right.
> 
> Thanks again in advance.

Have you tried the buxybox template?


More information about the lxc-users mailing list