π ~1 min read
Table of contents
Symptom & Impact
Boot process is slow because cloud-init waits for unavailable metadata sources.
Environment & Reproduction
Common on cloned VMs moved across environments.
systemd-analyze blame | head
cloud-init status --long
systemctl status cloud-init
Root Cause Analysis
Datasource probing timeout occurs when expected metadata endpoints are absent.
Quick Triage
Inspect cloud-init logs for datasource retries.
sudo tail -n 150 /var/log/cloud-init.log
sudo tail -n 150 /var/log/cloud-init-output.log
cloud-id
Step-by-Step Diagnosis
Review current datasource configuration and timings.
grep -RIn 'datasource' /etc/cloud/cloud.cfg /etc/cloud/cloud.cfg.d
cloud-init analyze show 2>/dev/null || true
cloud-init query ds 2>/dev/null || true

Solution – Primary Fix
Define valid datasource list for your platform and clean stale state.
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_datasource.cfg >/dev/null <<'EOF'
datasource_list: [ NoCloud, None ]
EOF
sudo cloud-init clean --logs
sudo reboot

Solution – Alternative Approaches
Disable cloud-init networking if managed externally.
sudo tee /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg >/dev/null <<'EOF'
network: {config: disabled}
EOF
Verification & Acceptance Criteria
Boot no longer stalls on datasource probing.
systemd-analyze blame | head
cloud-init status --long
cloud-init analyze show 2>/dev/null || true
Rollback Plan
Remove override files and rebuild cloud-init state if needed.
sudo rm -f /etc/cloud/cloud.cfg.d/99_datasource.cfg /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
sudo cloud-init clean --logs
Prevention & Hardening
Standardize datasource config in image pipelines by platform.
ls -1 /etc/cloud/cloud.cfg.d
cloud-init --version
Related Errors & Cross-Refs
Often overlaps with netplan race conditions on first boot.
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
Ubuntu cloud-init datasource and boot optimization docs.
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.