From ab2cc51d908cbe513e0fa2a4311a5c7090939020 Mon Sep 17 00:00:00 2001 From: Kroese Date: Thu, 11 May 2023 19:43:19 +0200 Subject: [PATCH] Macvtap mode --- run/network.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/run/network.sh b/run/network.sh index 88d3e2eb..8056dbf5 100644 --- a/run/network.sh +++ b/run/network.sh @@ -24,8 +24,8 @@ configureDHCP() { # Create a macvtap network for the VM guest - { ip link add link "${VM_NET_DEV}" name "${VM_NET_TAP}" address "${VM_NET_MAC}" type macvtap mode bridge ; rc=$?; } |: - + { ip link add link "${VM_NET_DEV}" name "${VM_NET_TAP}" address "${VM_NET_MAC}" type macvtap mode bridge ; rc=$?; } || : + if (( rc != 0 )); then error "Cannot create macvtap interface. Please make sure the network type is 'macvlan' and not 'ipvlan'," error "and that the NET_ADMIN capability has been added to the container config: --cap-add NET_ADMIN" && exit 16