for vm in "${VMS[@]}";do log "starting $vm"; tmux new -d -s $vm doas bhyve_netgraph_bridge start $vm zdata/vm/$vm /vm/$vm; sleep 5;done
}
function convert_to_array {
# Converts a string separated by a value into an array. An example use-case would be for parsing environment variables like $PATH.
#
# WARNING: This uses nameref to modify the env variable at the first parameter, making this function very much not "functional". It does not return anything on stdout so it cannot be used with $().
local -n string_to_convert="$1"
localifs_in_string="${2:-}"
localcurrent_ifs="$IFS"
IFS="$ifs_in_string"
string_to_convert=($string_to_convert)
# Restore IFS to the original value in case this function is not run inside a subshell