Affected versions: Ubuntu 24.04 LTS Ubuntu 24.04 Ubuntu 24.04.1

πŸ“– ~1 min read

Table of contents
  1. Symptom & Impact
  2. Environment & Reproduction
  3. Root Cause Analysis
  4. Quick Triage
  5. Step-by-Step Diagnosis
  6. Solution – Primary Fix
  7. Solution – Alternative Approaches
  8. Verification & Acceptance Criteria
  9. Rollback Plan
  10. Prevention & Hardening
  11. Related Errors & Cross-Refs
  12. References & Further Reading

Symptom & Impact

Boot times are prolonged due to repeated datasource discovery retries.

Environment & Reproduction

Common on cloned images moved between cloud and non-cloud platforms.

cloud-init status --long
systemd-analyze blame | grep cloud-init

Root Cause Analysis

cloud-init probes metadata endpoints that are unreachable in current environment.

Quick Triage

Check active datasource list and timeout behavior.

grep -R datasource_list /etc/cloud /etc/cloud/cloud.cfg.d 2>/dev/null

Step-by-Step Diagnosis

Review cloud-init logs to confirm datasource retry loops.

sudo journalctl -u cloud-init -n 120 --no-pager
sudo cloud-init status --long
Illustrative mockup for ubuntu-24-04-lts β€” terminal_or_console
Diagnosis commands for post 159 β€” Illustrative mockup β€” Progressive Robot

Solution – Primary Fix

Limit datasource list to the platform in use and clean stale cloud-init cache.

Still having issues? Our Server Management team can diagnose and resolve this for you. Get in touch for a free consultation.

echo 'datasource_list: [ NoCloud ]' | sudo tee /etc/cloud/cloud.cfg.d/99-datasource.cfg
sudo cloud-init clean
Illustrative mockup for ubuntu-24-04-lts β€” log_or_dashboard
Fix validation evidence for post 159 β€” Illustrative mockup β€” Progressive Robot

Solution – Alternative Approaches

Disable cloud-init stages that are not needed for static server deployments.

sudo cloud-init status --long

Verification & Acceptance Criteria

Boot completes without excessive cloud-init wait time and status reaches done.

cloud-init status --wait

Rollback Plan

Remove custom datasource config and restore default cloud-init files.

sudo rm -f /etc/cloud/cloud.cfg.d/99-datasource.cfg

Prevention & Hardening

Bake environment-specific cloud-init settings into base images.

sudo cloud-init schema --system

Related to delayed networking and duplicate hostname initialization.

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 documentation.

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.