MAAS × LXD

04 · Register the LXD VM-host

We will register the LXD host in MAAS as a VM-host (sometimes called a 'pod'). This allows MAAS to compose VMs for you.

Create the VM-host

# substitute your LXD host address and credentials
maas admin vm-hosts create type=lxd power_address=https://10.0.0.10:8443 power_user=ubuntu power_pass=changeme project=maas

List VM-hosts and note the ID

maas admin vm-hosts read | jq -r '.[] | [.id, .type, .name, .total.cores, .total.memory, .total.local_storage] | @tsv' | column -t

Set default bridge for new VMs

maas admin vm-host update <ID> default_bridge=br0

Term: VM-host

An LXD or libvirt machine that MAAS uses to compose VMs. In the API and CLI, this is often called a "pod".

Credential tips

LXD HTTPS auth can use a trust password. You can also add client certificates for tighter control.