VM creation fails in a newly created project

Hi All,

I am trying to launch a VM within local-project as shown below and it fails. But if I switch back to default project it works fine. How can i troubleshoot this scenario ?

# sudo lxc launch ubuntu:22.04 --vm mm01
Creating mm01
Error: Failed instance creation: Failed creating instance record: Failed initialising instance: Failed getting root disk: No root device could be found
#
# lxc storage list 
+-------------+--------+------------------------------------------------+-------------+---------+---------+
|    NAME     | DRIVER |                     SOURCE                     | DESCRIPTION | USED BY |  STATE  |
+-------------+--------+------------------------------------------------+-------------+---------+---------+
| lxd-storage | zfs    | /var/snap/lxd/common/lxd/disks/lxd-storage.img |             | 2       | CREATED |
+-------------+--------+------------------------------------------------+-------------+---------+---------+
#
# lxc project list 
+-------------------------+--------+----------+-----------------+-----------------+----------+---------------+-------------------------+---------+
|          NAME           | IMAGES | PROFILES | STORAGE VOLUMES | STORAGE BUCKETS | NETWORKS | NETWORK ZONES |       DESCRIPTION       | USED BY |
+-------------------------+--------+----------+-----------------+-----------------+----------+---------------+-------------------------+---------+
| default                 | YES    | YES      | YES             | YES             | YES      | YES           | Default LXD project     | 3       |
+-------------------------+--------+----------+-----------------+-----------------+----------+---------------+-------------------------+---------+
| local-project (current) | YES    | YES      | YES             | YES             | NO       | NO            |                         | 2       |
+-------------------------+--------+----------+-----------------+-----------------+----------+---------------+-------------------------+---------+
| maas-project            | YES    | YES      | YES             | YES             | NO       | NO            | Project managed by MAAS | 2       |
+-------------------------+--------+----------+-----------------+-----------------+----------+---------------+-------------------------+---------+
#
# lxc project switch default 
#
# lxc project ls
+-------------------+--------+----------+-----------------+-----------------+----------+---------------+-------------------------+---------+
|       NAME        | IMAGES | PROFILES | STORAGE VOLUMES | STORAGE BUCKETS | NETWORKS | NETWORK ZONES |       DESCRIPTION       | USED BY |
+-------------------+--------+----------+-----------------+-----------------+----------+---------------+-------------------------+---------+
| default (current) | YES    | YES      | YES             | YES             | YES      | YES           | Default LXD project     | 3       |
+-------------------+--------+----------+-----------------+-----------------+----------+---------------+-------------------------+---------+
| local-project     | YES    | YES      | YES             | YES             | NO       | NO            |                         | 2       |
+-------------------+--------+----------+-----------------+-----------------+----------+---------------+-------------------------+---------+
| maas-project      | YES    | YES      | YES             | YES             | NO       | NO            | Project managed by MAAS | 2       |
+-------------------+--------+----------+-----------------+-----------------+----------+---------------+-------------------------+---------+
#
# lxc launch ubuntu:22.04 --vm mm01
Creating mm01
Starting mm01                               
#

My bad.

This issue is resolved since the default profile in my project is not properly configured.
Need to close the ticket…

Thanks for reporting. :+1: There might be a “mark as answer” button here somewhere? If so, please use that and it’ll be even easier for others to see what was the solution in this case.

I’ve now added a note to the documentation that mentions this:
https://documentation.ubuntu.com/lxd/en/latest/howto/projects_create/
It’s a common problem and not very intuitive. :slight_smile:

2 Likes

well i dont see the button

It should be under the post:

image

I dont see any