I’m trying to run Ubuntu Core in a LXD container, but I’m having a bit of trouble. I’m following this tutorial: https://ubuntu.com/blog/ubuntu-core-in-lxd-containers I’ve pretty much followed the steps exactly. Everything seems to work fine until after 'exec’ing into the container. After about a minute the container will reboot twice and then the third time the container will not start. I’m pretty much a noob when it comes to LXD, so I’m not sure where to begin troubleshooting this.
I’m running 19.10, and I’ve installed LXD as a snap.
Update: After a lot of trial and error, I was able to figure out that this problem only happens after the
pc-kernel snap updates. If I abort the update of the kernel snap everything seems to continue working. I was even able to update the core snap without issue. I tried switching the kernel snap to different channels but the failure was the same. After updating it can’t reboot anymore.
I’m not sure if there are any hints in the container logs?
$ lxc info --show-log core2 Name: core2 Location: none Remote: unix:// Architecture: x86_64 Created: 2019/11/02 23:56 UTC Status: Stopped Type: persistent Profiles: default Log: lxc core2 20191103000345.321 WARN cgfsng - cgroups/cgfsng.c:chowmod:1525 - No such file or directory - Failed to chown(/sys/fs/cgroup/unified//lxc.payload/core2/memory.oom.group, 1000000000, 0)
I also found this denial in the logs:
Nov 2 22:13:12 rjy-laptop kernel: [10364.999365] audit: type=1400 audit(1572757992.055:1297): apparmor="DENIED" operation="mount" info="failed flags match" error=-13 profile="lxd-core2_</var/snap/lxd/common/lxd>" name="/sys/fs/cgroup/" pid=22367 comm="cgproxy" flags="rw, remount"