首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在Viruozzo中运行LXD

在Viruozzo中运行LXD
EN

Ask Ubuntu用户
提问于 2017-07-26 02:29:29
回答 1查看 483关注 0票数 1

在Virtuozzo中运行LXD并不完全有效(它可能类似于在另一个LXD中运行LXD)。

Virtuozzo主机是一个VPS主机服务(不在我的控制之下)。

VPS客户端正在运行UbuntuServer16.04,我成功地安装并初始化了它,直到它显示空的lxc list为止。

然后,我试图启动一个映像:lxc launch images:ubuntu/artful artful,但它失败了,抱怨:

错误: LXD没有uid/gid分配。在这种模式下,只支持特权容器。

哪个cat /var/log/lxd/lxd.log报告:

代码语言:javascript
复制
lvl=warn msg="Couldn't find the CGroup pids controller, process limits will be ignored." t=2017-07-26T10:11:35+0900
lvl=info msg="Kernel uid/gid map:" t=2017-07-26T10:11:35+0900
lvl=info msg=" - u 0 0 0" t=2017-07-26T10:11:35+0900
lvl=info msg=" - g 0 0 0" t=2017-07-26T10:11:35+0900
lvl=info msg="Configured LXD uid/gid map:" t=2017-07-26T10:11:35+0900
lvl=info msg=" - u 0 100000 65536 (unusable)" t=2017-07-26T10:11:35+0900
lvl=info msg=" - g 0 100000 65536 (unusable)" t=2017-07-26T10:11:35+0900
lvl=warn msg="One or more uid/gid map entry isn't usable (typically due to nesting)" t=2017-07-26T10:11:35+0900
lvl=warn msg="Only privileged containers will be able to run" t=2017-07-26T10:11:35+0900
lvl=info msg="Connecting to a remote simplestreams server" t=2017-07-26T10:11:35+0900

然后,我尝试以特权模式运行容器:lxc launch images:ubuntu/artful artful -c security.nesting=true -c security.privileged=true

它安装成功,但无法启动:

代码语言:javascript
复制
error: Error calling 'lxd forkstart artful /var/lib/lxd/containers /var/log/lxd/artful/lxc.conf': err='Failed to run: /usr/bin/lxd forkstart artful /var/lib/lxd/containers /var/log/lxd/artful/lxc.conf: '
  lxc 20170726020609.465 ERROR lxc_cgfs - cgroups/cgfs.c:lxc_cgroupfs_create:901 - Could not find writable mount point for cgroup hierarchy 4 while trying to create cgroup.
  lxc 20170726020609.465 ERROR lxc_cgfs - cgroups/cgfs.c:cgroup_rmdir:209 - Device or resource busy - cgroup_rmdir: failed to delete /sys/fs/cgroup/systemd//system.slice/lxd.service

所有这些都表明Virtuozzo容器正在运行unprivileged,因此LXD正在失败。

我在想,在这种情况下,这是LXD的死胡同,还是有机会让它发挥作用?

EN

回答 1

Ask Ubuntu用户

回答已采纳

发布于 2017-10-25 14:44:15

Virtuozzo的基础是OpenVZ (您可以检查https://wiki.openvz.org/FAQ)。他们使用一个旧内核(基于2.6),没有Docker/LXC/LXD所需的cgroup功能。所以你的尝试是行不通的。Virtuozzo已经在使用容器技术(OpenVZ),但没有与主线内核代码合并。

票数 1
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/939807

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档