Running snap inside a lxd container fails

Base: Ubuntu 21.10
LXD: 4.20 - snap latest/stable
Container: focal / bionic, tested both

When starting a new lxd either via launch or juju and consequently try to install a snap that depends on network sockets and various network services that are contained in this it does fail.
Symptoms are in the container that there are permission denies on the socket files that are created, and on the host I see various chown permission denies in the audit log.

Tries installing squashfuse, but that did not make a difference (restart did also not change anything).

Would like some more hints on how I can debug this. The snap itself runs fine on the host.

Manually creating a vm manages by lxd (passing the --vm on the launch line), does give me a situation that works,

I believe you need to enable security.nesting=true on the outer container.

See Instances | LXD

Hi @tomp,

Thanks for the answer, but that did not help. I suspect it is a kernel issue with impish, as a ‘downgrade’ to focal solved the problems and there everything works as expected and advertised.

Please could you log an issue over at https://github.com/lxc/lxd/issues thanks

Done https://github.com/lxc/lxd/issues/9642

Could not add all info, as I switched my machine to Focal to continue development and work around this problem

1 Like