From 977c8a74e83538dbec00b58cae1443e95288f90e Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Sun, 30 Jan 2022 02:01:18 -0500 Subject: [PATCH] Added a script to launch bhyve. --- scripts/launch_bhyve.bash | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 scripts/launch_bhyve.bash diff --git a/scripts/launch_bhyve.bash b/scripts/launch_bhyve.bash new file mode 100644 index 0000000..0cb51ea --- /dev/null +++ b/scripts/launch_bhyve.bash @@ -0,0 +1,31 @@ +#!/usr/bin/env bash +# +set -euo pipefail +IFS=$'\n\t' +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +# 1 core +# 1GB ram +# -H yield the virtual CPU when HLT instruction is detected, otherwise bhyve eats the entire core +# -w Ignore accesses to unimplemented Model Specific Registers. Maybe not needed? Man page says its for debug purposes +# -l for lpc devices +# -U for specifying uuid, going to omit and see if the generated one works +# -u RTC is in UTC +# -s virtual PCI slots +bhyve \ + -c 1 \ + -m 1024M \ + -H \ + -w \ + -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \ + -u \ + -s 0,hostbridge \ + -s 31,lpc \ + -s 4:0,virtio-blk,/vm/docker/disk0.img \ + -s 5:0,virtio-net,tap1,mac=58:9c:fc:09:c3:ba \ + -s 6:0,virtio-rnd \ + -s 7:0,fbuf,tcp=127.0.0.1:5900,w=1920,h=1080 \ + -s 8:0,xhci,tablet \ + -s 3:0,ahci-cd,/vm/.config/null.iso \ + -l com1,/dev/nmdm-docker.1A \ + docker