Container no booting with old config in ubuntu 14.04

前端之家收集整理的这篇文章主要介绍了Container no booting with old config in ubuntu 14.04前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

问题:LXC container 启动不了,卡在Starting configure network device界面

sh: 0: getcwd() Failed: No such file or directory
<4>init: hostname main process (3) terminated with status 1
<4>init: plymouth-upstart-bridge main process (5) terminated with status 1
<4>init: plymouth-upstart-bridge main process ended,respawning
<4>init: plymouth-upstart-bridge main process (14) terminated with status 1
<4>init: plymouth-upstart-bridge main process ended,respawning
 * Starting Mount filesystems on boot   ...done.
 * Stopping Send an event to indicate plymouth is up   ...done.
 * Starting Signal sysvinit that the rootfs is mounted   ...done.
 * Starting Clean /tmp directory   ...done.
 * Starting Populate and link to /run filesystem   ...done.
 * Starting Track if upstart is running in a container   ...done.
 * Stopping Clean /tmp directory   ...done.
 * Stopping Populate and link to /run filesystem   ...done.
 * Starting load fallback graphics devices   ...done.
 * Starting workaround for missing events in container   ...done.
<4>init: udev-fallback-graphics main process (77) terminated with status 1
 * Starting load fallback graphics devices   ...fail!
 * Starting userspace bootsplash   ...done.
 * Starting Send an event to indicate plymouth is up   ...done.
 * Starting configure network device security   ...done.
 * Stopping workaround for missing events in container   ...done.
 * Starting Initialize or finalize resolvconf   ...done.
 * Stopping Send an event to indicate plymouth is up   ...done.
 * Starting Mount network filesystems   ...done.
 * Stopping Mount network filesystems   ...done.
 * Stopping userspace bootsplash   ...done.
 * Starting Bridge socket events into upstart   ...done.
 * Starting configure network device   ...done.

lxc 版本:

sudo lxc-ls --version
1.0.9

分析:

https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/1307431发现是下面问题:
That old config doesn’t mount pstore which is then causing the hang at boot time which you are seeing
也即 旧的配置文件并没有挂载pstore文件

解决方法

1、在config文件中直接包含ubuntu通用的配置文件

# Common configuration
lxc.include = /usr/share/lxc/config/ubuntu.common.conf

2、在自己的config文件添加下面一行:

lxc.mount.entry = /sys/fs/pstore sys/fs/pstore none bind,optional 0 0

相关帖子:
http://serverfault.com/questions/571714/setting-up-bridged-lxc-containers-with-static-ips

原文链接:https://www.f2er.com/ubuntu/354014.html

猜你在找的Ubuntu相关文章