π ~1 min read
Table of contents
Symptom & Impact
Instance remains in initializing state and automation dependent on cloud-init never runs.
Environment & Reproduction
Seen with datasource detection issues, malformed user-data, or unreachable metadata endpoints.
cloud-init status --long
systemctl status cloud-init cloud-config --no-pager
cat /etc/cloud/cloud.cfg
journalctl -u cloud-init -n 120 --no-pager
Root Cause Analysis
cloud-init cannot complete datasource fetch or module execution sequence due to input or networking faults.
Quick Triage
Check datasource detection and module stage where execution stops.
cloud-init query ds
cloud-init analyze show
cloud-init analyze blame
Step-by-Step Diagnosis
Validate user-data and replay cloud-init logs to locate parsing or timeout errors.
sudo cloud-init schema --system
sudo cat /var/log/cloud-init.log | tail -n 200
curl -s http://169.254.169.254/latest/meta-data/ || true

Solution – Primary Fix
Correct cloud-config syntax, clean state, and rerun initialization safely.
Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.
sudo cloud-init clean --logs
sudo cloud-init init
sudo cloud-init modules --mode=config
sudo cloud-init modules --mode=final

Solution – Alternative Approaches
Pin datasource list explicitly when auto-detection is unreliable.
printf 'datasource_list: [ Ec2, None ]
' | sudo tee /etc/cloud/cloud.cfg.d/90-dslist.cfg
sudo cloud-init clean --logs
sudo reboot
Verification & Acceptance Criteria
Accepted when cloud-init reports done and expected provisioning artifacts exist.
cloud-init status --wait
cloud-init status --long
systemctl is-active cloud-final
Rollback Plan
Restore previous cloud-init config snippets if explicit datasource settings regress behavior.
sudo rm -f /etc/cloud/cloud.cfg.d/90-dslist.cfg
sudo cloud-init clean --logs
sudo reboot
Prevention & Hardening
Validate user-data in CI and test cloud image behavior per provider template.
cloud-init devel schema --config-file user-data.yaml
cloud-init analyze show
Related Errors & Cross-Refs
Related errors include datasource timeout, invalid cloud-config, and cloud-final service failed.
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
cloud-init docs, Ubuntu cloud image guidance, and provider metadata service references.
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.