π ~1 min read
Table of contents
Symptom & Impact
Initial instance boot is delayed for minutes, postponing service readiness.
Environment & Reproduction
Typical on cloned images where cloud-init waits for unavailable datasource metadata.
systemd-analyze blame | head -n 20
Root Cause Analysis
cloud-init datasource detection retries and timeout behavior delay boot targets.
Quick Triage
Review cloud-init status and stage timings.
cloud-init status --long
cloud-init analyze show
Step-by-Step Diagnosis
Inspect cloud-init logs and datasource detection paths.
sudo tail -n 150 /var/log/cloud-init.log
sudo tail -n 150 /var/log/cloud-init-output.log

Solution – Primary Fix
Set correct datasource configuration and clean cloud-init state for the image.
Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.
sudo cloud-init clean --logs
sudo systemctl restart cloud-init-local cloud-init
cloud-init status --wait

Solution – Alternative Approaches
Disable unused datasource probes in controlled VM environments.
sudo sed -n '1,120p' /etc/cloud/cloud.cfg.d/90_dpkg.cfg
Verification & Acceptance Criteria
Boot time decreases and cloud-init reaches done state without long waits.
cloud-init status
systemd-analyze
Rollback Plan
Restore previous cloud-init configuration if provisioning behavior regresses.
sudo cp /etc/cloud/cloud.cfg.d/90_dpkg.cfg.bak /etc/cloud/cloud.cfg.d/90_dpkg.cfg
Prevention & Hardening
Bake validated datasource settings into golden images and test first-boot timing.
Related Errors & Cross-Refs
Related to network bring-up delays and metadata endpoint routing failures.
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 performance tuning 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.