I'm not talking about the cloud-init in the guest, but rather something to generate server-side templates for bhyve guests to use.
I have something I kludged together for my purposes to inject ssh keys, host names, etc. I'm using openstack config-drive metadata because it's what I was familiar with but it's kind of inconvenient. (For the unfamiliar, its an extra tiny block device containing either a fat or iso9660 fs, with json/yaml/files/etc inside).
I figured I should ask if I'm missing something that has already been done. Thoughts?
Slightly irritating: the openstack config drive MUST have the label "config-2". FreeBSD's makefs and libarchive will not do this. cdrtools mkisofs will allow this slightly-illegal name. I may have done a sed on the makefs-generated file system.
@karinjiri I haven't played around with this for bhyve yet, but I bookmarked this because this blog post seemed to show multiple ways you can do the cloud-init config. Perhaps it has useful tips in it for your environment as well.
FWIW, this is almost exactly what I needed. I was already using vm-bhyve. With a few tweaks, this does exactly what I needed for rapid spinup direct from unmodified "cloud" images:
No installation, no dhcp, static network config, no custom images.
Tweaks: I fixed multiple ssh keys, changed ahci-cd to virtio-blk (which stops a bunch of linux kernel noise), and changed gateway4 -> routes since that generates a deprecation warning on modern clients.