1. Find the affected LXD host ID either from the MAAS UI URL or CLI
$ maas ${PROFILE} vm-hosts read
2. SSH to the controller housing the PostgresSQL and login to DB (For reference only - your DB name is different):
$ sudo -u postgres psql maasdb
3. Update the cores and memory data for the LXD host based on what your hardware has (Running the CLI command after this will show the updated resources):
maasdb=# select * from maasserver_bmc where id=<LXD-host-ID>;
maasdb=# update maasserver_bmc set cores=64,memory=51200 where id=<LXD-host-ID>;
UPDATE 1
4. Compose a VM using MAAS CLI, only specify the VM name:
I encountered this exact same issue with MAAS 3.3.5:
$ maas ${PROFILE} vm-host read 175 over_commit_ ratio": 1.0, macvlan_ mode": null, res": [
"amd64/ generic"
"composable" ,
"dynamic_ local_storage" ,
"over_ commit" ,
"storage_ pools"
"description" : "Default pool",
"resource_ uri": "/MAAS/ api/2.0/ resourcepool/ 0/"
"system_ id": "mht63q",
"__incomplete_ _": true
"local_ storage" : 234622992384
"local_ storage" : 234622992384
"description" : "",
"resource_ uri": "/MAAS/ api/2.0/ zones/default/ " over_commit_ ratio": 1.0,
"local_ storage" : 0
"pod-console- logging" pools": [
"total" : 234622992384,
"available ": 234622992384,
"default" : true api/2.0/ vm-hosts/ 175/"
Success.
Machine-readable output follows:
{
"version": "5.20",
"cpu_
"default_
"type": "lxd",
"architectu
],
"capabilities": [
],
"pool": {
"name": "default",
"id": 0,
},
"host": {
},
"id": 175,
"total": {
"cores": 0,
"memory": 0,
},
"name": "os-node-1",
"available": {
"cores": 0,
"memory": 0,
},
"zone": {
"name": "default",
"id": 1,
},
"memory_
"used": {
"cores": 0,
"memory": 0,
},
"tags": [
],
"storage_
{
"id": "default",
"name": "default",
"type": "dir",
"path": "Unknown",
"used": 0,
}
],
"resource_uri": "/MAAS/
}
Here is a quick workaround until this is fixed:
1. Find the affected LXD host ID either from the MAAS UI URL or CLI
$ maas ${PROFILE} vm-hosts read
2. SSH to the controller housing the PostgresSQL and login to DB (For reference only - your DB name is different):
$ sudo -u postgres psql maasdb
3. Update the cores and memory data for the LXD host based on what your hardware has (Running the CLI command after this will show the updated resources):
maasdb=# select * from maasserver_bmc where id=<LXD-host-ID>;
maasdb=# update maasserver_bmc set cores=64, memory= 51200 where id=<LXD-host-ID>;
UPDATE 1
4. Compose a VM using MAAS CLI, only specify the VM name:
$ maas ${PROFILE} vm-hosts compose <LXD-host-ID> vm-name
5. Check the MAAS UI and wait for the initial commissioning to finish.
6. SSH to the LXD host to modify the resources (limits.cpu, limits.memory, disk etc):
$ sudo lxc config edit vm-name
7. Recommission the machine to reflect the hardware changes.