Fix TAP interfaces stuck in "configuring" by enabling ConfigureWithoutCarrier
When a VM is not running, its TAP interface has no carrier, so networkd refuses to assign static addresses (hostAddress) and the link gets stuck in "configuring" state. This causes systemd-networkd-wait-online to block for 2 minutes. Setting ConfigureWithoutCarrier=yes lets networkd assign addresses immediately regardless of carrier state. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
0a07f7f14e
commit
ebf28dfc00
1 changed files with 6 additions and 2 deletions
|
|
@ -69,8 +69,11 @@ in
|
|||
|
||||
# Configure vmsilo TAP/bridge network units:
|
||||
# - Not required for online (VMs may not be running during nixos-rebuild)
|
||||
# - No IPv6 autoconfiguration (prevents "configuring" stuck state and
|
||||
# unwanted host addresses on VM-to-VM interfaces)
|
||||
# - ConfigureWithoutCarrier: assign static addresses even when link has no
|
||||
# carrier (VM not running), so networkd reaches "configured" state
|
||||
# immediately instead of getting stuck in "configuring"
|
||||
# - No IPv6 autoconfiguration (prevents unwanted host addresses on
|
||||
# VM-to-VM interfaces)
|
||||
systemd.network.networks =
|
||||
let
|
||||
bridgedTaps = builtins.filter (
|
||||
|
|
@ -79,6 +82,7 @@ in
|
|||
bridgeNames = lib.unique (map (t: t.iface.tap.bridge) bridgedTaps);
|
||||
unitConfig = {
|
||||
linkConfig.RequiredForOnline = "no";
|
||||
networkConfig.ConfigureWithoutCarrier = true;
|
||||
networkConfig.IPv6AcceptRA = false;
|
||||
networkConfig.LinkLocalAddressing = "no";
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue