Skip to content

Commit

Permalink
Add a bhyve_options configuration setting to allow custom bhyve(8) ar…
Browse files Browse the repository at this point in the history
…guments
  • Loading branch information
churchers committed Jun 7, 2017
1 parent e0dcb71 commit 3bbb2cb
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
6 changes: 5 additions & 1 deletion lib/vm-run
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand Down Expand Up @@ -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"

Expand Down
5 changes: 5 additions & 0 deletions sample-templates/config.sample
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion vm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 4 additions & 0 deletions vm.8
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 3bbb2cb

Please sign in to comment.