Hello everybody!
I’ve created and prepared a container on Ubuntu 16.04 (lxc 2.0.11), and tested it on Ubuntu 20.04 and Ubuntu 22.04, everything was working fine.
But then I tried to lxc-start
the container on a private distro with custom build kernel, the container just couldn’t start.
I have a feeling I’m getting very close to making it work.
Log:
lxc-start dgad 20230726023605.590 INFO lxccontainer - lxccontainer.c:do_lxcapi_start:979 - Set process title to [lxc monitor] /var/log/image/lxc dgad
lxc-start dgad 20230726023605.606 DEBUG lxccontainer - lxccontainer.c:wait_on_daemonized_start:840 - First child 44131 exited
lxc-start dgad 20230726023605.606 INFO lsm - lsm.c:lsm_init:40 - Initialized LSM security driver nop
lxc-start dgad 20230726023605.607 DEBUG terminal - terminal.c:lxc_terminal_peer_default:665 - No such device - The process does not have a controlling terminal
lxc-start dgad 20230726023605.608 WARN cgroup - cgroup.c:cgroup_init:50 - Running with unknown cgroup layout
lxc-start dgad 20230726023605.608 INFO start - start.c:lxc_init:837 - Container "dgad" is initialized
lxc-start dgad 20230726023605.609 ERROR utils - utils.c:lxc_can_use_pidfd:1853 - Kernel does not support pidfds
lxc-start dgad 20230726023605.609 INFO start - start.c:lxc_spawn:1700 - Cloned CLONE_NEWNS
lxc-start dgad 20230726023605.609 INFO start - start.c:lxc_spawn:1700 - Cloned CLONE_NEWPID
lxc-start dgad 20230726023605.609 INFO start - start.c:lxc_spawn:1700 - Cloned CLONE_NEWUTS
lxc-start dgad 20230726023605.609 INFO start - start.c:lxc_spawn:1700 - Cloned CLONE_NEWIPC
lxc-start dgad 20230726023605.609 INFO start - start.c:lxc_spawn:1700 - Cloned CLONE_NEWNET
lxc-start dgad 20230726023605.609 DEBUG start - start.c:lxc_try_preserve_namespaces:166 - Preserved mnt namespace via fd 16
lxc-start dgad 20230726023605.609 DEBUG start - start.c:lxc_try_preserve_namespaces:166 - Preserved pid namespace via fd 17
lxc-start dgad 20230726023605.609 DEBUG start - start.c:lxc_try_preserve_namespaces:166 - Preserved uts namespace via fd 18
lxc-start dgad 20230726023605.609 DEBUG start - start.c:lxc_try_preserve_namespaces:166 - Preserved ipc namespace via fd 19
lxc-start dgad 20230726023605.609 DEBUG start - start.c:lxc_try_preserve_namespaces:166 - Preserved net namespace via fd 20
lxc-start dgad 20230726023605.609 ERROR start - start.c:lxc_spawn:1741 - Failed to setup cgroup limits for container "dgad"
lxc-start dgad 20230726023605.609 DEBUG network - network.c:lxc_delete_network:3672 - Deleted network devices
lxc-start dgad 20230726023605.609 ERROR lxccontainer - lxccontainer.c:wait_on_daemonized_start:859 - Received container state "ABORTING" instead of "RUNNING"
lxc-start dgad 20230726023605.609 ERROR lxc_start - lxc_start.c:main:308 - The container failed to start
lxc-start dgad 20230726023605.609 ERROR lxc_start - lxc_start.c:main:311 - To get more details, run the container in foreground mode
lxc-start dgad 20230726023605.609 ERROR lxc_start - lxc_start.c:main:313 - Additional information can be obtained by setting the --logfile and --logpriority options
lxc-start dgad 20230726023605.610 ERROR start - start.c:__lxc_start:1999 - Failed to spawn container "dgad"
lxc-start dgad 20230726023605.610 WARN start - start.c:lxc_abort:1018 - No such process - Failed to send SIGKILL to 44133
Environment:
lxc-start --version: 4.0.6
Where should I go from here?
Is it necessary to make the kernel support pidfs
? Or is there something wrong with my “cgroup layout”?