MAAS × LXD

07 · Commission and Deploy

Commission new VMs to discover hardware and prepare them for deployment. Then deploy Ubuntu with a cloud-init user so you can log in via SSH.

Commission

maas admin machine commission <SYSID> enable_ssh=true testing_scripts="none"

Deploy Ubuntu 24.04 (noble)

USER_DATA=$(base64 -w0 <<'YAML'
#cloud-config
users:
  - name: ubuntu
    groups: sudo
    shell: /bin/bash
    sudo: "ALL=(ALL) NOPASSWD:ALL"
    ssh_import_id: gh:your-github-username
YAML
)
maas admin machine deploy <SYSID> os=ubuntu release=noble user_data="$USER_DATA"

SSH in

ssh ubuntu@ace-01

Term: cloud-init

A first-boot configuration system. MAAS passes your user-data to the image so the user and keys exist on first boot.

Verify image availability

If deploy fails immediately, double-check that images are imported (Chapter 02) and that your VM NIC is on a managed subnet (Chapter 06).