Instructions for building a NetBSD VM
vmadm create < netbsd-install.json
vmadm list
zoneuuid=...
cp NetBSD-6.0-amd64.iso /zones/$zoneuuid/root/netbsd.iso
vmadm boot $zoneuuid order=cd,once=d cdrom=/netbsd.iso,ide
vmadm info $zoneuuid vnc
You can now VNC to vnc.host:vnc.port as per the output of the vmadm info
command, and perform the OS install.
Once the install is done, 'poweroff' in the VM.
Take a snapshot of the installed image, update the image manifest with the image size and SHA1, then install it.
zfs snapshot zones/$zoneuuid-disk0@snap
zfs send !$ | gzip >netbsd6-0.0.1.zvol.gz
ls -l !$
digest -a sha1 !$
vi netbsd6-0.0.1.json # add size and sha1
imgadm install -m netbsd6-0.0.1.json -f netbsd6-0.0.1.zvol.gz
Finally, now that the image is installed, we can create as many NetBSD images from it as we want.
vmadm create < netbsd.json