vmrc
vmrc copied to clipboard
Add support for FreeBSD "firstboot" script
It would be really nice to have a way to spin the machine up and do some setup things like get salt installed and pre-seeded with their respective master and to put them into a "highstate" on the first boot of the VM.
Maybe the template can specify a vm_firstboot
FreeBSD specific key that can contain the path to a script to put inplace as firstboot
on the filesystem?
Note that the VM directory has a number of scripts and log that are generated at the first boot.
You should be able to simply check for the existence of $host_vmdir/$1/bhyve_cmd.sh with a preflight script. This is more or less what I would have to do to determine if the VM has been booted or not.