Determine whether a specific configuration key is supported by this LXC build. Useful before setting keys that may not exist in older LXC versions.
{string} Configuration key to test (e.g. "lxc.cap.drop").
true if the key is supported, false otherwise.
Retrieve a global LXC configuration item.
Common keys include "lxc.lxcpath" (container directory) and "lxc.default_config".
{string} Global configuration key to retrieve.
The value of the global configuration item.
Return the LXC library version string.
Version string (e.g. "5.0.3").
Return the list of valid container wait-state strings.
These are the values accepted by container.wait() and returned by container.state.
Array of state name strings (e.g. ["STOPPED", "STARTING", "RUNNING", ...]).
Determine whether a specific LXC API extension is available in this build.
Extension names are stable strings such as "container_snapshot_comments",
"mount_injection", or "seccomp_notify".
{string} Extension name to test.
true if the extension is available, false otherwise.
List the names of all currently active (running) containers.
Optionallxcpath: string{string | undefined} Container directory to search. Defaults to lxc.lxcpath.
Array of container name strings.
List the names of all defined and active containers.
Equivalent to list_defined_containers ∪ list_active_containers.
Optionallxcpath: string{string | undefined} Container directory to search. Defaults to lxc.lxcpath.
Array of container name strings.
List the names of all defined (configured but not necessarily running) containers. A container is defined if its configuration file exists.
Optionallxcpath: string{string | undefined} Container directory to search. Defaults to lxc.lxcpath.
Array of container name strings.
Container class constructor. Create a new handle for an LXC container by name.