Update router vm scripts.

This commit is contained in:
Tom Alexander 2024-10-10 19:03:11 -04:00
parent 40b0d2c684
commit 9a27184885
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
3 changed files with 8 additions and 7 deletions

View File

@ -19,7 +19,7 @@ function cleanup {
done
}
vms=()
for sig in EXIT INT QUIT HUP TERM; do
for sig in EXIT; do
trap "set +e; sleep 10; cleanup" "$sig"
done
@ -67,17 +67,17 @@ function start_vm {
local bridge_link_name
bridge_link_name=$(detect_available_link "${bridge_name}")
# additional_args+=("-s" "2:0,virtio-net,netgraph,path=${bridge_name}:,peerhook=${bridge_link_name},mac=${mac_address}")
additional_args+=("-s" "2:0,virtio-net,netgraph,path=${bridge_name}:,peerhook=${bridge_link_name},mac=${mac_address}" "-s" "3,ahci-cd,/home/talexander/disk.iso")
additional_args+=("-s" "2:0,virtio-net,netgraph,path=${bridge_name}:,peerhook=${bridge_link_name},mac=${mac_address}")
# additional_args+=("-s" "2:0,virtio-net,netgraph,path=${bridge_name}:,peerhook=${bridge_link_name},mac=${mac_address}" "-s" "3,ahci-cd,/home/talexander/disk.iso")
# -H \
vms+=("$name")
while true; do
set -x
set +e
bhyve \
-D \
-c 1 \
-c 2 \
-m 3G \
-H \
-o 'rtc.use_localtime=false' \
-s 0,hostbridge \
-s "4,nvme,/dev/zvol/zroot/vm/mediamtx/disk0" \

View File

@ -19,7 +19,7 @@ function cleanup {
done
}
vms=()
for sig in EXIT INT QUIT HUP TERM; do
for sig in EXIT; do
trap "set +e; sleep 10; cleanup" "$sig"
done

View File

@ -19,7 +19,7 @@ function cleanup {
done
}
vms=()
for sig in EXIT INT QUIT HUP TERM; do
for sig in EXIT; do
trap "set +e; sleep 10; cleanup" "$sig"
done
@ -68,6 +68,7 @@ function start_vm {
bridge_link_name=$(detect_available_link "${bridge_name}")
additional_args+=("-s" "2:0,virtio-net,netgraph,path=${bridge_name}:,peerhook=${bridge_link_name},mac=${mac_address}")
# additional_args+=("-s" "2:0,virtio-net,netgraph,path=${bridge_name}:,peerhook=${bridge_link_name},mac=${mac_address}" "-s" "3,ahci-cd,/home/talexander/disk.iso")
vms+=("$name")
while true; do
set -x