Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Run cloud-init status on the server. It reports whether cloud-init is still running, has finished, is disabled, or ended in an error. If another script must wait for initialization, use cloud-init status --wait; it blocks until cloud-init completes instead of requiring a hand-written polling loop.

For troubleshooting or machine parsing, add --long or --format=json. You can also test /var/lib/cloud/instance/boot-finished, a documented persistent marker, but that file only tells you that the marker was created. It does not expose errors, exit status, datasource details, or stage timings.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How do I know cloud-init is done?

Log in to the target server and run:

cloud-init status

The command gives cloud-init’s high-level state. A normal completed run is reported as done. Other states indicate that initialization is still in progress, cloud-init is disabled, or the run ended in an error. This is the quickest interactive check when you only need an answer for one machine.

Do not infer readiness merely from the operating system accepting SSH connections. Cloud-init can continue installing packages, writing configuration, or running user-data scripts after the network is reachable. If your next action depends on those changes, synchronize with cloud-init itself.

#1 Best Overall
Sale
Compressed Air Duster,130000RPM Super Power Cordless Air Duster,Rechargeable Brushless Blower,3 Gear Adjustable Blower with LED Light,Dust Remover for Computer/House/Outdoor/Car
  • Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
  • With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
  • Wide Application:Upgraded attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
  • Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
  • Warranty & Support: Our Electric air duster comes with 5 years warranty and 24/7 customer service. During this period, if you have any questions,pls kindly feel free to contact us.

What “finished” means in cloud-init

Cloud-init processes a server through five boot stages:

  1. Detect: determine the platform and available datasource.
  2. Local: perform work that must happen before networking is configured.
  3. Network: run network-dependent initialization.
  4. Config: apply configuration modules.
  5. Final: run late-boot modules and user-defined work.

The Final stage is implemented by cloud-final.service and runs as late in boot as possible. User-data scripts, package installation, and configuration-management plugins commonly run there. Therefore, an external provisioning process that needs the effects of user data should wait for completion of the Final stage rather than treating an earlier network or configuration milestone as sufficient.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Cloud-init’s status command summarizes the overall run, while detailed output identifies the individual stages. A server can have completed early stages successfully while still working in Final, so a check that only verifies that networking is available is not equivalent to a completed cloud-init run.

How can I wait until cloud-init finishes?

For a script running outside cloud-init, use the blocking form:

cloud-init status --wait

Canonical’s boot documentation recommends this subcommand for external scripts. It waits for cloud-init to finish without forcing you to create a custom polling loop or a chain of systemd dependency units. The command returns when cloud-init reaches a terminal state, allowing the calling process to decide whether the server is ready.

Rank #2
EVEO® Screen Cleaner Spray Kit (Streak-Free) TV Screen Cleaner for Smart TV, Lcd, LEd, Oled | Computer Screen Cleaner Spray and Wipe Microfiber Cloth - TV, Monitor, Laptop, iPad, Car - 6.7oz 1 Pack
  • Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
  • Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
  • Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
  • Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
  • Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth

Use it immediately before the operation that depends on initialization. For example:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#!/bin/sh
set -u

if cloud-init status --wait; then
    echo "cloud-init completed successfully"
    exec /usr/local/bin/start-application
else
    rc=$?
    echo "cloud-init did not complete cleanly (exit code $rc)" >&2
    exit "$rc"
fi

The command’s documented exit codes are useful as an automation gate:

  • 0: cloud-init ran without error.
  • 1: cloud-init crashed.
  • 2: cloud-init finished with recoverable errors.

Whether an exit code of 2 is acceptable depends on your workload. A script that only needs the network might continue, while a deployment that requires every package and configuration step should stop and inspect the reported errors before proceeding. Treat the code as a decision point, not as proof that every requested action succeeded.

What command checks cloud-init status in detail?

Use --long for a human-readable diagnosis

Run:

cloud-init status --long

The extended form includes the high-level state plus fields intended for diagnosis and automation output. It reports the extended status, boot status code, datasource information, error arrays, and stage timing data. This is the most useful first command when a plain status result is unexpected.

Record the output before restarting services or cleaning instance state. It captures what cloud-init believed happened during that boot and can show whether the problem was associated with the datasource, a particular stage, or a recoverable error.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
BladeHawks RGB Gaming Mouse Pad Extra Large Extended 31.5x12 Inch-Black
  • 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
  • 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
  • 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
  • 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
  • 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.

Use JSON when another program must parse the result

For structured output, run:

cloud-init status --format=json

The JSON representation exposes the overall status and extended status, the boot status code, datasource details, error lists, and per-stage timestamps. Stage records include start and finished values for stages such as init, init-local, modules-config, and modules-final.

Those timestamps let an automation system distinguish “not started” from “completed” and identify where time was spent. Parse the fields by name rather than matching the human-readable text. A minimal shell example using jq is:

cloud-init status --format=json > /run/cloud-init-status.json

status=$(jq -r '.status' /run/cloud-init-status.json)
extended=$(jq -r '.extended_status' /run/cloud-init-status.json)
error_count=$(jq '.errors | length' /run/cloud-init-status.json)
final_finished=$(jq -r '.stage.modules-final.finished // empty' /run/cloud-init-status.json)

printf 'status=%s extended=%s errors=%s final_finished=%sn' 
  "$status" "$extended" "$error_count" "$final_finished"

Field names are part of the CLI’s documented JSON output. Keep your parser tolerant of absent or empty stage values so it can distinguish a stage that has not yet run from one that completed without a timestamp in a particular release.

Is there a boot-finished file I can test?

Yes. Test the documented marker with:

test -f /var/lib/cloud/instance/boot-finished

The file is persistent under the current instance directory and is created by cloud-init’s final_message cloud-config module. Cloud-init documents it as indicating when “boot” is finished.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A file test is useful in shell scripts, image-building tools, and environments where invoking the cloud-init CLI is inconvenient. It is not a replacement for status inspection:

Rank #4
Sale
Vaydeer Wrist Rest for Keyboard and Mouse, Computer Ergonomic Wrist Support Pad, Soft Memory Foam Arm Cushion for Desk, Palm Hand Office Laptop Typing
  • 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
  • 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
  • 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
  • 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
  • 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.
  • The marker test answers only whether that path exists.
  • It does not provide the exit code that distinguishes a clean run, a crash, and recoverable errors.
  • It does not show datasource information, error arrays, or stage timestamps.
  • A caller that uses only the file must arrange its own polling or an external watcher if the file is not present yet.

If you use the marker in a polling loop, include a timeout and log the last detailed status. An unbounded loop can leave a deployment waiting forever when cloud-init is disabled, crashes, or cannot reach its datasource.

Which completion check should automation use?

Check Synchronization Observability Automation safety Best use
cloud-init status Immediate snapshot; it does not wait. High-level state only. Simple human or shell gate; inspect the returned code. Quick interactive checks.
cloud-init status --wait Blocks until cloud-init reaches a terminal state. Returns the documented success, crash, or recoverable-error code. Safest default for an external script that must wait. Provisioning workflows and service-start wrappers.
cloud-init status --long Immediate snapshot; it does not wait. Extended status, boot code, datasource, errors, and timing data. Good for diagnosis and log collection. Investigating a server that is late or incomplete.
cloud-init status --format=json Immediate structured snapshot; it does not wait. Machine-readable fields and per-stage start/finished timestamps. Best for parsers and orchestration systems. Telemetry, gates, and incident automation.
/var/lib/cloud/instance/boot-finished No built-in wait; the caller must poll or watch. Presence of one persistent marker only. Useful as a lightweight fallback, but weak for error handling. Shell tests and image-building tools.

Practical procedures

Check one server interactively

  1. Connect to the server with your normal administrative account.
  2. Run cloud-init status.
  3. If the result is not done, run cloud-init status --long.
  4. Read the reported errors, datasource, and stage information before deciding whether to wait, retry, or investigate.

When the status is done and the expected user-data effects are present, the initialization run has completed. If those effects are missing, continue with the stage and log checks below rather than assuming the status command is wrong.

Gate a deployment script

  1. Run cloud-init status --wait as the first synchronization step.
  2. Capture its exit code instead of discarding it.
  3. Continue only for the exit codes your workload explicitly accepts.
  4. On a crash or unacceptable recoverable error, collect cloud-init status --long and JSON output and stop the dependent deployment.

This ordering prevents a deployment from racing package installation, account creation, filesystem setup, or user-data commands that are still in Final.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Feed status into an orchestration system

  1. Invoke cloud-init status --format=json on the target.
  2. Parse status, extended_status, errors, and the relevant stage’s finished timestamp.
  3. Record the boot status code and datasource details with the host’s provisioning logs.
  4. Apply a timeout in the orchestrator even if a separate step uses --wait.

Use the JSON fields for decisions and retain the complete document for diagnostics. Human-readable output is convenient for an operator but is more fragile for a parser.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What to do when cloud-init is not done

The status is still running

Do not start workloads that require Final-stage changes. Run cloud-init status --long to see which stage has not finished and whether the datasource or error list explains the delay. If you are in an external script, prefer cloud-init status --wait rather than implementing increasingly short polling intervals.

Best Value
Sale
Under Desk Cable Management Tray No Drill, Metal Mesh Cable Management Under Desk with Clamp Mount, 2 Hole Cable Tray with Wire Management and Cord Organizer for Home Office Standing Desk
  • 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
  • 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
  • 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
  • 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
  • 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.

The status is error

Capture both long and JSON output. Check the error array, boot status code, datasource detail, and the stage whose finished value is absent or later than expected. Then inspect the cloud-init logs and the relevant systemd stage service for that distribution. Package names, unit layouts, and log locations vary by operating-system image, so use the service and log paths provided by that image rather than assuming one universal location.

The status is disabled

A disabled result is a terminal state, not a temporary wait condition. Determine whether the image intentionally disables cloud-init. If your provisioning design requires user-data processing, correct the image or enablement policy before starting dependent services; waiting cannot make a disabled agent run.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The command says done but expected work is absent

First verify that the missing action was actually configured in the supplied user data and belongs to a stage that ran. User-defined scripts and package installation commonly execute in Final, so inspect the Final-stage timing and cloud-final.service status. Then review cloud-init logs for module errors and confirm that the selected datasource delivered the intended user data.

The boot-finished file is missing

Use the CLI instead of treating the missing marker as a complete diagnosis. A missing file can mean that Final has not run, that cloud-init terminated before the final_message module created it, or that the image uses a different instance-state context. The detailed status and stage service identify which case applies.

Readiness checklist before declaring the server ready

  • Run cloud-init status --wait for any external process that must synchronize with initialization.
  • Require an exit result your application considers successful; do not silently accept recoverable errors.
  • Confirm that Final-stage work, including required user-data scripts or package installation, has completed.
  • Use --long when an operator needs datasource, error, or timing details.
  • Use JSON when a program must parse status or stage timestamps.
  • Use /var/lib/cloud/instance/boot-finished only as a lightweight marker, with a bounded polling strategy if you wait on it.
  • When anything is missing, inspect the distribution’s cloud-init logs and the corresponding systemd stage service before retrying.

Bottom line

cloud-init status answers the basic question, and cloud-init status --wait is the documented synchronization command for scripts outside cloud-init. Use the long or JSON forms when you need errors and stage timing, and reserve /var/lib/cloud/instance/boot-finished for simple marker checks. For provisioning decisions, wait for the Final stage represented by cloud-final.service, then evaluate the command’s exit result rather than relying on network availability or SSH access alone.

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.