In r347241 in FreeBSD HEAD, tun(4) and tap(4) have been merged.
We need to detect and handle which kernel module has to be loaded,
using the closest kernel ABI change in FreeBSD 13.0-CURRENT.
Dash/hyphen and underscore are fairly common and benign characters.
Don't see much reason to support much else and possibly cause problems
in other parts of the code.
I cannot get confimation from devs that these sysctls are a viable or stable
way of testing for bhyve support (although cap.* sysctls seem fairly solid)
As such, also add an rc option to bypass the lot. This also allows bypassing the iommu
check just in case someone happens to have a iommu-capable machine that we think isn't.
The pattern "[ $? -ne 0 ] && util::err ..." is problematic since it
leaves an exit status of 1 if the test fails, which is the non-error
case. So various commands (e.g., vm datastore add) return status 1 even
when they succeed if this pattern appears as the last line of a command
implementation.
Fix this by mechanically converting this pattern to
"[ $? -eq 0 ] || util:err ...".
I don't want to fully rely on these checks as it could stop us from running
on a system that actually supports bhyve. If the system doesn't support bhyve,
and doesn't have dmesg.boot, then bhyve will just fail to run.
If you have a directory (or network mount) containing iso files, you
can configure vm-bhyve to look there by adding it as
a media datastore. (vm datastore iso my-media /path/to/iso/dir).
Also we now look in the current dir for iso files, and accept full paths.
Add information on supported global config (one console so far).
mention foreground/interactive mode under start/install.
mention ability to start multiple guests with start command.
update windows details as 11 will have vnc support.
I already do pretty much everything they advise anyway
Grouping functions together by using "prefix::" is quite a nice feature though.
Nothing too clever, just makes use of the fact that a colon appears
to be a valid character in a shell function.