[lxc-users] Ubuntu (maverick) container hangs at init

Stephen Zhang zsrkmyn at gmail.com
Thu May 15 19:13:03 UTC 2014


2014-05-16 2:31 GMT+08:00 Fajar A. Nugraha <list at fajar.net>:

> On Fri, May 16, 2014 at 1:24 AM, Fajar A. Nugraha <list at fajar.net> wrote:
>
>
>> Works for me. Did you do it like I did?
>>
>> root at trusty:~# status tty1
>> tty1 start/running, process 443
>> root at trusty:~# status cron
>> cron start/running, process 407
>> root at trusty:~# status cron
>> root at trusty:~# runlevel
>> N 2
>>
>>
> for clarity purpuses: the above commands were executed on the maverick
> container. It's just that the hostname of the container is also "trusty"
> (since by default the rootfs created in /var/cache/lxc* has hostname the
> same as the host)
>
>
>
>
>> - (in the container) create /etc/init/lxc-console.conf
>>
>> ###
>> start on stopped rc RUNLEVEL=[2345] and container CONTAINER=lxc
>>
>
> this should be only
>
> start on stopped rc RUNLEVEL=[2345]
>
> container detection only works on newer versions of upstart.
>
>
>
>
>
>> stop on runlevel [!2345]
>>
>> respawn
>> exec /sbin/getty -8 38400 lxc/console
>> ###
>>
>>
>
Aha~~ I am sure that I did everything that you did, including adding
"lxc.include
= /usr/share/lxc/config/ubuntu.common.conf" to the config file and commented
all lines below except "lxc.aa_profile = unconfined". And just now I
followed what you did. it seems that the 2nd problem has been solved, but
the 1st one still remain.
I started the container, and ran the command "runlevel", to my
surprise, it returned "unknown". But how could I specify the run
level?

Stephen


More information about the lxc-users mailing list