From 31a6f7487b2cf4008cf675fbd447a34fe3093e95 Mon Sep 17 00:00:00 2001 From: Anthony Perkins Date: Tue, 6 Sep 2022 21:53:11 +0100 Subject: [PATCH] Fix network and working without cdrom --- roles/home-cli/files/bhyve-vm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/roles/home-cli/files/bhyve-vm b/roles/home-cli/files/bhyve-vm index a688abf..82fc132 100755 --- a/roles/home-cli/files/bhyve-vm +++ b/roles/home-cli/files/bhyve-vm @@ -42,6 +42,9 @@ ram=1G # only be accessible from this host (or via SSH tunnels). vnc="localhost:0" +# Network TAP device. +netif=tap0 + # Change to /dev/nmdm0A for the first null-modem. comoutput=stdio @@ -70,8 +73,8 @@ fi -H \ -s 0,hostbridge \ -s 1,virtio-blk,$vmpath/${vmname}_disk0.img \ - -s 2,virtio-net,tap0 \ - ${cdrom:-""} \ + -s 2,virtio-net,$netif \ + $cdrom \ -s 29,fbuf,tcp=${vnc},w=800,h=600 \ -s 30,xhci,tablet \ -s 31,lpc \