Snap Packages in Ubuntu Containers?

ncage

New Member
Jan 28, 2022
3
0
1
47
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:

oguz

Proxmox Staff Member
Staff member
Nov 19, 2018
4,990
630
118
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
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get your own in 60 seconds.

Buy now!