Adding a new container gives this error:Error: Failed instance creation: Failed creating instance record: Failed initialising instance: Invalid devices: Failed detecting root disk device: No root device could be found

This problem just started happening no more than 3 days ago. Probably some upgrade. I tried adding default profile but it says it already exists. see below. Any ideas. Thanks

# lxc launch ubuntu:18.04 QMAIL24 --target Q3
Creating QMAIL24
Error: Failed instance creation: Failed creating instance record: Failed initialising instance: Invalid devices: Failed detecting root disk device: No root device could be found
# lxc image list
+-------+--------------+--------+---------------------------------------------+--------------+-----------+----------+-------------------------------+
| ALIAS | FINGERPRINT  | PUBLIC |                 DESCRIPTION                 | ARCHITECTURE |   TYPE    |   SIZE   |          UPLOAD DATE          |
+-------+--------------+--------+---------------------------------------------+--------------+-----------+----------+-------------------------------+
|       | 68fc6b23c41b | no     | ubuntu 18.04 LTS amd64 (release) (20210325) | x86_64       | CONTAINER | 190.74MB | Mar 26, 2021 at 4:06am (UTC)  |
+-------+--------------+--------+---------------------------------------------+--------------+-----------+----------+-------------------------------+
|       | 46701fa2d99c | no     | ubuntu 20.04 LTS amd64 (release) (20210325) | x86_64       | CONTAINER | 360.90MB | Mar 26, 2021 at 10:06pm (UTC) |
+-------+--------------+--------+---------------------------------------------+--------------+-----------+----------+-------------------------------+
# lxc storage show default
Error: not found
# lxc profile device add default root disk path=/ pool=default
Error: The device already exists
# lxc profile show default
config: {}
description: Default LXD profile
devices:
  eth0:
    name: eth0
    nictype: bridged
    parent: lxdfan0
    type: nic
  root:
    path: /
    pool: local
    type: disk
name: default
used_by:
- /1.0/instances/WP-QUANTUMAI-2020-mar6-bk
- /1.0/instances/WP-HAPPYDOGS-2020-mar28
- /1.0/instances/EMPODERATE-2020-mar6 .......
# lxc project ls
+-------------------+--------+----------+-----------------+----------+---------------------+---------+
|       NAME        | IMAGES | PROFILES | STORAGE VOLUMES | NETWORKS |     DESCRIPTION     | USED BY |
+-------------------+--------+----------+-----------------+----------+---------------------+---------+
| default (current) | YES    | YES      | YES             | YES      | Default LXD project | 188     |
+-------------------+--------+----------+-----------------+----------+---------------------+---------+
# lxc profile device add default root disk path=/ pool=default
Error: The device already exists
# lxc version
Client version: 4.12
Server version: 4.12

Most likely the image got detached from its profiles.
A workaround for that is to manually pass -p default during launch.
Permanent fix is to look at lxc image list for the relevant cached entry, then use lxc image edit and add default back to the list of profiles.

If you have any clue on how to reproduce this kind of broken images, let us know as we’ve put a bunch of logic in place already that should have avoided this issue, but given you’re running 4.12 and still see it, something else appears to be wrong.