lxc-start:无法生成

lxc-start:无法生成

我尝试按照以下步骤从这里创建并启动 lxc 容器:https://help.ubuntu.com/lts/serverguide/lxc.html

我的主机正在运行最新的 64 位 Precise (12.04),我正在尝试启动精确的容器。我创建了如下容器:

sudo lxc-create -t ubuntu -n precise -- -r precise

并且它似乎成功完成了。当我尝试启动时,我得到:

$ sudo lxc-start -n precise
lxc-start: failed to spawn 'precise'

并且 kern.log 说:

Sep 27 09:27:15 hans kernel: [3738467.397433] device vethrtJYFO entered promiscuous mode
Sep 27 09:27:15 hans kernel: [3738467.399113] ADDRCONF(NETDEV_UP): vethrtJYFO: link is not ready
Sep 27 09:27:15 hans kernel: [3738467.409192] init: Failed to spawn network-interface (vethLNDNFP) pre-start process: unable to change root directory: No such file or directory
Sep 27 09:27:15 hans kernel: [3738467.412190] init: Failed to spawn network-interface-security (network-interface/vethLNDNFP) pre-start process: unable to change root directory: No such file or directory
Sep 27 09:27:15 hans kernel: [3738467.413059] init: Failed to spawn network-interface (vethLNDNFP) post-stop process: unable to change root directory: No such file or directory
Sep 27 09:27:15 hans kernel: [3738467.417246] init: Failed to spawn network-interface (vethrtJYFO) pre-start process: unable to change root directory: No such file or directory
Sep 27 09:27:15 hans kernel: [3738467.419247] init: Failed to spawn network-interface-security (network-interface/vethrtJYFO) pre-start process: unable to change root directory: No such file or directory
Sep 27 09:27:15 hans kernel: [3738467.420327] init: Failed to spawn network-interface (vethrtJYFO) post-stop process: unable to change root directory: No such file or directory

答案1

我认为该软件包cgroup-lite未安装。请尝试:

$ sudo apt-get install cgroup-lite
$ sudo cgroups-mount

并再次运行容器。

相关内容