第14章 Troubleshooting cloud-init


After running the cloud-init utility, you can troubleshoot the instance by examining the configuration and log files. After identifying the issue, rerun cloud-init on your instance. You can run cloud-init from the command line. For details, run the cloud-init --help command.

  • 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.

    注記

    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
重要

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

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。 最新の更新を見る.

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

Theme

© 2026 Red Hat
トップに戻る