Commissioning VM in LXD host fails

@troyanov

As i was mentioning in my previous replies, I was suspecting the profile of maas-project is incomplete and it might be resulting in this error. As shown in below logs, other projects like default and client1-iso-project are working fine.

If the maas-project is the lxc project which is automatically created by the MAAS UI in the server, does user need to explicitly modify the same to make it work ?

# lxc project ls 
+-------------------------------+--------+----------+-----------------+-----------------+----------+---------------+-------------------------+---------+
|             NAME              | IMAGES | PROFILES | STORAGE VOLUMES | STORAGE BUCKETS | NETWORKS | NETWORK ZONES |       DESCRIPTION       | USED BY |
+-------------------------------+--------+----------+-----------------+-----------------+----------+---------------+-------------------------+---------+
| client1-iso-project (current) | YES    | YES      | YES             | YES             | NO       | NO            |                         | 9       |
+-------------------------------+--------+----------+-----------------+-----------------+----------+---------------+-------------------------+---------+
| default                       | YES    | YES      | YES             | YES             | YES      | YES           | Default LXD project     | 3       |
+-------------------------------+--------+----------+-----------------+-----------------+----------+---------------+-------------------------+---------+
| maas-project                  | YES    | YES      | YES             | YES             | NO       | NO            | Project managed by MAAS | 4       |
+-------------------------------+--------+----------+-----------------+-----------------+----------+---------------+-------------------------+---------+
# 
# lxc ls --project client1-iso-project
+---------------+---------+-----------------------+-------------------------------------------------+-----------------+-----------+
|     NAME      |  STATE  |         IPV4          |                      IPV6                       |      TYPE       | SNAPSHOTS |
+---------------+---------+-----------------------+-------------------------------------------------+-----------------+-----------+
| debian12      | RUNNING | 10.231.47.64 (eth0)   | fd42:a037:1fd4:913b:216:3eff:fe11:8897 (eth0)   | CONTAINER       | 0         |
+---------------+---------+-----------------------+-------------------------------------------------+-----------------+-----------+
| rocky9        | RUNNING | 10.231.47.23 (enp5s0) | fd42:a037:1fd4:913b:d51d:894:e79b:5a21 (enp5s0) | VIRTUAL-MACHINE | 0         |
+---------------+---------+-----------------------+-------------------------------------------------+-----------------+-----------+
| ubuntulobster | RUNNING | 10.231.47.81 (enp5s0) | fd42:a037:1fd4:913b:216:3eff:fea7:86bb (enp5s0) | VIRTUAL-MACHINE | 0         |
+---------------+---------+-----------------------+-------------------------------------------------+-----------------+-----------+
# 
# lxc ls --project default
+------+-------+------+------+------+-----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
+------+-------+------+------+------+-----------+
root@mltr01:/home/codingfreak# 
root@mltr01:/home/codingfreak# lxc ls --project maas-project
+--------+---------+------+------+-----------------+-----------+
|  NAME  |  STATE  | IPV4 | IPV6 |      TYPE       | SNAPSHOTS |
+--------+---------+------+------+-----------------+-----------+
| test01 | STOPPED |      |      | VIRTUAL-MACHINE | 0         |
+--------+---------+------+------+-----------------+-----------+
| testVM | STOPPED |      |      | VIRTUAL-MACHINE | 0         |
+--------+---------+------+------+-----------------+-----------+
# 
# lxc profile show default --project maas-project
config: {}
description: Default LXD profile for project maas-project
devices: {}
name: default
used_by: []
# 
# lxc profile show default --project client1-iso-project
config: {}
description: Default LXD profile for project client1-iso-project
devices:
  eth0:
    name: eth0
    network: lxdbr0
    type: nic
  root:
    path: /
    pool: lxd-storage
    type: disk
name: default
used_by:
- /1.0/instances/ubuntulobster?project=client1-iso-project
- /1.0/instances/rocky9?project=client1-iso-project
- /1.0/instances/debian12?project=client1-iso-project
# 
# lxc profile show default --project default
config: {}
description: Default LXD profile
devices:
  eth0:
    name: eth0
    network: lxdbr0
    type: nic
  root:
    path: /
    pool: lxd-storage
    type: disk
name: default
used_by: []

So i modified the profile under maas-project accordingly as shown below and then I am able to manually launch new instances

# lxc launch ubuntu:22.04 webserver --project maas-project 
Creating webserver
Starting webserver
#
# lxc ls --project maas-project 
+-----------+---------+---------------------+-----------------------------------------------+-----------+-----------+
|   NAME    |  STATE  |        IPV4         |                     IPV6                      |   TYPE    | SNAPSHOTS |
+-----------+---------+---------------------+-----------------------------------------------+-----------+-----------+
| webserver | RUNNING | 10.231.47.89 (eth0) | fd42:a037:1fd4:913b:216:3eff:fe8d:a93a (eth0) | CONTAINER | 0         |
+-----------+---------+---------------------+-----------------------------------------------+-----------+-----------+
#
# lxc profile show default --project maas-project 
config: {}
description: Default LXD profile for project maas-project
devices:
  eth0:
    name: eth0
    network: lxdbr0
    type: nic
  root:
    path: /
    pool: lxd-storage
    type: disk
name: default
used_by:
- /1.0/instances/webserver?project=maas-project

Now if I am try to create new VM from MAAS it fails as VM is getting created with empty mac-address and ends up in broken stage