Closed bazuchan closed 2 years ago
Can you try another image?
I have tried jammy, focal, bionic and debian buster and got same error.
Can you show:
ls -lh /var/snap/lxd/common/lxd/storage-pools/default/containers/ge
ls -lh /var/snap/lxd/common/lxd/storage-pools/default/containers/ge/rootfs
ls -lh /var/snap/lxd/common/lxd/storage-pools/default/containers/ge/rootfs/sbin
% lxc launch images:ubuntu/jammy/amd64 ge1
Creating ge1
Starting ge1
Error: Failed to run: /snap/lxd/current/bin/lxd forkstart ge1 /var/snap/lxd/common/lxd/containers /var/snap/lxd/common/lxd/logs/ge1/lxc.conf:
Try `lxc info --show-log local:ge1` for more info
# ls -lh /var/snap/lxd/common/lxd/storage-pools/default/containers/ge1
total 8,0K
-r-------- 1 root root 2,8K мая 18 10:31 backup.yaml
drwxr-xr-x 5 root root 4,0K мая 18 10:31 rootfs
# ls -lh /var/snap/lxd/common/lxd/storage-pools/default/containers/ge1/rootfs
total 12K
drw-r--r-- 2 root root 4,0K мая 18 10:31 dev
drwxr-xr-x 2 root root 4,0K мая 18 10:31 proc
drwxr-xr-x 2 root root 4,0K мая 18 10:31 sys
# ls -lh /var/snap/lxd/common/lxd/storage-pools/default/containers/ge1/rootfs/sbin
ls: cannot access '/var/snap/lxd/common/lxd/storage-pools/default/containers/ge1/rootfs/sbin': No such file or directory
OK so looks like your images are not being unpacked correctly.
Please can you rule out any issues with problematic cached images by doing lxc image list
, finding the entry of the image you are trying to launch and then doing lxc image delete <fingerprint>
for that image.
Than try launching the instance again and this should trigger a fresh image be downloaded.
If you still have issues, please can you run sudo du -h /var/snap/lxd/common/lxd/storage-pools/default/containers/ge1/
so we can see how much is inside the image.
And please also look for any AppArmor denials in your log, using journalctl -b | grep DENIED
Looks I found root of the problem. I have
# ls -la /var/snap/lxd/common/lxd/storage-pools
lrwxrwxrwx 1 root root 9 мар 13 2018 /var/snap/lxd/common/lxd/storage-pools -> /home/lxd
and it breaks image unpacking now. Coping container from another lxc host works fine btw.
Hrm, that is highly unusual agreed. What makes you think this is the cause?
I believe @stgraber doesn't recommend using that approach (see this recent post https://discuss.linuxcontainers.org/t/lxd-broken-after-setting-custom-backups-storage/14102/6?u=tomp).
Have you considered using a bind mount instead of a symlink?
Hrm, that is highly unusual agreed. What makes you think this is the cause?
I have created new storage pool in default location and have no problem launching with new pool.
I believe @stgraber doesn't recommend using that approach (see this recent post https://discuss.linuxcontainers.org/t/lxd-broken-after-setting-custom-backups-storage/14102/6?u=tomp).
Have you considered using a bind mount instead of a symlink?
I'm moving instances to new pool, so my problem is solved. You can close issue if it is expected behavior.
Required information
Issue description
Can't launch new containers.
Installed from snap stable.