I am trying to build a snap which accesses the local LXD service. There is a snap interface for LXD, but trying to use this gives me connection errors.
The (very brief) documentation of the interface requires you to set LXD_DIR to /var/snap/lxd/common/lxd
. I tried both that as well as /var/lib/lxd/
.
I am currently running Ubuntu 18.04 with a apt based installation of LXD 3.0.3. Is it possible, that the snap interface only works for a snap based installation of LXD? If yes, is there some way to interface to a apt based LXD from within the snap?
Yes, to use the
lxd-support
snap interface, you need to migrate to the LXD snap package.Note that your snap package needs to manually connect to the
lxd-support
interface.If you want your snap to access the deb package of LXD, then you need to forgo all protections in snap packages. Use either
classic
ordevmode
confinement.