Fix mac address validity.
This commit is contained in:
parent
740f2bdadd
commit
a44b8da509
@ -47,7 +47,6 @@ jail_list:
|
||||
bhyve_dataset: zroot/freebsd/release/vm
|
||||
bhyve_list: []
|
||||
efi_dev: /dev/gpt/EFI
|
||||
sound_default_unit: 5
|
||||
sway_conf_files:
|
||||
- launch_gpg
|
||||
wireguard_directory: odo
|
||||
|
@ -63,6 +63,9 @@ function start_vm {
|
||||
# -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 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
|
||||
set -x
|
||||
set +e
|
||||
@ -75,7 +78,6 @@ function start_vm {
|
||||
-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 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 31,lpc -l com1,stdio \
|
||||
-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 {
|
||||
name="$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
|
||||
}
|
||||
|
||||
|
||||
|
@ -15,7 +15,8 @@
|
||||
],
|
||||
"reservations": [
|
||||
{
|
||||
"hw-address": "d6:19:4c:68:fc:c7",
|
||||
// jaeger
|
||||
"hw-address": "06:c7:69:d3:f4:ca",
|
||||
"ip-address": "10.215.1.201"
|
||||
}
|
||||
]
|
||||
|
Loading…
x
Reference in New Issue
Block a user