Fix mac address validity.

This commit is contained in:
Tom Alexander 2023-04-27 18:44:32 -04:00
parent 740f2bdadd
commit a44b8da509
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
3 changed files with 15 additions and 4 deletions

View File

@ -47,7 +47,6 @@ jail_list:
bhyve_dataset: zroot/freebsd/release/vm bhyve_dataset: zroot/freebsd/release/vm
bhyve_list: [] bhyve_list: []
efi_dev: /dev/gpt/EFI efi_dev: /dev/gpt/EFI
sound_default_unit: 5
sway_conf_files: sway_conf_files:
- launch_gpg - launch_gpg
wireguard_directory: odo wireguard_directory: odo

View File

@ -63,6 +63,9 @@ function start_vm {
# -H release the CPU when guest issues HLT instruction. Otherwise 100% of core will be consumed. # -H release the CPU when guest issues HLT instruction. Otherwise 100% of core will be consumed.
# -s 3,ahci-cd,/vm/.iso/archlinux-2023.04.01-x86_64.iso \ # -s 3,ahci-cd,/vm/.iso/archlinux-2023.04.01-x86_64.iso \
# -s 29,fbuf,tcp=0.0.0.0:5900,w=1920,h=1080,wait \ # -s 29,fbuf,tcp=0.0.0.0:5900,w=1920,h=1080,wait \
# -s 29,fbuf,tcp=0.0.0.0:5900,w=1920,h=1080 \
# TODO: Look into using nmdm instead of stdio for serial console
while true; do while true; do
set -x set -x
set +e set +e
@ -75,7 +78,6 @@ function start_vm {
-s "4,nvme,/dev/zvol/${zfs_path}/disk0" \ -s "4,nvme,/dev/zvol/${zfs_path}/disk0" \
-s "2:0,virtio-net,netgraph,path=${bridge_name}:,peerhook=${bridge_link_name},mac=${mac_address}" \ -s "2:0,virtio-net,netgraph,path=${bridge_name}:,peerhook=${bridge_link_name},mac=${mac_address}" \
-s 3,ahci-cd,/vm/.iso/archlinux-2023.04.01-x86_64.iso \ -s 3,ahci-cd,/vm/.iso/archlinux-2023.04.01-x86_64.iso \
-s 29,fbuf,tcp=0.0.0.0:5900,w=1920,h=1080 \
-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" \
@ -146,7 +148,16 @@ function ng_exists {
function calculate_mac_address { function calculate_mac_address {
name="$1" name="$1"
source=$(md5 -r -s "$name" | awk '{print $1}') source=$(md5 -r -s "$name" | awk '{print $1}')
echo "${source:0:2}:${source:2:2}:${source:4:2}:${source:6:2}:${source:8:2}:${source:10:2}" echo "06:${source:0:2}:${source:2:2}:${source:4:2}:${source:6:2}:${source:8:2}"
}
function find_available_port {
start_port="$1"
port="$start_port"
while true; do
sockstat -P tcp -p 443
port=$((port + 1))
done
} }

View File

@ -15,7 +15,8 @@
], ],
"reservations": [ "reservations": [
{ {
"hw-address": "d6:19:4c:68:fc:c7", // jaeger
"hw-address": "06:c7:69:d3:f4:ca",
"ip-address": "10.215.1.201" "ip-address": "10.215.1.201"
} }
] ]