I put together some scripts for building images of NetBSD for use as MAAS custom images. It’s all pretty crude with the object of getting enough NetBSD onto the target machine so that I can then manage it with Ansible.
There is no support for disk or network configuration. The only cloud-config element that is supported is the
user array, and you are going to need to use that.
The support for BIOS boot systems was a bit entertaining because Curtin can’t read BSD filesystems and so there is a temporary FAT filesystem used. UEFI systems obviously don’t need a temporary FAT filesystem.
I’ve tested it successfully on amd64 systems with both GPT and MBR disks. I have tested it somewhat less successfully with an i386 image on an amd64 system. I do have some real i386 system that I want to use, so the i386 support will probably get fixed sometime.
You can find the code at https://github.com/lparkes/maas-netbsd
p.s. Thanks to the folks who put together the ESXi packer based image. Not only am I using it to deploy ESXi, but I also stole a while pile of code from it.