Help Center> Elastic Cloud Server> FAQs> ECS Management> 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?

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.