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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值