how to change hostname of created VM

asked 2014-10-22 07:16:48 -0600

Shurik gravatar image

updated 2014-10-22 09:08:10 -0600


I'm running heat command with template that create new VM.

How I can change the hostname of created machine via heat template?

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2014-10-22 09:36:32 -0600

Simply add the property name to the server

    type: OS::Nova::Server
      name: vm-name
      image: image-name
      flavor: m1.small

In order to correctly configure hostname, you must ensure that used image has cloud-init

edit flag offensive delete link more

answered 2014-10-22 16:07:55 -0600

You can put the command to change hostname in user-data scripts section in Heat tempalte. It will change the hostname on spawning. Please follow this linkif you want to know how it works in details.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2014-10-22 07:16:48 -0600

Seen: 2,457 times

Last updated: Oct 22 '14