I am having the same issue on MAAS 3.2.6 using a refreshly deployed machine. Due to a bug in 3.2.6, I can’t use maas to initialize LXD on the host so I have to manually do it with LXD init.
VM Host:
$ lxd init
Would you like to use LXD clustering? (yes/no) [default=no]:
Do you want to configure a new storage pool? (yes/no) [default=yes]:
Name of the new storage pool [default=default]:
Name of the storage backend to use (dir, lvm, zfs, btrfs, ceph, cephobject) [default=zfs]: dir
Would you like to connect to a MAAS server? (yes/no) [default=no]: yes
What's the name of this host in MAAS? [default=smoothwall-lxc]:
URL of your MAAS server (e.g. http://1.2.3.4:5240/MAAS): http://10.160.1.10:5240/MAAS
API key for your MAAS server: <redacted>
Would you like to create a new local network bridge? (yes/no) [default=yes]:
What should the new bridge be called? [default=lxdbr0]:
What IPv4 address should be used? (CIDR subnet notation, “auto” or “none”) [default=auto]:
What IPv6 address should be used? (CIDR subnet notation, “auto” or “none”) [default=auto]:
Would you like the LXD server to be available over the network? (yes/no) [default=no]: yes
Address to bind LXD to (not including port) [default=all]:
Port to bind LXD to [default=8443]:
Trust password for new clients:
Again:
Would you like stale cached images to be updated automatically? (yes/no) [default=yes]:
Would you like a YAML "lxd init" preseed to be printed? (yes/no) [default=no]:
MAAS:
$ maas ben vm-hosts read | jq '.[] | select (.name=="smoothwall-lxc")'
{
"available": {
"cores": 0,
"memory": 0,
"local_storage": 471146233856
},
"capabilities": [
"composable",
"dynamic_local_storage",
"over_commit",
"storage_pools"
],
"total": {
"cores": 0,
"memory": 0,
"local_storage": 471146233856
},
"zone": {
"name": "default",
"description": "",
"id": 1,
"resource_uri": "/MAAS/api/2.0/zones/default/"
},
"architectures": [
"amd64/generic"
],
"cpu_over_commit_ratio": 1,
"memory_over_commit_ratio": 1,
"storage_pools": [
{
"id": "default",
"name": "default",
"type": "dir",
"path": "/var/snap/lxd/common/lxd/storage-pools/default",
"total": 471146233856,
"used": 0,
"available": 471146233856,
"default": true
}
],
"host": {
"system_id": "qnmbfd",
"__incomplete__": true
},
"tags": [
"pod-console-logging"
],
"version": "5.6",
"pool": {
"name": "default",
"description": "Default pool",
"id": 0,
"resource_uri": "/MAAS/api/2.0/resourcepool/0/"
},
"used": {
"cores": 0,
"memory": 0,
"local_storage": 0
},
"type": "lxd",
"name": "smoothwall-lxc",
"default_macvlan_mode": null,
"id": 9,
"resource_uri": "/MAAS/api/2.0/vm-hosts/9/"
}
$ maas ben vm-host compose 9 hostname=juju-controller cores=2 memory=4096 storage='bootvol:40(default)' interfaces='eth0:space=admin-space;eth1:space=data-space'
{"cores": ["Ensure this value is less than or equal to 0."], "memory": ["Ensure this value is less than or equal to 0."]}