Ask Your Question
0

how to change hostname of created VM

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

Shurik gravatar image

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

Hi,

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
1

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

Simply add the property name to the server

  vm-label:
    type: OS::Nova::Server
    properties:
      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
1

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

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

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

Seen: 2,211 times

Last updated: Oct 22 '14