New Question
0

Customizing configuration before creating a VM

asked 2015-08-24 11:41:28 +0300

Rochdi gravatar image

Hi, I have successfully deployed Openstack with hyper-v using your solution and it was very easy and useful. But I'd like to ask a question which is, is it possible to customize the configuration of the new VM before starting it for the first time, like for example, I type a new username and password by adding two fields in openstack's dashboard, exactly in the creation form of a new VM? That will lead to skip the step of typing your username and password for the windows when you start your new VM and take in consideration the new configuration customized in the creation form. What I'm thinking about is writing a script, but I don't know how I do it. Knowing that this process is available on WAP (windows azure pack). Best regard

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
1

answered 2015-08-24 21:59:02 +0300

alexpilotti gravatar image

An agent called Cloud-Init on Linux and Cloudbase-Init on Windows runs as part of the initial guest provisioning.

There are quite a few actions performed, with username and password management being just one of those.

By default a user called admin is provisioned on the instance. The encrypted password can be retrieved with nova get-password (there's an Horizon equivalent UI action):

nova get-password vm1 ~\.ssh\id_rsa

PowerShell userdata scripts can also be passed as part of the boot action (see for example the Horizon interface), for example:

#ps1
Set-Content c:\hello.txt "Hello OpenStack"

Some suggested introductory readings:

Cloudbase-Init: http://www.cloudbase.it/cloud-init-windows

Cloudbase-init github site for reference documentation: https://github.com/stackforge/cloudbase-init

For orchestration:

Windows Heat templates: https://github.com/openstack/heat-tem...

Juju orchestration: http://www.cloudbase.it/juju/

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

[hide preview]

Question Tools

1 follower

Stats

Asked: 2015-08-24 11:41:28 +0300

Seen: 205 times

Last updated: Aug 24 '15