...
-auto pvemgmt0
-iface pvemgmt0 inet static
- address 192.168.10.10
- netmask 255.255.255.0
- gateway 192.168.10.1
- pre-up ip link add name pvemgmt0 type veth peer name pvemgmt0peer
- pre-up ip link set pvemgmt0peer up
- pre-down ip link set pvemgmt0peer down
- post-down ip link del pvemgmt0
-
auto vmbr0
iface vmbr0 inet manual
- bridge_ports pvemgmt0peer eth0
+ bridge_ports bond0
bridge_stp off
bridge_fd 0
- pre-up ifup pvemgmt0
+
+# this create the veth device and plug it into vmbr0
+auto pm0
+iface pm0 inet static
+ address 192.168.10.10
+ netmask 255.255.255.0
+ gateway 192.168.10.1
+ VETH_BRIDGETO vmbr0
...
--------------------------------
+
--- /dev/null
+#!/bin/sh
+
+# create a VETH device and plug it into bridge ${IF_VETH_BRIDGETO}
+
+if [ -z "${IF_VETH_BRIDGETO}" ]; then
+ exit 0
+fi
+
+if [ ! -x /sbin/brctl ]
+then
+ exit 0
+fi
+
+if [ "${MODE}" = "start" ]; then
+ ifconfig "${IF_VETH_BRIDGETO}" up
+ ip link add name "${IFACE}" type veth peer name "${IFACE}peer"
+ ip link set "${IFACE}peer" up
+ brctl addif "${IF_VETH_BRIDGETO}" "${IFACE}peer"
+elif [ "${MODE}" = "stop" ]; then
+ brctl delif "${IF_VETH_BRIDGETO}" "${IFACE}peer"
+ ip link set "${IFACE}peer" down
+ ip link del "${IFACE}"
+fi
+
+exit 0
--- /dev/null
+debian/ifupdown.sh usr/share/pve-firewall/scripts
\ No newline at end of file
--- /dev/null
+usr/share/pve-firewall/scripts/ifupdown.sh etc/network/if-pre-up.d/pve-firewall
+usr/share/pve-firewall/scripts/ifupdown.sh etc/network/if-post-down.d/pve-firewall