18.04 container not starting on dir storage backend but 16.04 does?

Hi

Strange issue. I can launch 16.04 containers on my new dir storage which is using an xfs formatted lvm volume with a directory for the source.

18.04 containers seem to come up with an error though?

Also 18.04 containers working fine on my present ZFS backed storage.

root@server01:/xfs/lxd/containers# lxc list
+------+-------+------+------+------+-----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
+------+-------+------+------+------+-----------+
root@server01:/xfs/lxd/containers# lxc launch ubuntu:18.04 -s dir1 -n lxdbr0
Creating the container
Error: Failed container creation: Create container from image: Unpack image: open /var/snap/lxd/common/lxd/images/30b9f587eb6fb50566f4183240933496d7b787f719aafb4b58e6a341495a38ad: no such file or directory
root@server01:/xfs/lxd/containers# lxc launch ubuntu:16.04 -s dir1 -n lxdbr0 
Creating the container
Container name is: light-cricket            
Starting light-cricket
root@server01:/xfs/lxd/containers# lxc list
+---------------+---------+------+-----------------------------------------------+------------+-----------+
|     NAME      |  STATE  | IPV4 |                     IPV6                      |    TYPE    | SNAPSHOTS |
+---------------+---------+------+-----------------------------------------------+------------+-----------+
| light-cricket | RUNNING |      | fd42:9021:b31a:65cb:216:3eff:fedf:2149 (eth0) | PERSISTENT |           |
+---------------+---------+------+-----------------------------------------------+------------+-----------+
root@server01:/xfs/lxd/containers# 

root@server01:/xfs/lxd/containers# lxc storage list
+------------+-------------+--------+-----------------------------------------------+---------+
|    NAME    | DESCRIPTION | DRIVER |                    SOURCE                     | USED BY |
+------------+-------------+--------+-----------------------------------------------+---------+
| btrfs1     |             | btrfs  | d887486e-0125-4da3-85a4-b4c20b026634          | 0       |
+------------+-------------+--------+-----------------------------------------------+---------+
| ceph1      |             | ceph   | ceph1                                         | 1       |
+------------+-------------+--------+-----------------------------------------------+---------+
| default    |             | zfs    | mirr1tb                                       | 17      |
+------------+-------------+--------+-----------------------------------------------+---------+
| dir1       |             | dir    | /xfs/lxd                                      | 0       |
+------------+-------------+--------+-----------------------------------------------+---------+
| juju-btrfs |             | btrfs  | /var/snap/lxd/common/lxd/disks/juju-btrfs.img | 0       |
+------------+-------------+--------+-----------------------------------------------+---------+
| juju-zfs   |             | zfs    | /var/snap/lxd/common/lxd/disks/juju-zfs.img   | 0       |
+------------+-------------+--------+-----------------------------------------------+---------+
| zfs2       |             | zfs    | large1-5/zfs2                                 | 5       |
+------------+-------------+--------+-----------------------------------------------+---------+
root@server01:/xfs/lxd/containers# 

Any ideas?
:slight_smile:
Cheers,
Jon.

What does lxc image list show you?
If it lists an 18.04 image, try deleting it from the local image store, then try launching the container again.

Hi,

Weird, its not even working for 16.04 now, something strange with the way I created my dir storage.

Here goes:

jon@server01:~$ lxc image list
+-------+--------------+--------+---------------------------------------------+--------+----------+------------------------------+
| ALIAS | FINGERPRINT  | PUBLIC |                 DESCRIPTION                 |  ARCH  |   SIZE   |         UPLOAD DATE          |
+-------+--------------+--------+---------------------------------------------+--------+----------+------------------------------+
|       | 4449aa491760 | no     | ubuntu 16.04 LTS amd64 (release) (20181030) | x86_64 | 158.08MB | Oct 30, 2018 at 9:00pm (UTC) |
+-------+--------------+--------+---------------------------------------------+--------+----------+------------------------------+
jon@server01:~$ lxc launch ubuntu:18.04 test1804
Creating test1804
Error: Failed container creation: Create container: Create LXC container: Invalid devices: Detect root disk device: No root device could be found
jon@server01:~$ lxc launch ubuntu:18.04 test1804 -s dir1
Creating test1804
Error: Failed container creation: Create container from image: Unpack image: open /var/snap/lxd/common/lxd/images/30b9f587eb6fb50566f4183240933496d7b787f719aafb4b58e6a341495a38ad: no such file or directory
jon@server01:~$ 

jon@server01:~$ lxc image list
+-------+--------------+--------+---------------------------------------------+--------+----------+------------------------------+
| ALIAS | FINGERPRINT  | PUBLIC |                 DESCRIPTION                 |  ARCH  |   SIZE   |         UPLOAD DATE          |
+-------+--------------+--------+---------------------------------------------+--------+----------+------------------------------+
|       | 4449aa491760 | no     | ubuntu 16.04 LTS amd64 (release) (20181030) | x86_64 | 158.08MB | Oct 30, 2018 at 9:00pm (UTC) |
+-------+--------------+--------+---------------------------------------------+--------+----------+------------------------------+
jon@server01:~$ lxc launch ubuntu:18.04 test1804
Creating test1804
Error: Failed container creation: Create container: Create LXC container: Invalid devices: Detect root disk device: No root device could be found
jon@server01:~$ lxc launch ubuntu:18.04 test1804 -s dir1
Creating test1804
Error: Failed container creation: Create container from image: Unpack image: open /var/snap/lxd/common/lxd/images/30b9f587eb6fb50566f4183240933496d7b787f719aafb4b58e6a341495a38ad: no such file or directory
jon@server01:~$

I’ll go back to the drawing board and re-create it from scratch, see what happens.