10.02.2021 01:11, Sergey Spiridonov пишет:
Привет всем.

Пытаюсь настроить непривелигерованный контейнер lxc в бустер

Действую вроде бы точно по инструкции

https://wiki.debian.org/LXC#Unprivileged_container


$ cat  /etc/s*id|grep lxcuser
lxcuser:296608:65536
lxcuser:296608:65536

$ cat .config/lxc/default.conf
lxc.idmap = u 0 296608 65536
lxc.idmap = g 0 296608 65536

lxc.apparmor.profile = unconfined
lxc.apparmor.allow_nesting = 0
lxc.mount.auto = proc:mixed sys:ro cgroup:mixed

lxc.net.0.type = veth
lxc.net.0.link = lxcbr0
lxc.net.0.flags = up
lxc.net.0.hwaddr = 00:16:3f:xx:xx:xx

# sysctl kernel.unprivileged_userns_clone
kernel.unprivileged_userns_clone = 1

Но...

$ lxc-create -n cname -t debian -- -r buster
lxc-create: cname: conf.c: chown_mapped_root: 3250 lxc-usernsexec failed: 
Permission denied - Failed to open tt
lxc-create: cname: tools/lxc_create.c: main: 327 Failed to create container 
cname
у меня ругается если так вызывать:
$ lxc-create -n cname -t debian -- -r buster
This template can't be used for unprivileged containers.
You may want to try the "download" template instead.
lxc-create: cname: lxccontainer.c: create_run_template: 1617 Failed to create container from template lxc-create: cname: tools/lxc_create.c: main: 327 Failed to create container cname

А так работает:
$ lxc-create -n cname -t download -- -r buster -d debian -a amd64
Using image from local cache
Unpacking the rootfs

---
You just created a Debian buster amd64 (20210210_05:24) container.

To enable SSH, run: apt install openssh-server
No default root or user password are set by LXC.
$

Попробуй вызвать lxc-create c --logfile и --logpriority


$ lxc-usernsexec
Failed to find subuid or subgid allocation
у меня пишет точно тоже


Что не так?


Ответить