[Lxc-users] Is "lxc-create -n foo" supposed to work?
Serge Hallyn
serge.hallyn at canonical.com
Thu Jan 24 18:10:12 UTC 2013
Quoting Papp Tamas (tompos at martos.bme.hu):
> On 01/24/2013 05:47 AM, Dan Kegel wrote:
> >
> > On ubuntu 12.04, I tried the minimalist command
> > sudo lxc-create -n foo
> > without a -t option. This completed very quickly (yay) but then
> > sudo lxc-start -n foo
> > hung (after complaining there was no fstab.old or something).
> >
> > Is that supposed to work?
> >
> > In the meantime, i'm using
> > sudo lxc-create -n foo -t ubuntu
> > That's a lot slower, but at least it works.
>
> 'lxc-create -n foo' is pointless. Actually I think it should return with a non-zero exit code.
> If you have an lxc config file, you can create a real container:
>
> lxc-create -n foo -f config
>
> Or you can create a specific (eg. ubuntu precice, debian squeeze, fedora...etc) container with the
> -t switch, which invokes a wrapper script, that makes a number of changes on the filesystem, like
> debootstrap, create config, setup a default user in the container.
Since commit "Add distro config file /etc/lxc/lxc.conf" by Dwight, if
you don't specify -f a distro-specified config file may be used (if so
configured). If that was not set up, then lxc-create will fail.
-serge
More information about the lxc-users
mailing list