feat: Make network adapter configurable (#859)

This commit is contained in:
Kroese 2024-11-26 20:01:37 +01:00 committed by GitHub
parent eb010cc215
commit 898499a4e3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -6,8 +6,9 @@ set -Eeuo pipefail
: "${MAC:=""}" : "${MAC:=""}"
: "${DHCP:="N"}" : "${DHCP:="N"}"
: "${NETWORK:="Y"}" : "${NETWORK:="Y"}"
: "${HOST_PORTS:=""}"
: "${USER_PORTS:=""}" : "${USER_PORTS:=""}"
: "${HOST_PORTS:=""}"
: "${ADAPTER:="virtio-net-pci"}"
: "${VM_NET_DEV:=""}" : "${VM_NET_DEV:=""}"
: "${VM_NET_TAP:="dsm"}" : "${VM_NET_TAP:="dsm"}"
@ -439,6 +440,6 @@ else
fi 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 return 0