From 898499a4e36ee4aa5635c4d64a25b916263dcb29 Mon Sep 17 00:00:00 2001 From: Kroese Date: Tue, 26 Nov 2024 20:01:37 +0100 Subject: [PATCH] feat: Make network adapter configurable (#859) --- src/network.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/network.sh b/src/network.sh index dd7d7763..f157ca13 100644 --- a/src/network.sh +++ b/src/network.sh @@ -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:="dsm"}" @@ -439,6 +440,6 @@ 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" return 0