📖 ~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 process hangs on cloud-init stages, delaying service readiness and orchestration workflows.

Environment & Reproduction

Ubuntu 22.04 images cloned from cloud templates and used on-prem. Reproduce where no valid metadata endpoint exists.

Root Cause Analysis

cloud-init probes unavailable datasources and waits for timeout before completing initialization modules.

Quick Triage

Check cloud-init status –long and systemd unit timings with systemd-analyze blame | grep cloud-init.

Step-by-Step Diagnosis

Inspect logs in /var/log/cloud-init.log and journalctl -u cloud-init -b, then review datasource configuration under /etc/cloud/cloud.cfg.d.

Illustrative mockup for ubuntu-22-04-lts — ubuntu2204-common-problem-20-cloudinit-01.webp
Boot delays caused by cloud-init waiting for metadata source. — Illustrative mockup — Progressive Robot

Solution – Primary Fix

Limit datasource_list to valid sources for the environment and disable unneeded cloud-init modules on persistent non-cloud hosts.

Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.

Illustrative mockup for ubuntu-22-04-lts — ubuntu2204-common-problem-20-cloudinit-02.webp
Tune cloud-init datasource list for non-cloud deployments. — Illustrative mockup — Progressive Robot

Solution – Alternative Approaches

Disable cloud-init entirely after initial provisioning if no dynamic metadata-driven config is required.

Verification & Acceptance Criteria

Boot completes without cloud-init timeout delays and required host configuration still applies correctly.

Rollback Plan

Revert datasource and module config files from backup, then rerun cloud-init clean and reboot.

Prevention & Hardening

Use environment-specific golden images and validate first-boot timing before broad rollout.

cloud-init timeout, datasource not found, start job running for cloud-init-local.service.

Related tutorial: View the step-by-step tutorial for Ubuntu 22.04 LTS.

View all Ubuntu 22.04 LTS tutorials on the Tutorials Hub →

Browse all common problems & solutions on the Tutorials Hub.

References & Further Reading

cloud-init documentation, Ubuntu cloud image customization guides, systemd service ordering 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.