From c2ad6053e5a0da2aa137702868950b00304a36e5 Mon Sep 17 00:00:00 2001 From: Nick 'darkfiberiru' Wolff Date: Wed, 20 Jun 2018 13:50:52 -0400 Subject: [PATCH] allow specificiation of bhyveload loader file instead of using os file --- lib/vm-guest | 5 +++++ lib/vm-run | 1 + 2 files changed, 6 insertions(+) diff --git a/lib/vm-guest b/lib/vm-guest index 7ed8c44e..e2d80c91 100644 --- a/lib/vm-guest +++ b/lib/vm-guest @@ -40,6 +40,7 @@ # _memory: RAM # _guest: guest type # _bootdisk: full path to primary disk +# _bhyveload_loader: full path to loader used by bhyveload # # I've written append wrong as it just needs to be something other than 'write', # and is much more readable when all the util::log* calls line up @@ -68,6 +69,10 @@ guest::load(){ else _args="${_args} -d ${_bootdisk}" fi + if [ -n "${_bhyveload_loader}" ] ; then + _args="${_args} -l ${_bhyveload_loader}" + fi + ;; grub) _command=$(which grub-bhyve) diff --git a/lib/vm-run b/lib/vm-run index dc3e62f8..c7d11326 100644 --- a/lib/vm-run +++ b/lib/vm-run @@ -61,6 +61,7 @@ vm::run(){ config::get "_debug" "debug" "no" config::get "_ignore_msr" "ignore_bad_msr" "no" config::get "_bhyve_options" "bhyve_options" + config::get "_bhyveload_loader" "bhyveload_loader" # generate a uuid if we don't have one already if [ -z "${_uuid}" ]; then