Stop fighting cloud-init race conditions by baking your network config
Technical Briefing | 10/26/2026
You spend hours perfecting your golden image, but the moment you spin it up in a new environment, cloud-init decides your network configuration is optional. I have watched nodes sit in a provisioning loop for twenty minutes because the primary interface didn’t grab an IP before the rest of the stack fired up. Relying on cloud-init to inject network settings at runtime is a gamble that eventually loses.
Moving the network into the base image
With immutable operating systems like Fedora CoreOS or bootc images, you should be defining your network requirements inside the image itself rather than expecting a cloud-config file to wire everything up on the fly. By shifting this logic to NetworkManager keyfiles or systemd-networkd files embedded during the build, you remove the unpredictable lag of network discovery during the first boot.
nmcli connection add type ethernet con-name static-eth0 ifname eth0 ip4 192.168.1.10/24 gw4 192.168.1.1
- NetworkManager handles pre-configured interfaces significantly faster than cloud-init parses metadata
- Your kernel console will actually show output because the interface is ready before the user-space drivers fully settle
- Hard-coding common static bridge configurations prevents duplicate IP conflicts during heavy provisioning spikes
If you are using bootc, look at what gets pulled into the container layer. If you bundle your NetworkManager keyfiles under etc/NetworkManager/system-connections, they become part of the immutable filesystem state. This makes your infrastructure predictable because the network exists at the exact moment the hardware initializes. You trade a tiny bit of flexibility for a massive gain in reliable startup times.
Try moving your standard interface definitions into the base image and leave cloud-init for things it is actually good at, like SSH key injection or disk mounting. Your telemetry will thank you when the average boot-to-ready time drops from minutes to seconds.
