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

Fajar A. Nugraha list at fajar.net
Thu May 15 08:16:01 UTC 2014


On Thu, May 15, 2014 at 2:56 PM, Stephen Zhang <zsrkmyn at gmail.com> wrote:

> Hi all,
>   I installed a ubuntu maverick (really an old release, but I have to use
> it) using the following command:
>            lxc-creat -t ubuntu -n ubuntu -f config -- -r maverick
> the official repository is invalid now, so I changed it to
> http://mirror.usu.ru/ubuntu/ in debootstap script and lxc-ubuntu template.
>

you should be able to add "---mirror http://..." in the end without editing
anything.

init: lxcguest pre-start process (4) exited normally
>

I'd say you should investigate that


> init: lxcguest state changed from pre-start to spawned
> init: lxcguest state changed from spawned to post-start
> init: lxcguest state changed from post-start to running
> init: Handling started event
>
> And my lxcguest.conf in /etc/init/ is here (removing this file also failed
> to start the container):
>
> description "track if this is lxc instance"
>
> start on startup
>
> env container
> env LIBVIRT_LXC_UUID
>
> pre-start script
>    [ -z $container ] && [ -z $LIBVIRT_LXC_UUID ] && stop
>    # clean up /var/run - in case the container shutdown did not
>    rm -rf /var/run/*
>    touch /var/run/utmp
>    chown root:utmp /var/run/utmp
>    exit 0
> end script
>
>

Try also including /var/lock/*/* in there. Perhaps a subsystem refused to
start since it sees a stale lockfile.


none /lxc/rootfs.ubuntu/dev/pts devpts defaults 0 0
>

I'm pretty sure you don't need that


> sysfs sys sysfs ro,defaults 0 0
> proc proc proc nodev,noexec,nosuid 0 0
> /proc/sys /home/stephen/lxc/ubuntu/rootfs/proc/sys none ro,bind 0 0
> /etc/resolv.conf /home/stephen/lxc/ubuntu/rootfs/etc/resolv.conf none
> ro,bind 0 0
>
> So, what's wrong with my container?
>
> [1]http://blog.bodhizazen.net/linux/lxc-configure-ubuntu-lucid-containers/
>
>
Can you try http://wiki.1tux.org/wiki/Lxc/Installation/Guest/Centos/6, look
for "fstab" (both the config and rootfs part)? My hunch is that your
/dev/pts line made it worse.

-- 
Fajar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20140515/3711e999/attachment-0001.html>


More information about the lxc-users mailing list