Ask Your Question
0

How to create a instance with username and pw via api

asked 2016-08-23 03:21:37 -0600

KEFHVDI gravatar image

Hello,

i want to know how can i create an instance for example with a windows image and a random username and pw using the Openstack Api ?

edit retag flag offensive close merge delete

Comments

Hi, With nova boot command use --userdata argument which supplies the cloudinit script(with desired username & password) at boot time.

Praveen N gravatar imagePraveen N ( 2016-08-23 23:20:12 -0600 )edit

2 answers

Sort by ยป oldest newest most voted
0

answered 2016-08-23 10:02:40 -0600

alexpilotti gravatar image

You can simply pass admin_pass in the metadata, e.g.:

nova boot --image <yourimage> --flavor 1 --meta admin_pass=<yourpassword> <instance_name>

Note: clear text passwords are not recommended for security reasons. We recommend to let cloudbase-init generate a random encrypted password that can be obtained with:

nova get-password <instance_name> <private_key_path>
edit flag offensive delete link more
0

answered 2016-08-23 05:04:48 -0600

Mohit gravatar image

You can use cloudbase -init tools -: https://cloudbase.it/cloudbase-init/ More details on -: http://blog.oddbit.com/2014/11/15/cre...

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: 2016-08-23 03:21:37 -0600

Seen: 60 times

Last updated: Aug 23 '16