diff --git a/lib/vm-run b/lib/vm-run index dd4179a6..b0a8dbb9 100644 --- a/lib/vm-run +++ b/lib/vm-run @@ -39,7 +39,7 @@ vm::run(){ local _guest_support _uefi _uuid _utc _debug _hostbridge _loader local _opts _devices _slot=4 _func=0 _taplist _exit _passdev local _com _comports _comstring _logpath="/dev/null" _bootrom _run=1 - local _ignore_msr + local _ignore_msr _bhyve_options # try to load datstore details datastore::get_guest "${_name}" || exit 5 @@ -60,6 +60,7 @@ vm::run(){ config::get "_utc" "utctime" "no" config::get "_debug" "debug" "no" config::get "_ignore_msr" "ignore_bad_msr" "no" + config::get "_bhyve_options" "bhyve_options" util::log_rotate "guest" "${_name}" util::log "guest" "${_name}" "initialising" @@ -140,6 +141,9 @@ vm::run(){ fi fi + # add any custom bhyve options + [ -n "${_bhyve_options}" ] && _opts="${_opts} ${_bhyve_options}" + # if we have passthru, check vt-d support now and exit config::get "_passdev" "passthru0" diff --git a/sample-templates/config.sample b/sample-templates/config.sample index 78ca16b1..fcc4b063 100644 --- a/sample-templates/config.sample +++ b/sample-templates/config.sample @@ -59,6 +59,11 @@ memory="512M" # ignore_bad_msr="no" +# bhyve_options +# any additional bhyve command line options +# +bhyve_options="-p 1:1" + # hostbridge # Allows you to specify the type of hostbridge to use for the # guest hardware. This can usually be left as default. The diff --git a/vm b/vm index e53babf7..60c2694d 100644 --- a/vm +++ b/vm @@ -25,7 +25,7 @@ # POSSIBILITY OF SUCH DAMAGE. VERSION=1.1-p8 -VERSION_INT=101072 +VERSION_INT=101073 VERSION_BSD=$(uname -K) PATH=${PATH}:/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin diff --git a/vm.8 b/vm.8 index c1c37588..3c00cdce 100644 --- a/vm.8 +++ b/vm.8 @@ -945,6 +945,10 @@ to configure .Xr bhyve 8 to ignore accesses to unimplemented model specific registers. This is commonly required on AMD processors, although is enabled by default for UEFI guests. +.It bhyve_options +Specify any additional command line arguments to pass to the bhyve command. This allows +the use of options such as cpu pinning or debug that are not exposed by +.Sy vm-bhyve . .It grub_installX This option allows you to specify grub commands needed to boot the install media for this guest.