I run an unprivileged Ubuntu 20.04 container on Proxmox, and I recently needed to install snapd for some required software. Unfortunately, snapd seems to require some permissions not normally allocated and fails with the following error:
error: system does not fully support snapd: cannot mount squashfs image using "squashfs": mount: /tmp/sanity-mountpoint-015619550: mount failed: Operation not permitted.
Some research revealed a rather simple solution to the problem in Proxmox, which is my hypervisor. It’s enough to run the following command on the host:
pct set 123 -features nesting=1,fuse=1
where 123 is the ID of the container where you are trying to install snap. Thanks to oguz for that tip on the forums!
After running that command and rebooting the container, snap seems to install file, but installing the core fails!
root@host:~# snap install core error: cannot perform the following tasks: - Setup snap "core" (12603) security profiles (cannot reload udev rules: exit status 1 udev output: Failed to send reload request: No such file or directory )
A search reveals various bug reports about this issue, but it seems the solution is to simply run the command again?
root@host:~# snap install core 2022-02-16T10:51:54-05:00 INFO Waiting for automatic snapd restart... core 16-2.54.3 from Canonical* installed
I have no idea why running it a second time works, but I won’t look a gift horse in the mouth.