Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Executing lxc-checkconfig failed and the lxc container could not be started #4

Open
smywhut opened this issue Nov 2, 2023 · 0 comments

Comments

@smywhut
Copy link

smywhut commented Nov 2, 2023

Hello.
When I execute the lxc-checkconfig command in this docker container, I get an error:

LXC version 5.0.3
Kernel configuration not found at /proc/config.gz; searching...
lxc-checkconfig: unable to retrieve kernel configuration

Try recompiling with IKCONFIG_PROC, installing the kernel headers,
or specifying the kernel configuration path with:
  CONFIG=<path> lxc-checkconfig

When I try to execute lxc-start to start an lxc container, I encounter another error:

lxc-start: autopkgtest-unstable-amd64: .. /src/lxc/cgroups/cgfsng.c: __cgfsng_delegate_controllers:  3341 Device or resource busy - Could not enable "+cpuset +cpu +io +memory +hugetlb +pids +rdma +misc" controllers in the  unified cgroup 7
lxc-start: autopkgtest-unstable-amd64: .. /src/lxc/cgroups/cgfsng.c: __cgfsng_delegate_controllers:  3341 Device or resource busy - Could not enable "+cpuset +cpu +io +memory +hugetlb +pids +rdma +misc" controllers in the  unified cgroup 7
lxc-start: autopkgtest-unstable-amd64: .. /src/lxc/sync.c: sync_wait: 34 An error occurred in another process (expected sequence number 4)
lxc-start: autopkgtest-unstable-amd64: .. /src/lxc/start.c: __lxc_start: 2107 Failed to spawn container "autopkgtest-unstable-amd64"
lxc-start: autopkgtest-unstable-amd64: .. /src/lxc/tools/lxc_start.c: main: 306 The container failed to start
lxc-start: autopkgtest-unstable-amd64: .. /src/lxc/tools/lxc_start.c: main:  311 Additional information can be obtained by setting the --logfile and --logpriority options

Here's how I use the docker run command:

docker run -it \
  --name lxc \
  --privileged  \
  --restart always \
  --memory 500M \
  --cpus 2 \
  -p 2222:22 \
  --hostname lxctest1 \
  -v /data:/data \
  -e DISTRIBUTION=alpine \
  -e INITIAL_SSH_KEY="ssh-rsa ***************" \
  5aef67a2ecfd /bin/bash

where 5aef67a2ecfd is the docker Image ID named micwy/lxc.

I think the configuration of my docker startup is incorrect. Could you please help me solve this problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant