Cannot boot LXC in leap 42.1

Hi all,

I’ve done a fresh install of Leap 42.1, and cannot boot and run an LXC container:

lxc-start -n lxcVpar23 -F -o error.log

lxc-start: utils.c: open_without_symlink: 1575 No such file or directory - Error examining fuse in /usr/lib64/lxc/rootfs/sys/fs/fuse/connections
lxc-start: lsm/apparmor.c: apparmor_process_label_set: 169 If you really want to start this container, set
lxc-start: lsm/apparmor.c: apparmor_process_label_set: 170 lxc.aa_allow_incomplete = 1
lxc-start: lsm/apparmor.c: apparmor_process_label_set: 171 in your container configuration file
lxc-start: sync.c: __sync_wait: 51 invalid sequence number 1. expected 4
lxc-start: start.c: __lxc_start: 1172 failed to spawn ‘lxcVpar23’
lxc-start: cgfs.c: cgroup_rmdir: 207 Device or resource busy - cgroup_rmdir: failed to delete /sys/fs/cgroup/pids/lxc/lxcVpar23-1
lxc-start: cgfs.c: cgroup_rmdir: 207 Device or resource busy - cgroup_rmdir: failed to delete /sys/fs/cgroup/hugetlb/lxc/lxcVpar23-1
lxc-start: cgfs.c: cgroup_rmdir: 207 Device or resource busy - cgroup_rmdir: failed to delete /sys/fs/cgroup/perf_event/lxc/lxcVpar23-1
lxc-start: cgfs.c: cgroup_rmdir: 207 Device or resource busy - cgroup_rmdir: failed to delete /sys/fs/cgroup/net_cls,net_prio/lxc/lxcVpar23-1
lxc-start: cgfs.c: cgroup_rmdir: 207 Device or resource busy - cgroup_rmdir: failed to delete /sys/fs/cgroup/freezer/lxc/lxcVpar23-1
lxc-start: cgfs.c: cgroup_rmdir: 207 Device or resource busy - cgroup_rmdir: failed to delete /sys/fs/cgroup/devices/lxc/lxcVpar23-1
lxc-start: cgfs.c: cgroup_rmdir: 207 Device or resource busy - cgroup_rmdir: failed to delete /sys/fs/cgroup/memory/lxc/lxcVpar23-1
lxc-start: cgfs.c: cgroup_rmdir: 207 Device or resource busy - cgroup_rmdir: failed to delete /sys/fs/cgroup/blkio/lxc/lxcVpar23-1
lxc-start: cgfs.c: cgroup_rmdir: 207 Device or resource busy - cgroup_rmdir: failed to delete /sys/fs/cgroup/cpu,cpuacct/lxc/lxcVpar23-1
lxc-start: cgfs.c: cgroup_rmdir: 207 Device or resource busy - cgroup_rmdir: failed to delete /sys/fs/cgroup/cpuset/lxc/lxcVpar23-1
lxc-start: lxc_start.c: main: 344 The container failed to start.
lxc-start: lxc_start.c: main: 348 Additional information can be obtained by setting the --logfile and --logpriority options.

The tests i’ve done:

Change to kernel-default: No boot.
Change to kernel-vanilla: No boot.
Change to kernel-default form kernel::stable: No boot.

What gives? Is openSUSE dropping support for lxc all together?

Thanks,
Nuno

Don’t think they’re dropping support (not sure how you got that conclusion). It can be found in the standard repos, so support isn’t dropped.

Running basic LXC on openSUSE has always been difficult, if you want to try to set up the following is an SDB which looks like hasn’t been maintained since a comment I contributed many, many years and versions ago (but may still work).

At the time I contributed the comment, there was a YAST LXC applet for creating, starting, and stopping containers but I don’t see it any more.

But, I now highly endorse using the libvirt library for creating, modifying, starting and stopping. I just ran some tests and it seems to work and would be a well supported LXC management option moving to the future. I don’t see any documentation anywhere guiding a User to installing LXC, so AFAIK this post is the first and perhaps only Guide of sorts…

First, install lxc

zypper in lxc

Then, instead of installing only the plug-in, I instead recommend opening up YAST and clicking on the “Install Hypervisor and Tools.”
In the past, I thought I had to install Xen or KVM to manage LXC, but found I couldn’t use Virt-Install to create LXC containters, so this time I tried (successfully) to check the LXC plugin checkbox. The result is that you won’t be able to use graphical tools, but command line tools will work.

  • When prompted, accept what the install offers, which will include installing the libvirt-lxc plugin and setting up a Linux Bridge Device (br0)… Otherwise you’d find it much more difficult to set those things up later.

When completed,
User virt-install to create and run a container. You won’t be able to use the virsh commands because they require a running hypervisor.

The following creates a simple test machine. All parameters like the install location, source, etc are default. Use the usual “–help” flag to see your setup options

virt-install -n First_Machine --memory 1024

I haven’t explored further what can be done.

TSU

Came across this to help you on your way…
https://www.suse.com/documentation/sles-12/book_virt/data/lxc_diff.html

If you find that documentation useful, pls post back here your findings.

Note that LEAP is based on the SUSE 12 core, so this documentation should be relevant.
For those running LXC on 13.2, although that is not based on SUSE 12, my feeling is that this documentation should apply, also from what I’ve seen in 13.2. openSUSE 13.1 and earlier is different.

TSU

Additional useful information,
Describes how to connect libvirt to LXC which is the issue I personally ran into before where I could not run vm-manager to manage LXC.

Also note that RHEL has made the decision to deprecate LXC in favor of docker with the possibility (not certainty) of dropping LXC altogether in the future.

Just on the basis of activity and which resources the world is devoting to Linux Containers, I also recommend implementing Docker unless you have a reason to use LXC. Although getting a tad dated, I’ve posted a number of articles which should still be educational getting started with docker on my openSUSE wiki. Note that as of a couple weeks ago, the newest version of Docker (1.9) supports a whole new networking architecture (although the legacy methods described in my articles will continue to be supported indefinitely)

https://en.opensuse.org/User:Tsu2

TSU