Ask Your Question

any openstack centos image with a set password i can use?

asked 2015-02-12 12:14:59 -0500

nutshi gravatar image

updated 2015-02-12 12:21:04 -0500

I have to do some quick benchmarking. I am unable to my vms since neutron is not setup properly. I can create centos vm.. but i can not log into it. I tried adding keypair, i tried could init change root password

 list: |
 expire: False

it does not work. I mean it did not give any errors on log console but i am not abel to login with the credentials i set.

So my question is ..where can i find a openstack centos 7 image whose password is already set ( i guess it would be a custom one)

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted

answered 2015-02-12 13:12:41 -0500

dbaxps gravatar image

updated 2015-02-12 13:42:53 -0500

Tested just now via dashboard with ssh-keypair && Post Creation=>Script Data Window
Upload to glance second qcow2 image from

$  nova boot --flavor 2 --key_name oskey57 --user-data=./myfile.txt  --image image-id  CentOS7RX


[root@dfw02 ~(keystone_admin)]$  cat ./myfile.txt
password: mysecret
chpasswd: { expire: False }
ssh_pwauth: True
edit flag offensive delete link more

answered 2015-02-12 13:14:20 -0500

larsks gravatar image

Hey, this question sounds familiar.

If Neutron isn't set up correctly, you're not going to be able to do much with your OpenStack environment. However, even with broken networking, you can pass your user-data script to the instance using the --config-drive option, e.g:

nova boot --user-data /path/to/config.yaml --config-drive=true ...

There is a checkbox in the Horizon gui to use this feature as well. This attaches your configuration as a virtual CD-ROM device, which cloud-init will use rather than the network metadata service.

If I put your cloud-config into a file called user-data.yaml, and then run:

nova boot --image centos-7-cloud --user-data user-data.yaml centos

Then I can log in as the centos user using the password stackops.

edit flag offensive delete link more

answered 2015-02-12 14:12:48 -0500

nutshi gravatar image

thanks larsks and dbaxps

I checked my nova config file config_drive was set


and i had this cnould init file (actually i tried many cloud init files)

cat myconfig.txt :-

 list: |
 expire: False

cat mynewconfig.txt

#cloud-config users: - name: demo passwd: $6$rounds=4096$X3xB1mwI$K0tjjjGmQd2HeC4PH2lqEM8MT5JCupvtx6RyXoCvUwZOnhhfJaVXjddkM03bVXmSDbb9CtrpOVykJFsj1OsDD/

chpasswd: list: | root:stackops centos:stackops expire: False

ssh_pwauth: True

runcmd: - [ ls, -l, / ] - [ sh, -c, echo "=========hello world'=========" ]

and i am creating the vm using

server = nova.servers.create(name = vmName, image =, flavor =, nics = nicss, availability_zone = availability_zone , userdata = user_data, key_name = )

but nothing worked!

but dbaxps .. i tried your solution it worked.

Do you mind explaining ( for understanding what i might be doing wrong) .. was i using the wrong format "passwd" ?? or is it the combination that was wrong ? means i tried password , ssh_pwauth, choasswd everythign .. but may be not right combination like

passwd password: mysecret , chpasswd: { expire: False }, ssh_pwauth: True

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



Asked: 2015-02-12 12:14:59 -0500

Seen: 10,110 times

Last updated: Feb 12 '15