[Openstack] changing hostname by changing instance name

John Griffith john.griffith at solidfire.com
Fri Aug 14 18:53:05 UTC 2015


On Fri, Aug 14, 2015 at 12:31 PM, Jerry Zhao <xyzjerry at gmail.com> wrote:

> I wonder whether the previous hostname was associated with the instance
> name or not. If yes, then your cloud-init worked, just that metadata was
> not updated by changing the instance name. If no, you need cloud-init built
> in the image and it will poll the metadata after reboot.
>
>
>
> On 08/14/2015 10:45 AM, mad Engineer wrote:
>
> so is editing cloudinit manually the only way to change hostname?.I wonder
> how would it get the instance name as hostname during build state.
>
> On Fri, Aug 14, 2015 at 11:06 PM, David Medberry <medberry at gmail.com>
> wrote:
>
>> This is a VM specific issue. You may be able to do so with cloud init but
>> primarily you will need to go into the instance if you do this after the
>> instance is booted.
>>
>> How to do so within the instance is OS specific.
>> On Aug 14, 2015 11:05 AM, "mad Engineer" <themadengin33r at gmail.com>
>> wrote:
>>
>>> is there any way to change hostname by changing instance name.
>>> I tried changing instance name and then did a hard reboot but hostname
>>> is still the same.If this is not the right approach for changing hostname
>>> can some one tell me what should be done to change hostname of instances
>>> without logging to instance.
>>>
>>> tried on Juno-Neutron and icehouse-nova-network none worked
>>>
>>> Thanks for any help
>>>
>>> _______________________________________________
>>> Mailing list:
>>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
>>> Post to     : openstack at lists.openstack.org
>>> Unsubscribe :
>>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
>>>
>>>
>
>
> _______________________________________________
> Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
> Post to     : openstack at lists.openstack.org
> Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
>
>
>
> _______________________________________________
> Mailing list:
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
> Post to     : openstack at lists.openstack.org
> Unsubscribe :
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
>
> ​You could build a new one with the name you wanted... or you could
snapshot the one you have, and create from snapshot again with the name you
wanted.  I've never tried to change something like that, always found it
easier to just spawn a new instance, or ignore the name to begin with.​
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20150814/63fe99cd/attachment.html>


More information about the Openstack mailing list