[lxc-users] lxc 2.0.6 breaks lxc-start

Christian Brauner christian.brauner at canonical.com
Wed Jan 11 15:10:53 UTC 2017


Hi Detlef,

Now we're getting somewhere. :)

On Wed, Jan 11, 2017 at 03:59:21PM +0100, Detlef Vollmann wrote:
> Hi Christian,
> 
> thank you for replying!
> 
> On 01/09/17 17:35, Christian Brauner wrote:
> > Thanks for the info. I'm a little confused.
> Sorry about that.  But maybe it's because we talk about
> different things.

Right, I think we talked past each other.

> 
> > On Thu, Jan 05, 2017 at 01:31:28PM +0100, Detlef Vollmann wrote:
> >> On 01/01/17 14:14, Christian Brauner wrote:
> >>> Hm, works for me. I can just start containers fine where the
> >>> configuration file is located somewhere else. Can you please
> >>> append/copy the containers configuration file here and note any
> >>> special tweaks to your setup as well?
> >> Here's my test case:
> >> $ sudo lxc-ls
> >> rlx3-test1 trusty-dev
> >> # note: no 'test' here
> > 
> > Yes, because the default lxc path should be "/var/lib/lxc" and according to the
> > config file that you attached the container "test" exists on a different path
> > "/images/lxc". So this is expected. If you'd pass:
> > 
> > sudo lxc-ls -P /images/lxc
> > 
> > the container "test" should show up.
> No, it doesn't.
> lxc-ls only shows containers that are either active, frozen or created.
> "test" never was created, so it still doesn't show up.

That's the crucial point.

> 
> >> $ sudo lxc-start -F -n test -f /images/lxc/test.conf
> >> Error: container test is not defined
> > 
> > I'd argue that this is also fine because the container does not exist on the
> > "/var/lib/lxc" path so lxc-start is perfectly right to complain. The fact that
> > this worked before is actually the real bug.
> I don't think so.  lxc-start doesn't complain because it doesn't
> exist in the default path, but because it doesn't (pre-)exist at all!
> 
> > So your solution should simply be to pass the path where the container actually
> > exists to lxc-start:
> > 
> > 
> > sudo lxc-start -F -n test -f /images/lxc/test.conf -P /images/lxc
> It still doesn't work ("Error: container test is not defined").
> 
> I try to lxc-start a container that was never lxc-create'd.
> From the man page "lxc":
>    VOLATILE CONTAINER
>        It is not mandatory to create a container object before  to
> start  it.
>        The  container  can  be  directly  started with a configuration
> file as
>        parameter.

Right, I didn't have this in the back of my mind. Let me look for a fix.

Christian


More information about the lxc-users mailing list