製品情報
パブリックイメージの更新情報
OSの公式サポート終了計画
製品に関するお知らせ
/etc/cloud/templates/hosts.${os_type}.tmpl テンプレートに基づいて新しいファイル /etc/hosts を生成し、インスタンスの元の /etc/hosts ファイルを上書きします。 したがって、ユーザーがインスタンス内部に /etc/hosts 構成を手動で変更してインスタンスを再起動すると、 /etc/hosts 構成が元のデフォルト構成に戻ることになりました。/etc/hosts 構成が上書きされなくなりました。
2018 年 9 月より前に作成されたインスタンスの場合は、次の手順に従って変更します。/etc/cloud/cloud.cfg 構成ファイル中の - update_etc_hosts を - ['update-etc-hosts', 'once-per-instance']に変更します。sed -i "/update_etc_hosts/c \\ - ['update_etc_hosts', 'once-per-instance']" /etc/cloud/cloud.cfg
/var/lib/cloud/instance/sem/パスの下にconfig_update_etc_hostsファイルを作成します。touch /var/lib/cloud/instance/sem/config_update_etc_hosts
cat /etc/hosts

vim /etc/cloud/templates/hosts.redhat.tmpl
127.0.0.1 test test
/etc/hostsファイルを変更します。vim /etc/hosts
127.0.0.1 test test
フィードバック