Help Center/ Elastic Cloud Server/ FAQs/ ECS Failure/ Why Is the Hostname of My ECS Restored to the Original Name After the ECS Is Restarted?
Updated on 2025-04-09 GMT+08:00
Why Is the Hostname of My ECS Restored to the Original Name After the ECS Is Restarted?
The following uses an ECS running CentOS 7 as an example:
- Log in to the Linux 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.
- For an ECS created from a public image, Cloud-Init has been installed on it by default. You do not need to manually install Cloud-Init for it. For details about how to modify a private image, see Installing Cloud-Init.
Parent topic: ECS Failure
What is your overall rating for this page?
0
1
2
3
4
5
6
7
8
9
10
Very dissatisfiedVery satisfied
Thank you very much for your feedback. We will continue working to improve the documentation.
The system is busy. Please try again later.