Snap Packages in Ubuntu Containers?

ncage

Member
Jan 28, 2022
7
0
6
50
Hi guys, I have googled this extensively and have been unable to get snap packages working in a ubuntu container.

I've enabled fuse & nesting in my container. I've tried to follow the following post:
https://forum.proxmox.com/threads/ubuntu-snaps-inside-lxc-container-on-proxmox.36463/#post-230060

I'm running ubuntu 20.04. The container is an unprivileged container. If you look at the post I linked the following instructions:
1) Put this in /etc/pve/lxc/$vmid.conf:
Code:
...
features: mount=fuse,nesting=1
lxc.mount.entry = /dev/fuse dev/fuse none bind,create=file 0 0

So I change my conf add added the config changes above. For some reason features: mount=fuse,nesting=1 keeps getting removes automatically from config file.

I also installed squashfuse & fuse

When I do a snap install:

Code:
sudo snap install adguard-home
error: cannot perform the following tasks:
- Setup snap "adguard-home" (3544) security profiles (cannot setup udev for snap "adguard-home": cannot reload udev rules: exit status 1
udev output:
Failed to send reload request: No such file or directory
)
- Setup snap "adguard-home" (3544) security profiles (cannot reload udev rules: exit status 1
udev output:
Failed to send reload request: No such file or directory
)
- Setup snap "adguard-home" (3544) security profiles for auto-connections (cannot reload udev rules: exit status 1
udev output:
Failed to send reload request: No such file or directory
)

Edit I added the following in the conf file (in addition to what i already had) that I found in another post and it fixed the issue:
Code:
lxc.mount.auto: cgroup:rw
lxc.mount.auto: sys:rw



I just installed proxmox for the first time today. I'm hoping I can figure out how to use snapd in a container because that was one of the main use cases I wanted to have when coming to proxmox. Any help would be greatly appreciated.

Edit:
I guess this would be useful it looks like i'm running pve version 7.1-10
 
Last edited:
hi,

you should rather just do: pct set 123 -features nesting=1,fuse=1 (123 is your container)

so you don't need the lxc.mount.entry (nor the lxc.mount.auto entries iirc), and inside the features you can pass fuse=1,nesting=1 instead of passing mount=fuse,nesting=1
it should work afterwards

hope this helps
 
it doesn't work for a 24.04 container .. :/
Did someone was able to make snapd or flatpak work in a 24.04 ubuntu container?
Thanks!