Errors or typos? Topics missing? Hard to read? Let us know.
Custom Ubuntu images can be created with Packer. This page explains the essentials.
First, ensure your system can use packer:
sudo apt install packer
sudo apt install qemu-utils qemu-system ovmf cloud-image-utils
Get the essential Packer templates for MAAS:
git clone https://github.com/canonical/packer-maas.git
Create the desired image:
cd packer-maas/ubuntu
make custom-ubuntu-lvm.dd.gz
This process will take a few moments.
With your image built, make it accessible to MAAS:
maas $MAAS_USER boot-resources create name=custom/ubuntu architecture=amd64/generic filetype=ddgz content@=custom-ubuntu-lvm.dd.gz
Finally, deploy your custom image onto a node in MAAS:
maas $MAAS_USER machine deploy $SYSTEM_ID osystem=$OS [$distro_series=$DISTRO]
maas $MAAS_USER machines read | jq '.[] | {hostname, osystem}'
For further information, consult the Packer MAAS documentation^ for advanced practices.