MAAS × LXD

03 · Prepare the LXD Host

We will prepare an LXD host that MAAS can control over HTTPS, and create a bridge that MAAS-managed DHCP can reach.

Install and initialize LXD

sudo snap install lxd
sudo lxd init --auto

Enable the HTTPS API and set a trust password

lxc config set core.https_address :8443
lxc config set core.trust_password "changeme"

Create or verify a bridge

# list networks
lxc network list
# create a bridge (example: br0 on 192.168.123.0/24)
lxc network create br0 ipv4.address=192.168.123.1/24 ipv4.nat=false ipv6.address=none

Why a bridge?

Composed VMs need to live on a network MAAS manages. The bridge connects VMs to your lab subnet where DHCP will run.

Watch out

Do not enable br0 NAT if you intend MAAS to manage addresses on that segment.