Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Repair Windows errors before they cause bigger problems3Scan for outdated or missing drivers - takes under a minuteRun cloud-init status for a quick result. If another script must wait until initialization is complete, run cloud-init status --wait; it blocks until cloud-init finishes instead of requiring a polling loop. For diagnostics, use cloud-init status --long or cloud-init status --format=json. A documented file fallback is /var/lib/cloud/instance/boot-finished, but that marker only tells you that the boot-finished module created the file; it does not explain errors or show stage timing.
Need a server to try this on? Antihost offers Linux VPS plans with NVMe storage, full root access and a 14-day free trial.
How do I know cloud-init is done?
Log in to the server and run:
cloud-init status
The command reports cloud-init’s current state, such as running, done, disabled, or error. A state of done means the cloud-init run has completed. For an external provisioning script, the better synchronization command is:
As an Amazon Associate I earn from qualifying purchases.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →cloud-init status --wait
This command waits for cloud-init to finish and then exits, so your script does not have to implement its own polling loop or create a separate systemd dependency chain. When user-data installs packages, creates users, writes configuration, or runs scripts, wait for the final stage rather than merely checking whether an early boot stage has started.
What “finished” means in the cloud-init boot sequence
Cloud-init processes a server through five conceptual stages:
#1 Best Overall
- [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
- [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
- [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
- [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
- [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.
- Detect: cloud-init identifies the environment and available datasource.
- Local: early local configuration runs before the network is fully available.
- Network: network-dependent initialization is performed.
- Config: configuration modules apply settings from the image and user-data.
- Final: late-boot modules run, including many user-data actions, package installation tasks, and configuration-management plugins.
The final stage is implemented by cloud-final.service and runs as late in boot as possible. If your readiness condition depends on a user-data script, package installation, or another final-stage plugin, the server is not ready merely because networking is up or an earlier cloud-init service has exited. Synchronize with completion of the full cloud-init run.
Canonical’s boot documentation describes
cloud-init status --waitas a way for scripts external to cloud-init to block until cloud-init is done without building their own systemd dependency chain.Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallCrashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteSpecial offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Use cloud-init status for a quick check
Run the basic command interactively:
cloud-init status
Read the state before deciding whether to continue:
- Running: cloud-init is still processing one or more stages. Do not assume user-data has completed.
- Done: the run completed. This is the normal completion state for a successful initialization.
- Disabled: cloud-init has been disabled on the image or system. No current run should be expected unless you deliberately enable it.
- Error: cloud-init encountered a failure or completed with an error condition. Investigate before treating the machine as provisioned.
The short output is useful at a terminal, but it is intentionally limited. It does not give you the complete error arrays, datasource details, or timing information needed to diagnose a failed bootstrap. Use the long or JSON forms when a result will drive automation or incident analysis.
Rank #2
- 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
- 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
- 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
- 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
- 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.
Wait safely from an external script
For a deployment process that must not proceed until cloud-init has finished, use:
cloud-init status --wait
The command blocks while cloud-init is active. When it returns, inspect its exit status rather than assuming that every completed run was completely clean. The cloud-init CLI documents these outcomes:
| Exit code | Meaning | How an automation process should respond |
|---|---|---|
| 0 | Cloud-init ran without error. | Continue with steps that require successful initialization. |
| 1 | Cloud-init crashed. | Stop and investigate the failure; do not mark the server ready. |
| 2 | Cloud-init finished with recoverable errors. | Apply your policy explicitly: continue only if those errors are acceptable and separately recorded, or stop for remediation. |
A shell wrapper can preserve that distinction:
cloud-init status --wait
rc=$?
case "$rc" in
0) echo 'cloud-init completed successfully' ;;
1) echo 'cloud-init crashed' >&2; exit 1 ;;
2) echo 'cloud-init completed with recoverable errors' >&2; exit 2 ;;
*) echo "unexpected cloud-init exit code: $rc" >&2; exit "$rc" ;;
esac
The important property is that the wait happens before a dependent action. Put the command immediately before the operation that consumes user-data results, not in a separate best-effort diagnostic step that can race with provisioning.
Get diagnostic detail with --long
When the short result is not enough, run:
cloud-init status --long
The detailed form exposes the high-level state plus information useful for troubleshooting and operational records, including:
Rank #3
- [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
- [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
- [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
- [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
- [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by
extended_status, which gives a more specific status description;boot_status_code, which identifies the boot result code;- error collections showing problems reported during initialization;
- datasource information, helping you determine which metadata source supplied configuration;
- stage timing data, so you can see where initialization spent time.
Use this output when a server says it is done but a user-data effect is missing, when a run appears stuck, or when two otherwise similar machines behave differently. Save the output with the provisioning job if you need an audit trail; it records the state observed on that particular boot rather than a permanent health guarantee for every later service.
Use JSON when a program must parse the result
For structured automation output, run:
cloud-init status --format=json
JSON output exposes the status and extended status, error information, and per-stage timestamps. The documented stage records include init, init-local, modules-config, and modules-final, with start and finished timestamps. A parser can therefore answer both “is cloud-init done?” and “which stage has not finished?” without scraping human-readable text.
For example, a system with jq can select the fields your orchestration system needs:
cloud-init status --format=json | jq '{status, extended_status, boot_status_code, errors}'
To inspect stage timing:
cloud-init status --format=json | jq '.stage'
The exact JSON nesting should be validated against the cloud-init version installed on the target image before you hard-code a production parser. Treat documented field names as the contract, and handle absent or empty error arrays rather than assuming they always contain text. JSON is preferable to the short command for machine decisions because it keeps status, errors, and timing as separate values.
Rank #4
- Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
- Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
- All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
- Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
- Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.
Can I test the boot-finished file?
Yes. Cloud-init documents this persistent marker:
test -f /var/lib/cloud/instance/boot-finished
The file indicates that “boot” is finished and is created by the final_message cloud-config module. A script can use its existence as a simple gate:
if test -f /var/lib/cloud/instance/boot-finished; then
echo 'cloud-init boot marker exists'
else
echo 'cloud-init boot marker is not present'
fi
This method has an important limitation: the file is only a marker. It does not provide the status code, error arrays, datasource information, or per-stage timestamps available from the status command. If you poll for the file, add a timeout so a failed or disabled initialization cannot leave your job waiting forever. For synchronization with cloud-init itself, cloud-init status --wait remains the primary documented mechanism.
Choosing the right completion check
| Check | Synchronization | Observability | Automation safety | Best use |
|---|---|---|---|---|
cloud-init status |
Does not wait; returns the current state. | Basic state only. | Good for a human or a simple one-time gate; insufficient if the state is still running. | Quick interactive check. |
cloud-init status --wait |
Blocks until cloud-init completes. | Returns a completion result and exit code. | Safer than a custom polling loop for external scripts. | Deployment and provisioning synchronization. |
cloud-init status --long |
Does not itself add a wait unless combined with a separate wait step. | Shows extended status, boot status code, errors, datasource details, and timing. | Useful for diagnostics; parse carefully if used in scripts. | Human troubleshooting and incident logs. |
cloud-init status --format=json |
Reports the current result; use --wait separately when a blocking operation is required. |
Structured status, errors, and per-stage start/finished timestamps. | Best for machine parsing and policy decisions. | Orchestrators and monitoring integrations. |
test -f /var/lib/cloud/instance/boot-finished |
Does not wait; a caller must poll or use an external watcher. | Only marker-file existence. | Simple but easy to misdiagnose and vulnerable to an unbounded wait. | Shell checks or image-building tools that need a documented file marker. |
A practical troubleshooting sequence
- Check the high-level result. Run
cloud-init status --long. Record whether the state is running, done, disabled, or error, along with the extended status, boot status code, datasource, and errors. - Switch to JSON for automation or deeper inspection. Run
cloud-init status --format=jsonand inspectstatus,extended_status,errors, and the stagefinishedfields. This distinguishes an unfinished stage from a completed run that reported an error. - Check the expected stage. Determine where the missing action belongs. User-data scripts, package installation, and configuration-management plugins commonly execute in the Final stage. If that stage has not finished, the server is not ready for a consumer that depends on those actions.
- Inspect logs and the stage service. If the state is error or expected work is absent, inspect the cloud-init logs and the relevant systemd stage service on that distribution. Packaging and log locations vary, so use the paths and service-management commands provided by the operating system image. The late stage is represented by
cloud-final.serviceon systemd-based systems. - Check the marker only as corroboration. Test
/var/lib/cloud/instance/boot-finishedif a shell tool or image builder requires it, but do not use its presence to replace error and status inspection. - Re-run the dependent verification. After correcting the underlying issue, verify the actual outcome your application needs: a package is installed, a file exists with the expected contents, or a configured service is available. Cloud-init completion means initialization finished; it is not a substitute for checking the resource your workload consumes.
Why a server can look ready before it really is
Network availability is not final-stage completion
A reachable IP address only shows that networking succeeded. Cloud-init can still be applying configuration or running final-stage user-data. A deployment that connects as soon as the network responds can race with package installation, account creation, or configuration-file generation.
An exited early service is not the whole run
The five-stage sequence is broader than any one early boot unit. Use the overall status command, and for late user-data effects pay particular attention to cloud-final.service. Do not infer completion from a single earlier stage.
Best Value
“Done” does not mean every application is healthy
Cloud-init reports its initialization outcome. A service started by user-data may subsequently fail for an unrelated reason, or a package manager may leave the machine in a state that requires application-level verification. After waiting, test the specific readiness condition required by your deployment.
Patterns for reliable automation
Gate a provisioning step with the blocking command
Place cloud-init status --wait in the same script that performs the next provisioning action. Handle exit codes explicitly, then run the dependent command only for the outcome your policy accepts. This prevents a fast script from racing with cloud-init and makes recoverable errors visible rather than silently ignored.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Record structured evidence
Capture the JSON result after the wait when you need an audit record. Store the status, extended status, boot status code, errors, and stage timestamps with the deployment event. The record lets you distinguish a slow final stage from a crash without relying on a later interactive login.
Use a bounded marker-file wait when required by a legacy tool
If a tool understands only the documented marker, poll for /var/lib/cloud/instance/boot-finished with a finite deadline. On timeout, collect cloud-init status --long and the relevant stage logs instead of continuing as if initialization succeeded. A marker-based loop should be a compatibility fallback, not the default synchronization design.
Quick Recap
Common mistakes and their fixes
- Checking only the file with no timeout: add a deadline and gather status diagnostics when it expires.
- Parsing the human-readable short output: use
--format=jsonfor stable machine-readable fields. - Treating exit code 2 as identical to exit code 0: decide explicitly whether recoverable errors are acceptable for your workload.
- Assuming a missing user-data effect means cloud-init is still running: inspect the status, errors, and stage timestamps; the run may already be done with a reported failure.
- Declaring readiness after network startup: wait for final-stage completion when the dependent work runs there.
- Assuming a marker file explains a failure: the marker has no error details, so pair it with long or JSON status output.
- Using one distribution’s log path everywhere: cloud-init packaging and log locations vary; inspect the paths and service definitions on the actual image.
Completion checklist
- Run
cloud-init statusfor an immediate state. - Use
cloud-init status --waitbefore an external process that depends on initialization. - Handle exit codes 0, 1, and 2 according to an explicit readiness policy.
- Use
--longfor errors, datasource details, boot status, and timing. - Use
--format=jsonwhen software must parse the result or inspect per-stage timestamps. - Remember that
cloud-final.serviceruns the late Final stage where many user-data actions occur. - Use
/var/lib/cloud/instance/boot-finishedonly as a simple, documented marker fallback. - After cloud-init completes, verify the actual package, file, account, or service condition your workload requires.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




