Welcome to the Linux Foundation Forum!

Struggling with Container lab 3.2 lxc

I can not seem to get the container to run. The information for this Containers Course seems to rely on outdated versions of Ubuntu and I do not know what to do.

When creating the unprivileged container and specifying Ubuntu Xenial: "ERROR: could not find."

Okay so try installing Ubuntu Noble instead now I get:

$lxc-start -n unpriv-xipe-user -d

lxc-start: unpriv-xipe-user: ../src/lxc/lxccontainer.c: wait_on_daemonized_start: 829 No such file or directory - Failed to receive the container state
lxc-start: unpriv-xipe-user: ../src/lxc/tools/lxc_start.c: lxc_start_main: 307 The container failed to start
lxc-start: unpriv-xipe-user: ../src/lxc/tools/lxc_start.c: lxc_start_main: 310 To get more details, run the container in foreground mode
lxc-start: unpriv-xipe-user: ../src/lxc/tools/lxc_start.c: lxc_start_main: 312 Additional information can be obtained by setting the --logfile and --logpriority options

Try sudo! Yet I get:

$sudo lxc-start -n unpriv-xipe-user -d
lxc-start: unpriv-xipe-user: ../src/lxc/tools/lxc_start.c: lxc_start_main: 267 No container config >>specified

I've looked online and am wondering where the path for lxc container configs are and whether I need to write them or if this is some other error either on my part or from the difference between versions..

I also tried prsalinux's post about editing grub .config when he had a similar problem but to no avail. :(

Comments

  • chrispokorni
    chrispokorni Posts: 2,520

    Hi @smithy7,

    Due to LXC's reliance on cgroup1, the official LXC documentation still recommends the installation of LXC on earlier releases of the Ubuntu OS - Focal or Bionic, predating the adoption of cgroup2. Its operation on more recent Ubuntu releases is obstructed by the default cgroup2 that is not supported by LXC.

    In light of these limitations, the sensible recommendation is to attempt the LXC exercises on a Virtual Machine operated by an earlier guest Ubuntu OS release. I do not recommend natively operating earlier Ubuntu OS releases that no longer receive security updates.

    Also, booting a more recent cgroup2 enabled Ubuntu OS release and switching to cgroup1 (even if temporarily) only for the purpose of these exercises is not recommended. The suggested workaround referenced above, while successful for LXC operations, could have adverse effects on the other containerization tools.

    Once LXC runs on a supported OS release, there is the issue of running containers from images available through the LXC image registry. The download template retrieves the list of available images. Over time, this list is updated with new images while older ones are removed once out of support. Make sure you analyze the output list for the most up to date images available, then select an image distribution, release and architecture to create the container. You can also browse through the image registry at https://images.linuxcontainers.org/ for the most up o date images available to download.

    While course updates are in progress, please follow these instructions to get started with LXC.

    Regards,
    -Chris

Categories

Upcoming Training