2

Running LXD inside Virtuozzo is not totally working (It may be similar as running LXD inside another LXD).

The Virtuozzo host is a VPS host service (not under my control).

The VPS client is running Ubuntu Server 16.04 and I successfully installed LXD and initialized it until the point it shows the empty lxc list.

Then I tried to launch an image: lxc launch images:ubuntu/artful artful, but it failed complaining:

error: LXD doesn't have a uid/gid allocation. In this mode, only privileged containers are supported.

Which cat /var/log/lxd/lxd.log reports:

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

Then I tried to run the container in privileged mode: lxc launch images:ubuntu/artful artful -c security.nesting=true -c security.privileged=true

It installs successfully, but it can not be started:

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

It all points that the Virtuozzo container is running unprivileged and thus LXD is failing.

I was wondering if this is a dead end for LXD in this situation or if there is a chance to make it work?

1
  • If you came here because your favorite search engine brought you here by searching for LXD doesn't have a uid/gid allocation. In this mode, only privileged containers are supported. and you happen to use Arch Linux, then you probably want to go through Arch Wiki page for LXD Dec 1, 2017 at 4:55

1 Answer 1

2

Virtuozzo is based in OpenVZ (you can check https://wiki.openvz.org/FAQ). They use an old kernel (2.6 based) without cgroups functionality needed for Docker/LXC/LXD. So your attempt will not work. Virtuozzo is already using a container technology (OpenVZ) but was not merged with the mainline kernel code.

3
  • It seems that Virtuozzo 7 is using now kernel 3.10. That then should support cgroups?
    – lepe
    Oct 26, 2017 at 3:13
  • 1
    check github.com/lxc/lxd/blob/master/doc/… : "... The minimum supported kernel version is 3.13....LXD requires a kernel with support for: Namespaces (pid, net, uts, ipc and mount), Seccomp ...." You can see that 3.10 (used by CentOS/RHEL 7 Base) is not enough. Oct 30, 2017 at 0:26
  • ... so close :/
    – lepe
    Oct 30, 2017 at 1:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .