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:
- Log in to the ECS and view the Cloud-Init configuration file.
- 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 this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.