On Thu, Dec 18, 2014 at 10:57:52PM +0530, Girija Sharan wrote:
> " curl http://169.254.169.254/openstak/latest/meta_data.json " from inside
> the VM (once it is launched), I am getting hostname, name, availability
> zone, etc etc. as output.
> ----> So here my question becomes : How this meta_data.json file is getting
> created and updated with these details. Details like Name, Availabitily
> zone, flavor, etc I am specifying while launching VM. But no where I am
> mentioning *hostname*. How in meta_data.json file 'hostname' field is
> getting updated/added.

These are set to the name you give your instance when it
boots.  The domain name (".novalocal") is configured in, e.g.,
nova.conf.

> Here, as you have mentioned, my question becomes : How does
> redhat/ubuntu/centos/etc set the hostname if has not been explicitly
> configured by the administrator?

I think I answered this for RedHat and derivatives; I'm not familiar
with how Ubuntu handles this.

> Also, In addition to above query, how does redhat/ubuntu/centos/etc set the
> hostname
> if has not been explicitly configured by the administrator and the VM
> launched didn't get the IP?

I think RedHat may simply default to "localhost.localdomain" if the
system does not have a configured hostname and is not able to reach
DNS, but I'm not sure.

I have no idea how Ubuntu behaves.

-- 
Lars Kellogg-Stedman <[email protected]> | larsks @ {freenode,twitter,github}
Cloud Engineering / OpenStack          | http://blog.oddbit.com/

Attachment: pgpDL4GRAhHBA.pgp
Description: PGP signature

_______________________________________________
Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
Post to     : [email protected]
Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack

Reply via email to