When the LXD snap updated to 4.5, none of my X11 enabled containers was able to start. This issue is already being discussed in the 4.5 announcement thread.
I tried to revert to the previous version using first
sudo snap revert lxd (just changed revision but staed at 4.5) then calling
snap refresh --channel=4.4/stable.
The channel change somehow disrupted the database of containers.
lxc list showed nothing. Calling back
snap refresh --channel=4.5/stable didn’t help either, so I started to mount the respective zfs containers following Simos’ blog post.
I was able to recover only one of them - the one that has no X11 profile enabled. The remaining 17 containers return an error:
sudo lxd import xyz Error: The instance's directory "/var/snap/lxd/common/lxd/storage-pools/default/containers/xyz" appears to be empty. Please ensure that the instance's storage volume is mounted
I checked the path and no, it is not empty. Everything is there:
Please help me to figure out how I can recover all the containers. I use them for my work and this is a very serious problem for me.