lxc / incus

Powerful system container and virtual machine manager
https://linuxcontainers.org/incus
Apache License 2.0
2.69k stars 222 forks source link

Lxd-to-incus should also look in /var/snap/lxd #348

Closed mgariepy closed 10 months ago

mgariepy commented 10 months ago

Required information

Issue description

lxd-to-incus fail with

=> Looking for source server
Error: No source server could be found

Steps to reproduce

https://github.com/lxc/incus/blob/main/cmd/lxd-to-incus/sources_snap.go#L14C1-L20

looking at this if the /snap/lxd directory doesn't exist it can't fall back to /var/snap/

workaround

creating the /snap/lxd dir pass the check and the lxd-to-incus can be launched sucessfully.

stgraber commented 10 months ago

/var/snap/lxd isn't an equivalent of /snap/lxd, what path is used as the equivalent on your platform? It's probably something under /var/lib/snap or the like.

stgraber commented 10 months ago

You should be able to easily tell by looking at /proc/mounts and seeing where the .snap files are mounted.

mgariepy commented 10 months ago

they were mounted in /var/lib/snapd/snap