So I wanted to create vms with centos7 on it so the steps I thought i would take was
Now it seemed logical to look for IMAGE_ID in
But the catch is centos image was not there
you can find it here :-
http://cloud.centos.org/centos/7/images/
Now go ahead get the image-id and create a vm as specified above.
Next thing you will run into is credentials. How do i log into the box ( lets say if you can not ssh for some reason into it)
Cloudinit comes to rescue a simple
Now you can loginto your box with these credentials
$ nova boot --flavorFLAVOR_ID
--imageIMAGE_ID
--key-nameKEY_NAME
\ --user-dataUSER_DATA_FILE
--security-groupsSEC_GROUP_NAME
--metaKEY=VALUE
\INSTANCE_NAME
Now it seemed logical to look for IMAGE_ID in
$ novaimage-list
$glance image-list
But the catch is centos image was not there
you can find it here :-
http://cloud.centos.org/centos/7/images/
$glance image-createimageName
--location IMAGE_URL
Now go ahead get the image-id and create a vm as specified above.
Next thing you will run into is credentials. How do i log into the box ( lets say if you can not ssh for some reason into it)
Cloudinit comes to rescue a simple
mydata.file
mydata.file will look like this$ nova boot --image ubuntu-cloudimage --flavor 1 --user-data mydata.file
#cloud-config
password: yourpwd
chpasswd: { expire: False }
ssh_pwauth: True
Now you can loginto your box with these credentials
username:centos
password:yourpwd
No comments:
Post a Comment