Affected versions: Ubuntu 24.04 LTS

πŸ“– ~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 time increases significantly while cloud-init retries unavailable metadata services.

Environment & Reproduction

Frequent after cloning images between different virtualization platforms.

systemd-analyze blame | grep cloud-init

Root Cause Analysis

Datasource probing includes endpoints that do not exist in the current environment.

Quick Triage

Review cloud-init status and recent logs.

sudo cloud-init status --long

Step-by-Step Diagnosis

Check configured datasource list and timeout settings.

sudo grep -R datasource_list /etc/cloud /etc/cloud/cloud.cfg.d
Illustrative mockup for ubuntu-24-04-lts β€” cloud_init_waiting
cloud-init datasource timeout loop β€” Illustrative mockup β€” Progressive Robot

Solution – Primary Fix

Restrict datasource list and clear stale instance state.

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 β€” cloud_init_datasource_fix
Limiting datasource list β€” Illustrative mockup β€” Progressive Robot

Solution – Alternative Approaches

Disable cloud-init stages not needed for static infrastructure hosts.

Verification & Acceptance Criteria

Boot sequence no longer stalls and cloud-init reaches done quickly.

Rollback Plan

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

Prevention & Hardening

Use platform-specific images with validated cloud-init datasource configuration.

Related to stale instance-id issues and unexpected netplan regeneration.

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.