π ~1 min read
Table of contents
Symptom & Impact
Instance boot is delayed or blocked while cloud-init waits indefinitely.
Environment & Reproduction
Common on VMs with metadata service reachability issues.
cloud-init status --long
systemctl status cloud-init --no-pager
Root Cause Analysis
Datasource detection or network bootstrap fails, causing module timeouts.
Quick Triage
Inspect cloud-init logs and datasource detection results.
sudo tail -n 120 /var/log/cloud-init.log
sudo tail -n 120 /var/log/cloud-init-output.log
Step-by-Step Diagnosis
Check networking, datasource config, and cloud-init stage completion.
cloud-id
cloud-init analyze show
ip r

Solution – Primary Fix
Set correct datasource list and clean/re-run cloud-init when metadata is reachable.
Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.
sudoedit /etc/cloud/cloud.cfg.d/99-datasource.cfg
sudo cloud-init clean
sudo reboot

Solution – Alternative Approaches
Disable cloud-init networking module when external network bootstrap is managed elsewhere.
echo 'network: {config: disabled}' | sudo tee /etc/cloud/cloud.cfg.d/99-disable-network.cfg
Verification & Acceptance Criteria
cloud-init reaches done state and services start within expected boot window.
cloud-init status --wait
systemd-analyze blame | head
Rollback Plan
Remove custom datasource overrides and restore original cloud-init config.
sudo rm -f /etc/cloud/cloud.cfg.d/99-datasource.cfg
sudo cloud-init clean
Prevention & Hardening
Use tested cloud images and validate metadata service routing before deployment.
cloud-init schema --system
Related Errors & Cross-Refs
Related messages include cloud-init timeout and failed to fetch datasource metadata.
Related tutorial: View the step-by-step tutorial for Ubuntu 24.04 LTS.
View all Ubuntu 24.04 LTS tutorials on the Tutorials Hub β
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
cloud-init official docs and Ubuntu cloud image guides.
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.