Skip to content

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

@smywhut

Description

@smywhut

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions