Move my home server over to linfi.
This commit is contained in:
@@ -1,2 +0,0 @@
|
||||
devmatch_enable="YES"
|
||||
devmatch_blocklist="if_iwm if_iwlwifi"
|
||||
@@ -32,6 +32,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
: ${VNC_LISTEN:="127.0.0.1:5900"}
|
||||
: ${VNC_WIDTH:="1920"}
|
||||
: ${VNC_HEIGHT:="1080"}
|
||||
: ${PASSTHROUGH:="1/0/0"}
|
||||
|
||||
if [ "$VERBOSE" = "YES" ]; then
|
||||
set -x
|
||||
@@ -142,7 +143,7 @@ function start_vm {
|
||||
-s 0,hostbridge \
|
||||
-s "4,nvme,/dev/zvol/${zfs_path}/disk0" \
|
||||
-S \
|
||||
-s 7,passthru,1/0/0 \
|
||||
-s "7,passthru,${PASSTHROUGH}" \
|
||||
-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" \
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# PROVIDE: linfi
|
||||
# REQUIRE: LOGIN
|
||||
# KEYWORD: shutdown nojail
|
||||
. /etc/rc.subr
|
||||
name=linfi
|
||||
rcvar=${name}_enable
|
||||
start_cmd="${name}_start"
|
||||
stop_cmd="${name}_stop"
|
||||
status_cmd="${name}_status"
|
||||
load_rc_config $name
|
||||
|
||||
tmux_name="linfi"
|
||||
|
||||
linfi_start() {
|
||||
/usr/local/bin/tmux new-session -d -s "$tmux_name" "/usr/bin/env VNC_ENABLE=YES VNC_LISTEN=0.0.0.0:5900 /usr/local/bin/bash /usr/local/bin/launch_linfi start linfi zroot/freebsd/current/vm/linfi /vm/linfi"
|
||||
# /vm/.iso/alpine-extended-3.20.3-x86_64.iso
|
||||
}
|
||||
|
||||
linfi_status() {
|
||||
if /usr/local/bin/tmux has-session -t $tmux_name 2>/dev/null; then
|
||||
echo "$tmux_name is running."
|
||||
else
|
||||
echo "$tmux_name is not running."
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
linfi_stop() {
|
||||
/usr/local/bin/tmux has-session -t $tmux_name 2>/dev/null && (
|
||||
/usr/local/bin/tmux kill-session -t $tmux_name
|
||||
sleep 10
|
||||
bhyvectl --vm=linfi --destroy
|
||||
# kill `cat /var/run/linfi.pid`
|
||||
)
|
||||
linfi_wait_for_end
|
||||
}
|
||||
|
||||
linfi_wait_for_end() {
|
||||
while /usr/local/bin/tmux has-session -t $tmux_name 2>dev/null; do
|
||||
sleep 1
|
||||
done
|
||||
}
|
||||
|
||||
run_rc_command "$1"
|
||||
@@ -1,3 +0,0 @@
|
||||
vmm_load="YES"
|
||||
pptdevs="1/0/0"
|
||||
hw.vmm.amdvi.enable="1"
|
||||
Reference in New Issue
Block a user