Macvtap mode

This commit is contained in:
Kroese 2023-05-11 19:43:19 +02:00 committed by GitHub
parent eed7b232b2
commit a2d12f0131

View File

@ -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