LinuxCommandLibrary

lxc-checkconfig

Check LXC kernel configuration for requirements

TLDR

Check the current kernel for LXC support

$ lxc-checkconfig
copy

Check any kernel for LXC support
$ CONFIG=[/path/to/configuration] lxc-checkconfig
copy

SYNOPSIS

lxc-checkconfig

DESCRIPTION

lxc-checkconfig is a tool designed to verify if your Linux kernel is properly configured to run Linux Containers (LXC). It examines the kernel configuration and reports on the status of required and recommended kernel features.

The tool checks for essential kernel features such as namespaces (mount, IPC, PID, network, UTS, user), cgroups (memory, CPU, cpuset, devices, freezer, net_cls, perf_event, hugetlb, pids, rdma, misc, unified), file system support (overlayfs, aufs, veth, macvlan), and other options crucial for container operation. It provides a clear output of which features are enabled (`enabled`) or disabled (`disabled`) in the current kernel. If a feature is disabled, lxc-checkconfig also tries to provide hints on how to enable it, usually by suggesting the relevant kernel configuration option. Using lxc-checkconfig before deploying LXC containers ensures a smooth and reliable containerization experience, preventing unexpected errors or performance issues due to missing kernel features.

CAVEATS

The output of lxc-checkconfig might be misleading if your kernel is built using a modular configuration (some features as modules). Some features may be reported as disabled when they are available as modules and loaded on demand.

OUTPUT INTERPRETATION

The output consists of a series of lines, each representing a kernel feature. A feature marked as `enabled` is properly configured. A feature marked as `disabled` may cause issues when running containers. If a feature is marked with a warning, carefully review the description.

HISTORY

lxc-checkconfig was developed as part of the LXC project to simplify the process of ensuring proper kernel configuration for containerization. Before its existence, users had to manually check their kernel configuration, which was a tedious and error-prone process. lxc-checkconfig automates this task, making it easier for users to identify and resolve potential kernel-related issues before deploying containers. It is regularly updated to reflect the evolving kernel requirements of LXC.

SEE ALSO

lxc(1), lxc-create(1), lxc-start(1), lxc-stop(1)

Copied to clipboard