Add support for specifying CD iso image to mount in virtual machines.
This commit is contained in:
parent
50a25e50c1
commit
58ba39d56f
@ -48,6 +48,7 @@ function start_vm {
|
|||||||
host_interface_name="$4"
|
host_interface_name="$4"
|
||||||
bridge_name="bridge_${host_interface_name}"
|
bridge_name="bridge_${host_interface_name}"
|
||||||
ip_range="$5"
|
ip_range="$5"
|
||||||
|
mount_cd="${6:-}"
|
||||||
|
|
||||||
mac_address=$(calculate_mac_address "$name")
|
mac_address=$(calculate_mac_address "$name")
|
||||||
|
|
||||||
@ -66,6 +67,10 @@ function start_vm {
|
|||||||
# -s 29,fbuf,tcp=0.0.0.0:5900,w=1920,h=1080 \
|
# -s 29,fbuf,tcp=0.0.0.0:5900,w=1920,h=1080 \
|
||||||
|
|
||||||
# TODO: Look into using nmdm instead of stdio for serial console
|
# TODO: Look into using nmdm instead of stdio for serial console
|
||||||
|
additional_args=()
|
||||||
|
if [ -n "$mount_cd" ]; then
|
||||||
|
additional_args+=("-s" "3,ahci-cd,$mount_cd")
|
||||||
|
fi
|
||||||
while true; do
|
while true; do
|
||||||
set -x
|
set -x
|
||||||
set +e
|
set +e
|
||||||
@ -80,6 +85,7 @@ function start_vm {
|
|||||||
-s 30,xhci,tablet \
|
-s 30,xhci,tablet \
|
||||||
-s 31,lpc -l com1,stdio \
|
-s 31,lpc -l com1,stdio \
|
||||||
-l "bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd,${mount_path}/BHYVE_UEFI_VARS.fd" \
|
-l "bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd,${mount_path}/BHYVE_UEFI_VARS.fd" \
|
||||||
|
"${additional_args[@]}" \
|
||||||
"$name"
|
"$name"
|
||||||
exit_code=$?
|
exit_code=$?
|
||||||
set -e
|
set -e
|
||||||
|
Loading…
Reference in New Issue
Block a user