[Lxc-users] Start a container in background but with boot messages
Clemens Perz
cperz at gmx.net
Tue Sep 7 14:15:05 UTC 2010
On 09/07/2010 03:25 PM, Daniel Lezcano wrote:
> On 09/07/2010 01:11 PM, Clemens Perz wrote:
>> Hi!
>>
>> Afaik there are two usual ways to start a container: lxc-start with or
>> without the -d option.
>>
>> Does anyone know about a way to start a container, watch the messages of
>> the services started and any output of the scripts, but when startup is
>> finished returning to the shell, as if you had used -d?
>>
>
> I don't think it is possible but it is highly desired and quite easy to
> implement IMO.
I hoped so :)
> There are a few question by the way:
>
> * should the container daemonize when we exit the console ?
> * should we automatically daemonize the container when there is no tty ?
> * should we get the console again with lxc-console if needed ?
Hmm, what is currently happening to the script output? Do you open the
console first, run init and after starting the services there is a getty
lurking?
If so, there must be some kind of redirection in place. In my little
world I thought the main problem would be to find out when the scripts
have finished, but thinking about it - you already know when to show a
prompt, so it should be the same moment when disconnecting the stdout >
tty relation.
Simple me ;-))
I thought
-d = redirect all output to the tty and do not end up in a console. If
there is no tty, /dev/null is your friend
-q = be quiet, all goes to /dev/null
none of the above = like if you omit -d now
And for automation
lxc.startup-options = [d][q]
Cheers,
Clemens
More information about the lxc-users
mailing list