ConfigureProxmoxBridges

Phase 3e helper: rewrite /etc/network/interfaces on the Proxmox host to a bonded VLAN-aware layout (LACP bond0 from 2 NICs, vmbr0 bridge-vlan-aware, vmbr0v250 host mgmt sub-interface at ProxmoxMgmtIp), then apply via ifupdown2 ifreload -a.

Note

Idempotent: same input twice = same file content. The current file content is diffed with the rendered target; ifreload -a is only invoked when the bytes differ.

Target layout (see docs/Liberator.adoc + Serena memory liberator_proxmox_ip_phases):

auto lo
iface lo inet loopback

auto <nic1>
iface <nic1> inet manual
    bond-master bond0

auto <nic2>
iface <nic2> inet manual
    bond-master bond0

auto bond0
iface bond0 inet manual
    bond-slaves <nic1> <nic2>
    bond-mode 802.3ad
    bond-miimon 100

auto vmbr0
iface vmbr0 inet manual
    bridge-ports bond0
    bridge-stp off
    bridge-fd 0
    bridge-vlan-aware yes
    bridge-vids 2-4094

auto vmbr0v250
iface vmbr0v250 inet static
    address 10.0.250.2/24
    gateway 10.0.250.1
    dns-nameservers <NixDns IP>
    bridge_ports bond0.250
    bridge_stp off
    bridge_fd 0

Gated by NETSetup.Helpers.LiberatorGate.IsFullLiberatorFlow(ISystemHost,NETSetup.Entities.NETSetupConfig) (caller-side, in RunProxmoxUpdate). Helper also runs an inner guard for safety.

public static class ConfigureProxmoxBridges

1. Methods

1.1. Run(ISystemHost, NETSetupConfig, IServiceProvider)

Rewrites /etc/network/interfaces + applies via ifreload -a. Best-effort: every failure path logs and returns - never throws (caller is RunProxmoxUpdate's Phase 3e try/catch).

public static void Run(ISystemHost host, NETSetupConfig config, IServiceProvider services)
Table 1. Parameters
Name Type Description

host

ISystemHost

config

NETSetupConfig

services

IServiceProvider