Update instance metadata?
I'm running Grizzly on Ubuntu 12.04 in a small hosting company, having transitioned most of the production servers from reaaaaally old VMware images. For our internal machines that are being transitioned to openstack, because of the way we do hostnames for VMs (computer type / computer location / company division template plus the last 4 digits of the MAC address) we won't know what the hostname of the running instance should be until after the first boot. I'm working on scripting a hostname change at boot time, pulling the current hostname from the metadata service with
curl -s -i http://
and adding the mac address bit to the end. Two questions: 1) Is it possible to update the hostname in the metadata? I've tried using
curl -X POST -d <new hostname> http://
but that (obviously) won't work. So, is there another way to do it? Which brings me to my next question, 2) Is there any benefit to updating the hostname in the metadata? Or should I just not worry about it? The cloud-config script works just fine for updating the hostname in the OS internals (/etc/hosts, kernel.hostname, etc) - does the metadata even matter?
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- Patrick Vinas
- Solved:
- Last query:
- Last reply: