export VMSIZE=30g
export VM_EXTRA_PACKAGES="azure-agent python python3 firstboot-freebsd-update firstboot-pkgs"
export VM_RC_LIST="ntpd sshd waagent firstboot_freebsd_update firstboot_pkgs"
export NOSWAP=YES
export VM_BOOTPARTSOFFSET=1M
vm_extra_pre_umount() {
mount -t devfs devfs ${DESTDIR}/dev
chroot ${DESTDIR} ${EMULATOR} env ASSUME_ALWAYS_YES=yes \
/usr/sbin/pkg delete -f -y pkg
rm -r ${DESTDIR}/var/db/pkg/repos/FreeBSD-ports
rm -r ${DESTDIR}/var/db/pkg/repos/FreeBSD-ports-kmods
chroot ${DESTDIR} ${EMULATOR} pw usermod root -h -
umount ${DESTDIR}/dev
cat << EOF >> ${DESTDIR}/etc/rc.conf
ifconfig_hn0="SYNCDHCP"
ntpd_sync_on_start="YES"
EOF
cat << EOF >> ${DESTDIR}/boot/loader.conf
autoboot_delay="-1"
beastie_disable="YES"
loader_logo="none"
hw.memtest.tests="0"
console="comconsole efi vidconsole"
comconsole_speed="115200"
boot_multicons="YES"
boot_serial="YES"
mlx4en_load="YES"
mlx5en_load="YES"
EOF
touch ${DESTDIR}/firstboot
return 0
}