I agree that lxc-start need better error logging, not only for lxc-start, but 
for most lxc-* tools. But on the other hand, dev properly are too busy 
straighten out other issue for lxc v2.

Regarding your issue, you can try following:

        lxc-start-ephemeral -n e1 -l 9 -o test -d

The “-l 9” (lower-case L) set the log level to 9. That should give you more 
information. Without it the log level is default to 0 or 1, which is the same 
as what you see on screen (stderr).

John Siu


> On Feb 21, 2016, at 18:50, Akshay Karle <[email protected]> wrote:
> 
> Hello lxc users,
> 
> After having used lxc for a while now, I've realized that when the container 
> fails to start, it fails with a very generic message as follows:
> 
> $ lxc-start -n test
> lxc-start: lxc_start.c: main: 344 The container failed to start.
> lxc-start: lxc_start.c: main: 346 To get more details, run the container in 
> foreground mode.
> lxc-start: lxc_start.c: main: 348 Additional information can be obtained by 
> setting the --logfile and --logpriority options.
> 
> And if you are using ephemeral containers, the error is even more generic and 
> with no way to increase the log level:
> 
> $ lxc-start-ephemeral -n e1 -o test -d
> setting rootfs to .%s. /home/vagrant/.local/share/lxc/e1/rootfs
> The container 'e1' failed to start.
> 
> I was wondering if someone felt the need of having a little more meaningful 
> error messages giving a summary of the error in the console output. The 
> container logfile does have way more descriptive error messages, but since 
> you don't directly have the errors in the console output, you are forced to 
> open the logfiles everytime something goes wrong. Instead if you had an 
> output that just included a few important error lines from the logfile such 
> as the following example:
> 
> $ lxc-start -n test
> lxc-start: lxc_start.c: main: 344 The container failed to start.
> lxc_start - start.c:lxc_spawn:1031 - failed creating cgroups
> lxc-start: lxc_start.c: main: 346 To get more details, run the container in 
> foreground mode.
> lxc-start: lxc_start.c: main: 348 Additional information can be obtained by 
> setting the --logfile and --logpriority options.
> 
> Do you think this would help? Although I have no idea if this is simple to 
> implement, I just wanted to get your ideas, suggestions and concerns (if any) 
> before attempting to figure out a solution.
> _______________________________________________
> lxc-users mailing list
> [email protected]
> http://lists.linuxcontainers.org/listinfo/lxc-users

_______________________________________________
lxc-users mailing list
[email protected]
http://lists.linuxcontainers.org/listinfo/lxc-users

Reply via email to