π ~1 min read
Table of contents
Symptom & Impact
Manual network changes disappear after reboot, causing interface drift and connectivity loss.
Environment & Reproduction
Common on cloud images where cloud-init continues to manage networking.
cloud-init status
ls /etc/cloud/cloud.cfg.d
ls /etc/netplan
Root Cause Analysis
Datasource-provided network config regenerates netplan files, replacing manual edits.
Quick Triage
Confirm which component last modified netplan files.
sudo ls -ltr /etc/netplan
sudo grep -RIn 'network:' /etc/cloud/cloud.cfg.d /etc/cloud/cloud.cfg 2>/dev/null
journalctl -u cloud-init -n 120 --no-pager
Step-by-Step Diagnosis
Trace cloud-init stages and datasource metadata influencing network output.
cloud-init analyze show 2>/dev/null || true
cloud-init query ds 2>/dev/null || true
cat /run/cloud-init/network-config.json 2>/dev/null || true

Solution – Primary Fix
Disable cloud-init network management and persist custom netplan configuration.
Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.
sudo tee /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg >/dev/null <<'EOF'
network: {config: disabled}
EOF
sudo netplan generate
sudo netplan apply

Solution – Alternative Approaches
Keep cloud-init enabled but supply stable network-data in metadata for immutable provisioning.
sudo cloud-init clean
sudo cloud-init init
Verification & Acceptance Criteria
Netplan files remain unchanged across reboot and interfaces keep expected settings.
sudo sha256sum /etc/netplan/*.yaml
sudo reboot
sudo sha256sum /etc/netplan/*.yaml
Rollback Plan
Remove disable file if platform requires datasource-managed networking.
sudo rm -f /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
sudo cloud-init clean
sudo reboot
Prevention & Hardening
Decide ownership model for networking during image build and enforce it consistently.
cloud-init status
grep -RIn 'config: disabled' /etc/cloud/cloud.cfg.d
Related Errors & Cross-Refs
Tied to DHCP lease churn, wrong interface names, and boot-time renderer conflicts.
Related tutorial: View the step-by-step tutorial for Ubuntu 26.04 LTS.
View all Ubuntu 26.04 LTS tutorials on the Tutorials Hub β
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
Ubuntu cloud-init network configuration references and operational best practices.
Need Expert Help?
If you cannot resolve this yourself, our team offers hands-on Server Management, Managed IT Services, and flexible Support Plans. Contact us today β we respond within one business day.