Not able to bring-up lxc container

Hi,

I am trying to bring-up the lxc container on embedded platform (powerpc architecture), but could not.

I am getting error while executing lxc-start. Please see the following log msg.

[root@0005B95265D6 ~]# uname -a
Linux 0005B95265D6 4.1.35-rt41 #1 SMP Mon Apr 11 19:38:19 IST 2022 ppc64 GNU/Linux
[root@0005B95265D6 ~]#
[root@0005B95265D6 ~]# lxc-ls -f
[root@0005B95265D6 ~]#
[root@0005B95265D6 ~]# lxc-create -n lxc_rootfs -t busybox -f /var/lib/lxc/lxc_rootfs/config
ln: passwd: File exists
‘dropbear’ ssh utility installed
[root@0005B95265D6 ~]#
[root@0005B95265D6 ~]#
[root@0005B95265D6 ~]# lxc-ls -f
NAME STATE AUTOSTART GROUPS IPV4 IPV6
lxc_rootfs STOPPED 0 - - -
[root@0005B95265D6 ~]#
[root@0005B95265D6 ~]# lxc-start -n lxc_rootfs -F -c /dev/tty8 -f /var/lib/lxc/lxc_rootfs/config
lxc-start: caps.c: lxc_file_cap_is_set: 240 Failed to perform cap_get_file(): Operation not supported.
lxc-start: caps.c: lxc_file_cap_is_set: 240 Failed to perform cap_get_file(): Operation not supported.
lxc-start: caps.c: lxc_file_cap_is_set: 240 Failed to perform cap_get_file(): Operation not supported.
lxc-start: caps.c: lxc_file_cap_is_set: 240 Failed to perform cap_get_file(): Operation not supported.
lxc-start: start.c: lxc_spawn: 1182 Failed to set up id mapping.
lxc-start: start.c: __lxc_start: 1354 Failed to spawn container “lxc_rootfs”.
lxc-start: lxc_start.c: main: 366 The container failed to start.
lxc-start: lxc_start.c: main: 370 Additional information can be obtained by setting the --logfile and --logpriority options.
[root@0005B95265D6 ~]#

Any idea, why this error ?

Please see few additional info.

[root@0005B95265D6 ~]# lxc-checkconfig
— Namespaces —
Namespaces: enabled
Utsname namespace: enabled
Ipc namespace: enabled
Pid namespace: enabled
User namespace: enabled
Warning: newuidmap is not setuid-root
Warning: newgidmap is not setuid-root
Network namespace: enabled
Multiple /dev/pts instances: enabled

— Control groups —
Cgroup: enabled
Cgroup clone_children flag: enabled
Cgroup device: enabled
Cgroup sched: enabled
Cgroup cpu account: enabled
Cgroup memory controller: enabled
Cgroup cpuset: enabled

— Misc —
Veth pair device: enabled
Macvlan: enabled
Vlan: enabled
Bridges: enabled
Advanced netfilter: enabled
CONFIG_NF_NAT_IPV4: enabled
CONFIG_NF_NAT_IPV6: enabled
CONFIG_IP_NF_TARGET_MASQUERADE: enabled
CONFIG_IP6_NF_TARGET_MASQUERADE: enabled
CONFIG_NETFILTER_XT_TARGET_CHECKSUM: enabled
FUSE (for use with lxcfs): enabled

— Checkpoint/Restore —
checkpoint restore: enabled
CONFIG_FHANDLE: missing
CONFIG_EVENTFD: enabled
CONFIG_EPOLL: enabled
CONFIG_UNIX_DIAG: missing
CONFIG_INET_DIAG: enabled
CONFIG_PACKET_DIAG: missing
CONFIG_NETLINK_DIAG: enabled
File capabilities: enabled

Note : Before booting a new kernel, you can check its configuration
usage : CONFIG=/path/to/config /usr/bin/lxc-checkconfig

[root@0005B95265D6 ~]#
[root@0005B95265D6 ~]# ls -lh $(which newuidmap)
-rwxr-xr-x 1 root root 28.0K Feb 12 22:36 /usr/bin/newuidmap
[root@0005B95265D6 ~]# ls -lh $(which newgidmap)
-rwxr-xr-x 1 root root 28.0K Feb 12 22:36 /usr/bin/newgidmap
[root@0005B95265D6 ~]#

Please help me to resolve this.

Hi,

Today we tried latest version 4.0.12 (earlier it was 2.0.8). With this version we are not able to create the container.

[root@0005B95265D6 ~]# lxc-info --version
4.0.12
[root@0005B95265D6 ~]#
[root@0005B95265D6 ~]# lxc-ls -1
Failed to create lock for lxc_rootfs
[root@0005B95265D6 ~]#

Getting this error before creating the container and see the following error while creating the container.

[root@0005B95265D6 ~]# lxc-create -n lxc_rootfs -t busybox -f /var/lib/lxc/lxc_rootfs/config
Failed to create lock for lxc_rootfs
lxc-create: lxc_rootfs: lxc_create.c: main: 258 Failed to create lxc container
[root@0005B95265D6 ~]#

Any idea, why it is failing to create the container ??