summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
Diffstat (limited to 'share')
-rwxr-xr-xshare/examples/bhyve/vmrun.sh22
1 files changed, 16 insertions, 6 deletions
diff --git a/share/examples/bhyve/vmrun.sh b/share/examples/bhyve/vmrun.sh
index eeaf281..72193de 100755
--- a/share/examples/bhyve/vmrun.sh
+++ b/share/examples/bhyve/vmrun.sh
@@ -48,8 +48,8 @@ usage() {
echo "Usage: vmrun.sh [-ahi] [-c <CPUs>] [-C <console>] [-d <disk file>]"
echo " [-e <name=value>] [-g <gdbport> ] [-H <directory>]"
- echo " [-I <location of installation iso>] [-m <memsize>]"
- echo " [-t <tapdev>] <vmname>"
+ echo " [-I <location of installation iso>] [-l <loader>]"
+ echo " [-m <memsize>] [-t <tapdev>] <vmname>"
echo ""
echo " -h: display this help message"
echo " -a: force memory mapped local APIC access"
@@ -61,6 +61,7 @@ usage() {
echo " -H: host filesystem to export to the loader"
echo " -i: force boot of the Installation CDROM image"
echo " -I: Installation CDROM image location (default is ${DEFAULT_ISOFILE})"
+ echo " -l: the OS loader to use (default is /boot/userboot.so)"
echo " -m: memory size (default is ${DEFAULT_MEMSIZE})"
echo " -p: pass-through a host PCI device at bus/slot/func (e.g. 10/0/0)"
echo " -t: tap device for virtio-net (default is $DEFAULT_TAPDEV)"
@@ -87,15 +88,15 @@ console=${DEFAULT_CONSOLE}
cpus=${DEFAULT_CPUS}
tap_total=0
disk_total=0
-apic_opt=""
gdbport=0
loader_opt=""
+bhyverun_opt="-H -A -P"
pass_total=0
-while getopts ac:C:d:e:g:hH:iI:m:p:t: c ; do
+while getopts ac:C:d:e:g:hH:iI:l:m:p:t: c ; do
case $c in
a)
- apic_opt="-a"
+ bhyverun_opt="${bhyverun_opt} -a"
;;
c)
cpus=${OPTARG}
@@ -125,6 +126,9 @@ while getopts ac:C:d:e:g:hH:iI:m:p:t: c ; do
I)
isofile=${OPTARG}
;;
+ l)
+ loader_opt="${loader_opt} -l ${OPTARG}"
+ ;;
m)
memsize=${OPTARG}
;;
@@ -163,6 +167,12 @@ if [ -n "${host_base}" ]; then
loader_opt="${loader_opt} -h ${host_base}"
fi
+# If PCI passthru devices are configured then guest memory must be wired
+if [ ${pass_total} -gt 0 ]; then
+ loader_opt="${loader_opt} -S"
+ bhyverun_opt="${bhyverun_opt} -S"
+fi
+
make_and_check_diskdev()
{
local virtio_diskdev="$1"
@@ -263,7 +273,7 @@ while [ 1 ]; do
i=$(($i + 1))
done
- ${FBSDRUN} -c ${cpus} -m ${memsize} ${apic_opt} -A -H -P \
+ ${FBSDRUN} -c ${cpus} -m ${memsize} ${bhyverun_opt} \
-g ${gdbport} \
-s 0:0,hostbridge \
-s 1:0,lpc \
OpenPOWER on IntegriCloud