Help Center > > FAQs> ECS Management> Changing Hostnames> What Should I Do If the Hostname of My ECS Is Restored After the ECS Is Restarted?

What Should I Do If the Hostname of My ECS Is Restored After the ECS Is Restarted?

Updated at: Jun 18, 2020 GMT+08:00

The following uses an ECS running the CentOS 7 OS as an example:

  1. Log in to the ECS and view the Cloud-Init configuration file.
  2. In the /etc/cloud/cloud.cfg file, comment out or delete update_hostname.
    • update_hostname indicates that the hostname is changed in Cloud-Init each time the ECS is restarted.
    • update_hostname is commented out in public images by default. For instructions about how to comment out update_hostname in private images, see Installing Cloud-Init.

Did you find this page helpful?

Submit successfully!

Thank you for your feedback. Your feedback helps make our documentation better.

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?







Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel