[Openstack] Mystery of VM's Hostname

Girija Sharan girijasharansingh at gmail.com
Thu Dec 18 14:09:28 UTC 2014


Hi All,

I am using Openstack Icehouse release and have multi-node setup.
I am wondering how the nova instances launched using Nova CLI (or from
Horizon) are getting their hostnames, as I am not specifying any hostname
as part of launching.

I launched 2 instances :
*Instance A :* using CentOS 6.3 (32-bit) cloud image without cloud-init
*Instance B :* using CenOS 6.6 (64-bit) cloud image with cloud-init
pre-installed

On instance *A* I got hostname as ' host-21-0-0-5 ' (21.0.0.5 is the fixed
IP address which this VM got assigned and 'dummyA' was its name)
And on instance *B* I got hostname as ' dummyb ' (dummyB was the instance
name which I gave during its launching)

To verify it, I decided to check meta-data on both of them.

When I ran command " curl
http://169.254.169.254/openstak/latest/meta_data.json " on instance *A*, it
was unable to connect. *Then I deleted route entry " 169.254.0.0
255.255.0.0  eth0 ".* After this I got meta_data.json output.
To my surprise here I got :

*hostname : dummya.novalocal*
*name : dummyA*

I ran same curl command on instance *B* (here the *above mentioned route
entry was not present*, so no need of deleting it). On this I got following
details :

*hostname : dummyb.novalocal*
*name : dummyB*



*Queries :---------------*
*1). *Why this difference between hostnames of the 2 instances ?  Is this
because of the above mentioned route entry, as it is restricting instance
*A* to connect to meta-data server at time of booting up ?
*2).* Please do point me to any helpful links from where I can get
understanding of VM's hostname mechanism.

Thank you in advance. Waiting eagerly for an early response.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20141218/2e91e22b/attachment.html>


More information about the Openstack mailing list