Skip to content

Commit

Permalink
Add some basic version checking
Browse files Browse the repository at this point in the history
  • Loading branch information
churchers committed Oct 16, 2015
1 parent 3e2bcee commit 7f642f5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/vm-core
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,11 @@ __vm_run(){

# if uefi, make sure we have bootrom, then update options for uefi support
if [ -n "${_uefi}" ]; then
if [ `uname -K` -lt 1100000 ]; then
__log "guest" "${_name}" "uefi guests can only be run on FreeBSD 11 or newer"
exit 15
fi

if [ "${_uefi}" = "csm" ]; then
if [ ! -e "${vm_dir}/.config/BHYVE_UEFI_CSM.fd" ]; then
__log "guest" "${_name}" "please download uefi csm firmware to ${vm_dir}/.config/BHYVE_UEFI_CSM.fd"
Expand Down
1 change: 1 addition & 0 deletions vm
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ fi

# check environment
[ `id -u` -ne 0 ] && __err "virtual machines can only be managed by root"
[ `uname -K` -lt 1000000 ] && __err "please upgrade to FreeBSD 10 or newer for bhyve support"

# we should be enabled in rc.conf
if ! checkyesno vm_enable; then
Expand Down

0 comments on commit 7f642f5

Please sign in to comment.