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

相关文章

目录前言一、创建Hadoop用户二、更新apt和安装Vim编辑器三、...
原文连接:https://www.cnblogs.com/yasmi/p/5192694.html ...
电脑重启后,打开VirtualBox,发现一直用的虚拟机莫名的消失...
参见:https://blog.csdn.net/weixin_38883338/article/deta...
Ubuntu 18.04 LTS 已切换到 Netplan 来配置网络接口。Netpla...
介绍每个 Web 服务都可以通过特定的 URL 在 Internet 上访问...