我尝试按照以下步骤从这里创建和启动 lxc 容器:https : //help.ubuntu.com/lts/serverguide/lxc.html
我的主机运行的是最新的 64 位 Precise (12.04),我正在尝试启动一个精确的容器。我创建了这样的容器:
sudo lxc-create -t ubuntu -n precise -- -r precise
Run Code Online (Sandbox Code Playgroud)
它似乎成功完成。当我尝试开始时,我得到:
$ sudo lxc-start -n precise
lxc-start: failed to spawn 'precise'
Run Code Online (Sandbox Code Playgroud)
和 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
Run Code Online (Sandbox Code Playgroud)
小智 6
我认为该软件包cgroup-lite未安装。尝试:
$ sudo apt-get install cgroup-lite
$ sudo cgroups-mount
Run Code Online (Sandbox Code Playgroud)
并再次运行容器。
| 归档时间: |
|
| 查看次数: |
3327 次 |
| 最近记录: |