Closed erdoukki closed 3 years ago
looks really close to https://github.com/openwrt/packages/issues/13037
root@OWRT-DEV:~# cat /srv/lxc/myBUSTER/config
# Template used to create this container: /usr/share/lxc/templates/lxc-download
# Parameters passed to the template: --dist debian --release buster --arch arm64 --no-validate
# Template script checksum (SHA-1): 26e72660447e5905798fa16f5a022191b590f8fc
# For additional config options, please look at lxc.container.conf(5)
##TWEAK
##lxc.init.cmd = /sbin/init systemd.unified_cgroup_hierarchy
# Uncomment the following line to support nesting containers:
#lxc.include = /usr/share/lxc/config/nesting.conf
# (Be aware this has security implications)
# Distribution configuration
lxc.include = /usr/share/lxc/config/common.conf
lxc.arch = linux64
# Container specific configuration
lxc.rootfs.path = dir:/srv/lxc/myBUSTER/rootfs
lxc.uts.name = myBUSTER
# Network configuration
lxc.net.0.type = empty
Apparently LXC still tries to use cgroupv1 subsystems. OpenWrt only supports cgroupv2, support for (legacy) cgroupv1 is neither planned nor intended. Best would probably be to update LXC to use cgroupv2 instead (ie. eBPF for devices).
yes, and it can be fixed by modifying the /usr/share/lxc/config/common.conf like this :
root@OWRT-DEV:~# diff /usr/share/lxc/config/common.conf.orig /usr/share/lxc/conf
ig/common.conf --unified
--- /usr/share/lxc/config/common.conf.orig 2021-04-15 14:50:15.703804432 +0200
+++ /usr/share/lxc/config/common.conf 2021-04-15 14:50:45.414118083 +0200
@@ -18,31 +18,31 @@
# Default legacy cgroup configuration
#
# CGroup allowlist
-lxc.cgroup.devices.deny = a
+#lxc.cgroup.devices.deny = a
## Allow any mknod (but not reading/writing the node)
-lxc.cgroup.devices.allow = c *:* m
-lxc.cgroup.devices.allow = b *:* m
+#lxc.cgroup.devices.allow = c *:* m
+#lxc.cgroup.devices.allow = b *:* m
## Allow specific devices
### /dev/null
-lxc.cgroup.devices.allow = c 1:3 rwm
+#lxc.cgroup.devices.allow = c 1:3 rwm
### /dev/zero
-lxc.cgroup.devices.allow = c 1:5 rwm
+#lxc.cgroup.devices.allow = c 1:5 rwm
### /dev/full
-lxc.cgroup.devices.allow = c 1:7 rwm
+#lxc.cgroup.devices.allow = c 1:7 rwm
### /dev/tty
-lxc.cgroup.devices.allow = c 5:0 rwm
+#lxc.cgroup.devices.allow = c 5:0 rwm
### /dev/console
-lxc.cgroup.devices.allow = c 5:1 rwm
+#lxc.cgroup.devices.allow = c 5:1 rwm
### /dev/ptmx
-lxc.cgroup.devices.allow = c 5:2 rwm
+#lxc.cgroup.devices.allow = c 5:2 rwm
### /dev/random
-lxc.cgroup.devices.allow = c 1:8 rwm
+#lxc.cgroup.devices.allow = c 1:8 rwm
### /dev/urandom
-lxc.cgroup.devices.allow = c 1:9 rwm
+#lxc.cgroup.devices.allow = c 1:9 rwm
### /dev/pts/*
-lxc.cgroup.devices.allow = c 136:* rwm
+#lxc.cgroup.devices.allow = c 136:* rwm
### fuse
-lxc.cgroup.devices.allow = c 10:229 rwm
+#lxc.cgroup.devices.allow = c 10:229 rwm
# Default unified cgroup configuration
#
root@OWRT-DEV:~#
then lxc-start works correctly...
root@OWRT-DEV:/# lxc-start -n myBUSTER --foreground --logpriority TRACE
systemd 241 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK
+SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +EL
FUTILS +KMOD -IDN2 +IDN -PCRE2 default-hierarchy=hybrid)
Detected virtualization lxc.
Detected architecture arm64.
Welcome to Debian GNU/Linux 10 (buster)!
Set hostname to <myBUSTER>.
Couldn't move remaining userspace processes, ignoring: Input/output error
[ OK ] Created slice system-container\x2dgetty.slice.
[ OK ] Started Forward Password Requests to Wall Directory Watch.
[ OK ] Listening on Journal Socket.
[ OK ] Listening on Journal Socket (/dev/log).
Starting Apply Kernel Variables...
[ OK ] Reached target Swap.
Starting Helper to synchronize boot up for ifupdown...
[ OK ] Listening on initctl Compatibility Named Pipe.
[ OK ] Reached target Remote File Systems.
Mounting POSIX Message Queue File System...
[ OK ] Started Dispatch Password Requests to Console Directory Watch.
[ OK ] Reached target Local Encrypted Volumes.
[ OK ] Reached target Paths.
Starting Journal Service...
[ OK ] Created slice User and Session Slice.
[ OK ] Reached target Slices.
Starting Remount Root and Kernel File Systems...
[ OK ] Created slice system-getty.slice.
[ OK ] Mounted POSIX Message Queue File System.
[ OK ] Started Helper to synchronize boot up for ifupdown.
[ OK ] Started Apply Kernel Variables.
[ OK ] Started Remount Root and Kernel File Systems.
Starting Create System Users...
[ OK ] Started Journal Service.
Starting Flush Journal to Persistent Storage...
[ OK ] Started Create System Users.
Starting Create Static Device Nodes in /dev...
[ OK ] Started Flush Journal to Persistent Storage.
[ OK ] Started Create Static Device Nodes in /dev.
[ OK ] Reached target Local File Systems (Pre).
[ OK ] Reached target Local File Systems.
Starting Raise network interfaces...
Starting Create Volatile Files and Directories...
[ OK ] Started Create Volatile Files and Directories.
Starting Update UTMP about System Boot/Shutdown...
[ OK ] Reached target System Time Synchronized.
[ OK ] Started Update UTMP about System Boot/Shutdown.
[ OK ] Reached target System Initialization.
[ OK ] Listening on D-Bus System Message Bus Socket.
[ OK ] Reached target Sockets.
[ OK ] Reached target Basic System.
Starting Login Service...
[ OK ] Started Daily apt download activities.
[ OK ] Started D-Bus System Message Bus.
[ OK ] Started Daily apt upgrade and clean activities.
[ OK ] Started Daily Cleanup of Temporary Directories.
[ OK ] Reached target Timers.
[FAILED] Failed to start Raise network interfaces.
See 'systemctl status networking.service' for details.
[ OK ] Reached target Network.
Starting Permit User Sessions...
[ OK ] Started Login Service.
[ OK ] Started Permit User Sessions.
[ OK ] Started Console Getty.
[ OK ] Started Container Getty on /dev/pts/0.
[ OK ] Started Container Getty on /dev/pts/2.
[ OK ] Started Container Getty on /dev/pts/3.
[ OK ] Started Container Getty on /dev/pts/1.
[ OK ] Reached target Login Prompts.
[ OK ] Reached target Multi-User System.
[ OK ] Reached target Graphical Interface.
Starting Update UTMP about System Runlevel Changes...
[ OK ] Started Update UTMP about System Runlevel Changes.
Debian GNU/Linux 10 myBUSTER console
myBUSTER login:
https://forum.openwrt.org/t/lxc-mvebu-snapshot-21-02/94033
I have just installed the snapshot 21-02 for MVEBU EspressoBIN... I am surprised that LXC looks like to be integrated in this future release (great news if it is) ! I am trying to make a LXC container but get an error :
then...
still an issue :
is devices missing ??? why ?