MAAS × LXD

02 · Log In and Configure

The MAAS CLI is profile-based. You log in once with an API key and a profile name (for example, "admin").

Log in and get real help

sudo maas apikey --username=admin > ~/.maas-api
maas login admin http://127.0.0.1:5240/MAAS/api/2.0/ < ~/.maas-api
maas admin --help

Term: Profile

A saved CLI session. Commands use the form maas PROFILE .... Here, admin is your profile.

Set DNS forwarders

maas admin maas set-config name=upstream_dns value="1.1.1.1,8.8.8.8"

Select and import images

Enable Ubuntu 24.04 ("noble") images for amd64, then import them.

maas admin boot-source-selections create 1 os="ubuntu" release="noble" arches="amd64" subarches="*" labels="*"
maas admin boot-resources import

Why this matters

MAAS can only deploy images you have selected and imported. Import now, so deploys do not fail later.

Verify

maas admin boot-resources read | jq -r '.[] | .name' should list your chosen releases.