How to create a instance with username and pw via api

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

KEFHVDI gravatar image


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


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

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

Mohit gravatar image

You can use cloudbase -init tools -: More details on -:

edit flag offensive delete link more

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

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


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

Seen: 333 times

Last updated: Aug 23 '16