"No root device could be found" error when running snapcraft on a LXD install with customized storage pool

It’s hard to say. There are a two things working against us:

  1. Snapcraft isn’t tracking the state of the instance, so we don’t know if it something went wrong during the previous launch, setup, or warmup of the instance. (issue is here)

  2. snap remove --purge snapcraft doesn’t remove lxd instances and images, so this command doesn’t get to a clean state. This is on our roadmap.

I’d start with snapcraft clean, which will remove the instance. If that doesn’t work, there is a possibility you need to remove the cached image too, which I described here:

the not-so-pretty workaround is going to be to run snapcraft clean and delete the cached LXD image (which you can see with lxc --project snapcraft image list).