[Lxc-users] lxc-start and lucid container

lxc at zitta.fr lxc at zitta.fr
Mon May 17 16:53:13 UTC 2010


Le 17/05/2010 18:09, Wilhelm a écrit :
>
> Am 17.05.2010 14:59, schrieb zitta.fr:
>> Hi,
>>
>> try this :
>>
>>     cat > /path_to_lucid_root/etc/init/console.conf
>>     # console - getty
>>     #
>>     # This service maintains a getty on stdin 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 /sbin/getty -8 38400 console
>>
>
> this is exactly the contents of /etc/init/tty1.conf
Sorry, I did let a comment that could makes you think it is tty1.conf
But no, it is not.
Look at this diff :

--- tty1.conf    2010-04-02 02:13:25.000000000 +0200
+++ console.conf    2010-05-17 16:59:53.770083492 +0200
@@ -1,4 +1,4 @@
-# tty1 - getty
+# console - getty
 #
 # This service maintains a getty on tty1 from the point the system is
 # started until it is shut down again.
@@ -7,4 +7,4 @@
 stop on runlevel [!2345]
 
 respawn
-exec /sbin/getty -8 38400 tty1
+exec /sbin/getty -8 38400 console
> but it doesn't work
did you even try?
>
>> Regards,
>>
>> Guillaume ZITTA
>>
>> Le 17/05/2010 16:31, Wilhelm a écrit :
>>> Hi all,
>>>
>>> I have a slight problem using a lucid container (on a lucid host): if I
>>> start the container via lxc-start, no console login starts up. I
>>> have to
>>> use lxc-console from a differnet terminal. If I use a lenny container,
>>> lxc-start shows the start up log messages and finally the getty/login.
>>>
>>> I'm using the lxc-packages from lucid:
>>>
>>> root at ubuntu01:~# dpkg -l lxc
>>> Gewünscht=Unbekannt/Installieren/R=Entfernen/P=Vollständig
>>> Löschen/Halten
>>> | Status=Nicht/Installiert/Config/U=Entpackt/Fehlgeschl. Konfiguration/
>>>            Halb installiert/Trigger erWartet/Trigger anhängig
>>> |/ Fehler?=(kein)/R=Neuinstallation notwendig (Status, Fehler:
>>> GROSS=schlecht)
>>> ||/ Name
>>> Version                                Beschreibung
>>> +++-======================================-======================================-============================================================================================
>>>
>>> ii  lxc
>>> 0.6.5-1                                Linux containers userspace tools
>>>
>>>
>>> The start trace is:
>>>
>>> root at ubuntu01:/var/lib/lxc/lucid# lxc-start -n lucid
>>> --logfile=/dev/stderr --logpriority=TRACE -- /sbin/init --verbose
>>>         lxc-start 1274106224.666 INFO     lxc_conf - tty's configured
>>>         lxc-start 1274106224.669 DEBUG    lxc_start - sigchild
>>> handler set
>>>         lxc-start 1274106224.669 INFO     lxc_start - 'lucid' is
>>> initialized
>>>         lxc-start 1274106224.681 DEBUG    lxc_conf - instanciated
>>> macvlan
>>> 'mcwEvnvl', index is '8' and mode '0'
>>>         lxc-start 1274106224.699 DEBUG    lxc_cgroup - using cgroup
>>> mounted at '/lxc-cgroup'
>>>         lxc-start 1274106224.699 DEBUG    lxc_cgroup -
>>> '/lxc-cgroup/20474' renamed to '/lxc-cgroup/lucid'
>>>         lxc-start 1274106224.711 DEBUG    lxc_conf - move 'eth1' to
>>> '20474'
>>>         lxc-start 1274106224.711 INFO     lxc_conf - 'lucid'
>>> hostname has
>>> been setup
>>>         lxc-start 1274106224.713 DEBUG    lxc_conf - mac address
>>> '4a:49:43:49:79:bd' on 'eth0' has been setup
>>>         lxc-start 1274106224.714 DEBUG    lxc_conf - 'eth0' has been
>>> setup
>>>         lxc-start 1274106224.714 INFO     lxc_conf - network has
>>> been setup
>>>         lxc-start 1274106224.715 DEBUG    lxc_cgroup - using cgroup
>>> mounted at '/lxc-cgroup'
>>>         lxc-start 1274106224.716 DEBUG    lxc_conf - cgroup
>>> 'devices.deny' set to 'a'
>>>         lxc-start 1274106224.716 DEBUG    lxc_conf - cgroup
>>> 'devices.allow' set to 'c 1:3 rwm'
>>>         lxc-start 1274106224.716 DEBUG    lxc_conf - cgroup
>>> 'devices.allow' set to 'c 1:5 rwm'
>>>         lxc-start 1274106224.716 DEBUG    lxc_conf - cgroup
>>> 'devices.allow' set to 'c 5:1 rwm'
>>>         lxc-start 1274106224.716 DEBUG    lxc_conf - cgroup
>>> 'devices.allow' set to 'c 5:0 rwm'
>>>         lxc-start 1274106224.716 DEBUG    lxc_conf - cgroup
>>> 'devices.allow' set to 'c 4:0 rwm'
>>>         lxc-start 1274106224.716 DEBUG    lxc_conf - cgroup
>>> 'devices.allow' set to 'c 4:1 rwm'
>>>         lxc-start 1274106224.716 DEBUG    lxc_conf - cgroup
>>> 'devices.allow' set to 'c 1:9 rwm'
>>>         lxc-start 1274106224.716 DEBUG    lxc_conf - cgroup
>>> 'devices.allow' set to 'c 1:8 rwm'
>>>         lxc-start 1274106224.716 DEBUG    lxc_conf - cgroup
>>> 'devices.allow' set to 'c 136:* rwm'
>>>         lxc-start 1274106224.716 DEBUG    lxc_conf - cgroup
>>> 'devices.allow' set to 'c 5:2 rwm'
>>>         lxc-start 1274106224.716 DEBUG    lxc_conf - cgroup
>>> 'devices.allow' set to 'c 254:0 rwm'
>>>         lxc-start 1274106224.716 INFO     lxc_conf - cgroup has been
>>> setup
>>>         lxc-start 1274106224.716 INFO     lxc_conf - mount points have
>>> been setup
>>>         lxc-start 1274106224.716 INFO     lxc_conf - console
>>> '/dev/pts/2'
>>> mounted to '/var/lib/lxc/lucid/rootfs/dev/console'
>>>         lxc-start 1274106224.716 INFO     lxc_conf - 4 tty(s) has
>>> been setup
>>>         lxc-start 1274106224.717 DEBUG    lxc_conf - temporary
>>> mountpoint
>>> for old rootfs is './lxc-oldrootfs-E19bcw'
>>>         lxc-start 1274106224.717 DEBUG    lxc_conf - pivot_root syscall
>>> to '/lxc-oldrootfs-E19bcw' successful
>>>         lxc-start 1274106225.062 DEBUG    lxc_conf - umounted
>>> '/lxc-oldrootfs-E19bcw/dev/pts'
>>>         lxc-start 1274106225.091 DEBUG    lxc_conf - umounted
>>> '/lxc-oldrootfs-E19bcw/dev/shm'
>>>         lxc-start 1274106225.162 DEBUG    lxc_conf - umounted
>>> '/lxc-oldrootfs-E19bcw/sys/fs/fuse/connections'
>>>         lxc-start 1274106225.178 DEBUG    lxc_conf - umounted
>>> '/lxc-oldrootfs-E19bcw/sys/kernel/debug'
>>>         lxc-start 1274106225.194 DEBUG    lxc_conf - umounted
>>> '/lxc-oldrootfs-E19bcw/sys/kernel/security'
>>>         lxc-start 1274106225.210 DEBUG    lxc_conf - umounted
>>> '/lxc-oldrootfs-E19bcw/proc'
>>>         lxc-start 1274106225.226 DEBUG    lxc_conf - umounted
>>> '/lxc-oldrootfs-E19bcw/var/run'
>>>         lxc-start 1274106225.243 DEBUG    lxc_conf - umounted
>>> '/lxc-oldrootfs-E19bcw/var/lock'
>>>         lxc-start 1274106225.258 DEBUG    lxc_conf - umounted
>>> '/lxc-oldrootfs-E19bcw/lib/init/rw'
>>>         lxc-start 1274106225.274 DEBUG    lxc_conf - umounted
>>> '/lxc-oldrootfs-E19bcw/boot'
>>>         lxc-start 1274106225.290 DEBUG    lxc_conf - umounted
>>> '/lxc-oldrootfs-E19bcw/lxc-cgroup'
>>>         lxc-start 1274106225.310 DEBUG    lxc_conf - umounted
>>> '/lxc-oldrootfs-E19bcw/var/lib/lxc/lucid/rootfs/dev/console'
>>>         lxc-start 1274106225.327 DEBUG    lxc_conf - umounted
>>> '/lxc-oldrootfs-E19bcw/var/lib/lxc/lucid/rootfs/dev/tty1'
>>>         lxc-start 1274106225.342 DEBUG    lxc_conf - umounted
>>> '/lxc-oldrootfs-E19bcw/var/lib/lxc/lucid/rootfs/dev/tty2'
>>>         lxc-start 1274106225.359 DEBUG    lxc_conf - umounted
>>> '/lxc-oldrootfs-E19bcw/var/lib/lxc/lucid/rootfs/dev/tty3'
>>>         lxc-start 1274106225.374 DEBUG    lxc_conf - umounted
>>> '/lxc-oldrootfs-E19bcw/var/lib/lxc/lucid/rootfs/dev/tty4'
>>>         lxc-start 1274106225.390 DEBUG    lxc_conf - umounted
>>> '/lxc-oldrootfs-E19bcw/dev'
>>>         lxc-start 1274106225.406 DEBUG    lxc_conf - umounted
>>> '/lxc-oldrootfs-E19bcw/sys'
>>>         lxc-start 1274106225.423 DEBUG    lxc_conf - umounted
>>> '/lxc-oldrootfs-E19bcw'
>>>         lxc-start 1274106225.424 INFO     lxc_conf - pivoted to
>>> '/tmp/lxc-rNhQTX7'
>>>         lxc-start 1274106225.424 INFO     lxc_conf - created new pts
>>> instance
>>>         lxc-start 1274106225.424 DEBUG    lxc_conf - capabilities has
>>> been setup
>>>         lxc-start 1274106225.424 NOTICE   lxc_conf - 'lucid' is setup.
>>>         lxc-start 1274106225.424 NOTICE   lxc_start - exec'ing
>>> '/sbin/init'
>>>         lxc-start 1274106225.425 NOTICE   lxc_start - '/sbin/init'
>>> started with pid '20474'
>>>         lxc-start 1274106225.425 DEBUG    lxc_utils - closing fd '1'
>>>         lxc-start 1274106225.425 DEBUG    lxc_utils - closing fd '0'
>>>         lxc-start 1274106225.425 DEBUG    lxc_utils - closed all
>>> inherited file descriptors
>>> init: Handling startup event
>>> init: tty1 goal changed from stop to start
>>> init: tty1 state changed from waiting to starting
>>> init: Handling starting event
>>> init: tty1 state changed from starting to pre-start
>>> init: tty1 state changed from pre-start to spawned
>>> init: tty1 main process (2)
>>> init: tty1 state changed from spawned to post-start
>>> init: tty1 state changed from post-start to running
>>> init: Handling started event
>>>
>>>
>>> and the processes inside the container are:
>>>
>>> root at ubuntu01:~# lxc-ps --lxc aux
>>> CONTAINER  USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START
>>> TIME COMMAND
>>> lucid      root     20474  0.0  0.2   2260   640 ?        Ss   16:23
>>> 0:00 /sbin/init
>>> lucid      root     20487  0.0  0.1   1720   492 pts/3    Ss+  16:23
>>> 0:00 /sbin/getty -8 38400 tty1
>>> root at ubuntu01:~#
>>>
>>> (well, I disabled all upstart services but tty1)
>>>
>>> Any hints?
>>>
>>>    
>
>





More information about the lxc-users mailing list