From 9f9eb99933fe0b62bccea2779b6200a68cd90b87 Mon Sep 17 00:00:00 2001 From: Brandon Schneider Date: Fri, 29 Apr 2016 04:09:52 -0500 Subject: [PATCH] Add basic check for bhyve support. Not guaranteed, but a bit better then nothing. --- iohyve | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/iohyve b/iohyve index adfae91..6b471d0 100755 --- a/iohyve +++ b/iohyve @@ -5,6 +5,11 @@ # Set proper path thanks to iocage PATH=${PATH}:/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin +if ! $(cat /var/run/dmesg.boot | egrep -q 'VT-x|EPT') ; then + echo "Your CPU does not seem to support bhyve." + exit 1 +fi + # Check whether a given command requires root __root_req_cmd () { case "$1" in