snapd icon indicating copy to clipboard operation
snapd copied to clipboard

interfaces/builtin: add devlxd interface implementation

Open morphis opened this issue 4 weeks ago • 2 comments

This implements an interface for the socket LXD provides to all instances to allow communication with the hypervisor for additional configuration (e.g. user supplied metadata). See https://documentation.ubuntu.com/lxd/latest/dev-lxd/ for details on the API itself.

The interface slot is hosted on the core snap and auto connection is denied by default. It allows access to both /dev/lxd/sock and /var/snap/lxd/common/lxd/devlxd/sock as the first is what we have inside VM and the second in container instances.


Opening this as a draft to get initial discussion in place and agree if this is the right direction forward. I've picked "devlxd" as name for the interface as that is what LXD calls the feature, however it might be desirable to have something with "lxd-" as prefix to going with the existing names for other LXD related interfaces (lxd-support, lxd).

Note, the spread test still needs adjustments and is not yet meant to work as-is.

Happy to make adjustments as needed :-)

morphis avatar Dec 01 '25 09:12 morphis