Skip to content

Commit

Permalink
feat: Make network adapter configurable (#166)
Browse files Browse the repository at this point in the history
  • Loading branch information
kroese authored Nov 26, 2024
1 parent 9ec6988 commit 55db344
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/network.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ set -Eeuo pipefail
: "${MAC:=""}"
: "${DHCP:="N"}"
: "${NETWORK:="Y"}"
: "${HOST_PORTS:=""}"
: "${USER_PORTS:=""}"
: "${HOST_PORTS:=""}"
: "${ADAPTER:="virtio-net-pci"}"

: "${VM_NET_DEV:=""}"
: "${VM_NET_TAP:="qemu"}"
Expand Down Expand Up @@ -431,7 +432,7 @@ else

fi

NET_OPTS+=" -device virtio-net-pci,romfile=,netdev=hostnet0,mac=$VM_NET_MAC,id=net0"
NET_OPTS+=" -device $ADAPTER,romfile=,netdev=hostnet0,mac=$VM_NET_MAC,id=net0"

html "Initialized network successfully..."
return 0

0 comments on commit 55db344

Please sign in to comment.