mirror of
https://github.com/churchers/vm-bhyve.git
synced 2025-12-11 09:20:17 +01:00
Pull in bootdisk change from 1.4 - issue #344
This commit is contained in:
@@ -24,8 +24,8 @@
|
||||
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
VERSION=1.3-devel
|
||||
VERSION_INT=103101
|
||||
VERSION=1.5-devel
|
||||
VERSION_INT=105001
|
||||
VERSION_BSD=$(uname -K)
|
||||
PATH=${PATH}:/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin
|
||||
|
||||
|
||||
@@ -592,7 +592,7 @@ core::__start(){
|
||||
config::get "_uefi" "uefi"
|
||||
|
||||
# check minimum configuration
|
||||
if [ -z "${_cpu}" -o -z "${_memory}" -o -z "${_disk}" ]; then
|
||||
if [ -z "${_cpu}" -o -z "${_memory}" ]; then
|
||||
echo " ! incomplete virtual machine configuration"
|
||||
return 1
|
||||
fi
|
||||
|
||||
@@ -51,6 +51,12 @@ guest::load(){
|
||||
local _iso="$1"
|
||||
local _args _command _timeout _grub_opt _bsd_loader
|
||||
|
||||
# require a boot disk
|
||||
if [ -z "${_bootdisk}" ]; then
|
||||
util::log "guest" "${_name}" "fatal; non-uefi loaders require a boot disk device"
|
||||
return 15
|
||||
fi
|
||||
|
||||
# all loaders have same console and wired memory options
|
||||
[ -z "${VM_OPT_FOREGROUND}" ] && _args="-c ${_com}"
|
||||
[ "${_wiredmem}" = "1" ] && _args="${_args}${_args:+ }-S"
|
||||
|
||||
@@ -101,7 +101,7 @@ vm::run(){
|
||||
" [primary disk dev: ${_bootdisk_dev}]"
|
||||
|
||||
# check basic settings
|
||||
if [ -z "${_loader}" -o -z "${_cpu}" -o -z "${_memory}" -o -z "${_bootdisk}" ]; then
|
||||
if [ -z "${_loader}" -o -z "${_cpu}" -o -z "${_memory}" ]; then
|
||||
util::log "guest" "${_name}" "fatal; unable to start - missing required configuration"
|
||||
exit 15
|
||||
fi
|
||||
@@ -192,7 +192,7 @@ vm::run(){
|
||||
util::checkyesno "${_debug}" && _logpath="${VM_DS_PATH}/${_name}/bhyve.log"
|
||||
|
||||
# complete the boot disk path
|
||||
vm::get_disk_path "_bootdisk" "${_name}" "${_bootdisk}" "${_bootdisk_dev}"
|
||||
[ -n "${_bootdisk}" ] && vm::get_disk_path "_bootdisk" "${_name}" "${_bootdisk}" "${_bootdisk_dev}"
|
||||
|
||||
# build bhyve device string
|
||||
vm::bhyve_device_comports
|
||||
|
||||
Reference in New Issue
Block a user