[Lxc-users] lxc-console: container is stopped?
Ulli Horlacher
framstag at rus.uni-stuttgart.de
Tue Apr 19 21:57:59 UTC 2011
On Tue 2011-04-19 (09:44), Daniel Lezcano wrote:
> > I have a new container which I cannot attach to (lxc-console):
> >
> >
> > root at zoo:/lxc# /usr/bin/lxc-start -f egal.cfg -n egal&
> > [1] 3800
> >
> > root at zoo:/lxc# pstree -p 3800
> > lxc-start(3800)---init(3801)-+-cron(3857)
> > |-rsyslogd(3827)-+-{rsyslogd}(3839)
> > | `-{rsyslogd}(3840)
> > |-su(3849)---bash(3854)
> > |-su(3851)---bash(3860)
> > `-su(3899)---bash(3903)
> >
> > root at zoo:/lxc# lxc-console -n egal
> > lxc-console: 'egal' is stopped
I found the problem. I have fooled myself:
root at zoo:/lxc# psg lxc
USER PID PPID %CPU VSZ COMMAND
root 3800 1433 0.0 8508 /usr/bin/lxc-start -f egal.cfg -n egal
root at zoo:/lxc# /usr/bin/lxc-console -n egal
Type <Ctrl+a q> to exit the console
root at egal:~#
root at zoo:/lxc# lxc-console -n egal
lxc-console: 'egal' is stopped
root at zoo:/lxc# type -a lxc-console
lxc-console is /opt/lxc/bin/lxc-console
lxc-console is /usr/bin/lxc-console
/usr/bin/lxc* is the offcial Ubuntu 10.04 lxc package, whereas /opt/lxc/*
is my addon installation of a newer lxc versiom. Mixing both is a BAD idea.
Sorry for the confusion.
> If I refer to the process tree you gave, I don't see any getty, so I
> suppose you didn't set the tty option in the configuration file, right ?
Wrong :-)
I have modified /etc/init/tty*.conf inside the container, because I do not
want to have a login prompt, but a root shell.
root at zoo:/lxc# cat egal/etc/init/tty1.conf
# tty1 - getty
#
# This service maintains a getty on tty1 from the point the system is
# started until it is shut down again.
start on stopped rc RUNLEVEL=[2345]
stop on runlevel [!2345]
respawn
exec /bin/openvt -elfc 1 -- su -l
--
Ullrich Horlacher Server- und Arbeitsplatzsysteme
Rechenzentrum E-Mail: horlacher at rus.uni-stuttgart.de
Universitaet Stuttgart Tel: ++49-711-685-65868
Allmandring 30 Fax: ++49-711-682357
70550 Stuttgart (Germany) WWW: http://www.rus.uni-stuttgart.de/
More information about the lxc-users
mailing list