I am trying to install MicroK8s on LXC node created with Vagrant. This is based on Vagrant box emptybox/ubuntu-bionic-amd64-lxc 0.1.1546433870.
When I try to install MicroK8s in the Vagrant LXC
root@okd-mk8s1:~# snap install microk8s --classic
error: system does not fully support snapd: cannot mount squashfs image using "squashfs": mount:
/tmp/sanity-mountpoint-442656867: mount failed: Operation not permitted.
root@okd-mk8s1:~#
apt update && apt dist-upgrade -y && apt install fuse squashfuse -y
sudo apt-get install snapd
sudo snap install microk8s --classic
The config that Vagrant created for this box is
# Template used to create this container: /home/user/.vagrant.d/gems/2.6.6/gems/vagrant-lxc-1.4.3/scripts/lxc-template
# Parameters passed to the template: --tarball /home/user/.vagrant.d/boxes/emptybox-VAGRANTSLASH-ubuntu-bionic-amd64-lxc/0.1.1546433870/lxc/rootfs.tar.gz --config /home/user/.vagrant.d/boxes/emptybox-VAGRANTSLASH-ubuntu-bionic-amd64-lxc/0.1.1546433870/lxc/lxc-config
# Template script checksum (SHA-1): eae122a2d6cd572c26668257efa7963c2258186e
# For additional config options, please look at lxc.container.conf(5)
# Uncomment the following line to support nesting containers:
#lxc.include = /usr/share/lxc/config/nesting.conf
# (Be aware this has security implications)
##############################################
# Container specific configuration (automatically set)
lxc.net.0.type = veth
lxc.net.0.link = lxcbr0
lxc.net.0.flags = up
lxc.net.0.hwaddr = 00:16:3e:e3:ad:cf
lxc.rootfs.path = dir:/var/lib/lxc/okd-mk8s1/rootfs
lxc.uts.name = okd-mk8s1
##############################################
# Network configuration (automatically set)
##############################################
# vagrant-lxc base box specific configuration
# Default pivot location
# Default mount entries
lxc.mount.entry = proc proc proc nodev,noexec,nosuid 0 0
lxc.mount.entry = sysfs sys sysfs defaults 0 0
# Default console settings
lxc.tty.dir = lxc
lxc.tty.max = 4
lxc.pty.max = 1024
# Default capabilities
lxc.cap.drop = sys_module mac_admin mac_override sys_time
# When using LXC with apparmor, the container will be confined by default.
# If you wish for it to instead run unconfined, copy the following line
# (uncommented) to the container's configuration file.
#lxc.apparmor.profile = unconfined
# To support container nesting on an Ubuntu host while retaining most of
# apparmor's added security, use the following two lines instead.
#lxc.apparmor.profile = lxc-container-default-with-nesting
#lxc.hook.mount = /usr/share/lxc/hooks/mountcgroups
# Uncomment the following line to autodetect squid-deb-proxy configuration on the
# host and forward it to the guest at start time.
#lxc.hook.pre-start = /usr/share/lxc/hooks/squid-deb-proxy-client
# If you wish to allow mounting block filesystems, then use the following
# line instead, and make sure to grant access to the block device and/or loop
# devices below in lxc.cgroup.devices.allow.
#lxc.apparmor.profile = lxc-container-default-with-mounting
# Default cgroup limits
lxc.cgroup.devices.deny = a
## Allow any mknod (but not using the node)
lxc.cgroup.devices.allow = c *:* m
lxc.cgroup.devices.allow = b *:* m
## /dev/null and zero
lxc.cgroup.devices.allow = c 1:3 rwm
lxc.cgroup.devices.allow = c 1:5 rwm
## consoles
lxc.cgroup.devices.allow = c 5:0 rwm
lxc.cgroup.devices.allow = c 5:1 rwm
## /dev/{,u}random
lxc.cgroup.devices.allow = c 1:8 rwm
lxc.cgroup.devices.allow = c 1:9 rwm
## /dev/pts/*
lxc.cgroup.devices.allow = c 5:2 rwm
lxc.cgroup.devices.allow = c 136:* rwm
## rtc
lxc.cgroup.devices.allow = c 254:0 rm
## fuse
lxc.cgroup.devices.allow = c 10:229 rwm
## tun
lxc.cgroup.devices.allow = c 10:200 rwm
## full
lxc.cgroup.devices.allow = c 1:7 rwm
## hpet
lxc.cgroup.devices.allow = c 10:228 rwm
## kvm
lxc.cgroup.devices.allow = c 10:232 rwm
## To use loop devices, copy the following line to the container's
## configuration file (uncommented).
#lxc.cgroup.devices.allow = b 7:* rwm
##############################################
# vagrant-lxc container specific configuration
# VAGRANT-BEGIN
lxc.cgroup.memory.limit_in_bytes=8192M
lxc.apparmor.profile=unconfined
lxc.cgroup.devices.allow=a
lxc.cap.drop=
lxc.uts.name=okd-mk8s1.bkd.local
lxc.mount.entry=/sys/fs/pstore sys/fs/pstore none bind,optional 0 0
lxc.mount.entry=tmpfs tmp tmpfs nodev,nosuid,size=2G 0 0
lxc.mount.entry=/home/user/git/ok/ok/ansible-dev vagrant none bind,create=dir 0 0
# VAGRANT-END
Now I know that in the MicroK8s project LXC is also used for testing purposes. There is also a profile for this purpose. But I think this is intended to be used with LXD and Vagrant is using LXC.
How can I fix this error in my LXC node / Vagrant configuration?