Chapter 14. Troubleshooting cloud-init


After running the cloud-init utility, you can troubleshoot cloud-init by examining configuration and log files, then rerunning cloud-init from the command line to apply the fixes.

  • For general configuration issues, review the cloud-init configuration files:

    1. Examine the /etc/cloud/cloud.cfg configuration file. Check which modules are included under cloud_init_modules, cloud_config_modules, and cloud_final_modules.
    2. Check directives (*.cfg files) in the /etc/cloud/cloud.cfg.d directory.
  • If the root partition was not automatically extended, check log messages for the growpart utility.

    Note

    growpart does not support LVM. If your root partition is based in LVM, the root partition is not automatically extended upon first boot.

    • Review the /var/log/cloud-init.log and /var/log/cloud-init-output.log files for details on any specific issue.
  • If the file system was not extended, check log messages for resizefs

    # grep resizefs /var/log/cloud-init.log
Important

Rerun cloud-init commands as root.

  • Rerun cloud-init with only the init modules:

    # /usr/bin/cloud-init -d init
  • Rerun cloud-init with all modules in the configuration:

    # /usr/bin/cloud-init -d modules
  • Delete the cloud-init cache and force cloud-init to run after boot:

    # rm -rf /var/lib/cloud/ && /usr/bin/cloud-init -d init
  • Clean directories and simulate a clean instance:

    # rm -rf /var/lib/cloud/instances/
    # rm -rf /var/lib/cloud/instance
    # rm -rf /var/lib/cloud/data/
    # reboot
  • Rerun the cloud-init utility:

    # cloud-init init --local
    # cloud-init init
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2026 Red Hat
Back to top