Since the vm rc script can create bridges and since firewalls (like pf) may actually reference these bridges, make sure that the bridges are created before we start them. This makes the firewalls fail to start because an interface is missing.
FreeBSD 11 shows "grep: /var/run/dmesg.boot: No such file or directory"
error messages when booting. I tracked these down to the
util::check_bhyve_support function in lib/vm-util. The function uses the
contents of the /var/run/dmesg.boot file to check required CPU features.
But the /var/run/dmesg.boot file is only created when /etc/rc.d/dmesg
runs during system boot and that may happen after vm-bhyve tries to
start because there is no boot dependency specified.
This is a quick fix to add dmesg as boot dependency.
There is in fact a more profound problem: the file may not be created at
all if the admin chooses to set dmesg_enable="NO" in /etc/rc.conf
When rc.d script is called with forcestart parameter it should start
even if it's not defined in rc.conf. rc.subr sets rc_force=yes in this
case. Change rc.d script to pass along rc_force env var and respect it
when it's defined
Sponsored by: Rubicon Communications (Netgate)
Simplify main script and move functions into independent libraries.
Add a Makefile to install everything to the correct places.
Add an initial man page.