diff --git a/ansible/roles/bhyve/files/bhyverc.bash b/ansible/roles/bhyve/files/bhyverc.bash index 84799b0..80def0a 100644 --- a/ansible/roles/bhyve/files/bhyverc.bash +++ b/ansible/roles/bhyve/files/bhyverc.bash @@ -9,7 +9,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # Inside the VM run: # mount -t virtfs -o trans=virtio sharename /some/vm/path # mount -t 9p -o cache=mmap -o msize=512000 sharename /mnt/9p -# mount -t 9p -o trans=virtio,cache=mmap,msize=512000 sharename /path/to/mountpoint +# mount -t 9p -o trans=virtio,cache=mmap,msize=512000 bind9p /path/to/mountpoint # bhyve_options="-s 28,virtio-9p,sharename=/" # Enable Sound @@ -37,6 +37,7 @@ fi : ${VNC_LISTEN:="127.0.0.1:5900"} : ${VNC_WIDTH:="1920"} : ${VNC_HEIGHT:="1080"} +: ${BIND9P:=""} : "${CD:=}" : ${SHUTDOWN_TIMEOUT:="600"} # 10 minutes @@ -299,6 +300,10 @@ function start_body { die 1 "Unrecognized NETWORK type $NETWORK" fi + if [ -n "$BIND9P" ]; then + additional_args+=("-s" "28,virtio-9p,bind9p=${BIND9P}") + fi + # -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 \