Ask Your Question
1

How to login in newly booted instances created from images?

asked 2013-04-30 00:24:26 -0500

Veena gravatar image

updated 2013-04-30 13:30:37 -0500

smaffulli gravatar image

I'm using the 64-bit Ubuntu and Fedora images that are given in OpenStack website to launch the instances. The instances are launched successfully and running. But I'm not able to login into those VMs as no credentials are available. There is no doc regarding the user login and password for these images. Could anybody help me regarding this.

edit retag flag offensive close merge delete

6 answers

Sort by ยป oldest newest most voted
5

answered 2015-03-18 10:00:37 -0500

Poonam Agarwal gravatar image

There are 2 ways to login to a newly created instance.

  1. Assign a key for authetication during the instance creation and use that key to login as below

    ssh -i (Key) -l ubuntu (Instance IP)
    
  2. You can use cloud-init to assign a password for the user ubuntu to login Go to Instances, click the Launch Instance button, select required settings, in the Post-Creation tab, insert the code below as Customization Script.

    #cloud-config
    password: mypassword
    chpasswd: { expire: False }
    ssh_pwauth: True
    
edit flag offensive delete link more
4

answered 2013-04-30 01:00:20 -0500

lloydde gravatar image

Having set passwords in those Ubuntu and Fedora images would make them insecure, so the common solution in cloud computing is injecting a authentication key on instance (VM) create. See http://docs.openstack.org/trunk/openstack-compute/admin/content/LaunchingInstancesusing_Dashboard.html where you associate a keypair to the instance on first boot.

You will likely also find http://docs.openstack.org/trunk/openstack-compute/admin/content/booting-a-test-image.html quite relevant. You can upload to your OpenStack cloud the tiny CirrOS test image, which displays it's password right on the screen.

edit flag offensive delete link more
0

answered 2015-03-16 11:30:45 -0500

This video shows how to use cloud-init file to set the VM on the boot time, as well how to change password using the vnc console, in first login

edit flag offensive delete link more
0

answered 2013-05-01 14:46:43 -0500

bedag_dsa gravatar image

Beside the already told possibility to inject authentication keys, i would mention following possibilities:

  1. Spawn the vm via cli using the nova commands the instance password is told via console output.
  2. Set root password for a existing instance by cli

    nova root-password <instance>

hope this helps

Regards

edit flag offensive delete link more

Comments

nova root-password option is not working for already created VM instances when i try to change its password. Are you able to do that in VMs created by any images??

digitaldolby2002 gravatar imagedigitaldolby2002 ( 2013-06-28 04:30:32 -0500 )edit
0

answered 2019-04-18 05:28:44 -0500

Samiya Mallick gravatar image

How to login into fedora instance ? I tried the possibilities that are mentioned but none of them worked.

edit flag offensive delete link more
0

answered 2016-01-17 04:11:33 -0500

MoVam gravatar image

What is the best answer for this question ?

Is it advisible to create images with an associated password - No, because the images are often shared by the end users - Yes it is always necessary only for baremetal instance - Only for virtual instances

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

4 followers

Stats

Asked: 2013-04-30 00:24:26 -0500

Seen: 35,271 times

Last updated: Mar 18 '15