Can set_hostname in cloudinit on centos6.4 image be made to persist across reboot?
I have a centos6.4 image with cloud-init installed. The image has the default hostname set in /etc/sysconfig/
When I boot the instance with nova boot, cloud-init sets the hostname to the instance name, which is what I want. However, this hostname does not persist if I reboot the instance - set_hostname will not re-run, and the instance will boot with a hostname derived from the net config (e.g. 172-17-17-4). I would like for the hostname to remain the instance name when I re-boot.
Is there a way to configure cloud.cfg to get set_hostname to run for every boot? Or can set_hostname be locally configured to modify /etc/sysconfig/
Any help appreciated,
Justine
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- Justine
- Solved:
- Last query:
- Last reply: