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"
|
||||
bridge_name="bridge_${host_interface_name}"
|
||||
ip_range="$5"
|
||||
mount_cd="${6:-}"
|
||||
|
||||
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 \
|
||||
|
||||
# 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
|
||||
set -x
|
||||
set +e
|
||||
@ -80,6 +85,7 @@ function start_vm {
|
||||
-s 30,xhci,tablet \
|
||||
-s 31,lpc -l com1,stdio \
|
||||
-l "bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd,${mount_path}/BHYVE_UEFI_VARS.fd" \
|
||||
"${additional_args[@]}" \
|
||||
"$name"
|
||||
exit_code=$?
|
||||
set -e
|
||||
|
Loading…
Reference in New Issue
Block a user