Ask Your Question

How to login in Ubuntu 16.02 Cloud QCOW2 .Img based VM.

asked 2019-01-08 10:34:13 -0600

Abhisheks gravatar image


i have downloaded an .img of Ubuntu 16.02 Cloud QCOW2 and able to launch the VM, now not getting that how to login into the Ubuntu OS.

Please help!


edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2019-01-08 11:21:40 -0600

novainfinite gravatar image

you should add key when you build instance and try ssh -i KEY_NAME ubuntu@IP_ADDRESS

edit flag offensive delete link more


Thanks for quick response! I have tried that but getting, public key denied. :(

Abhisheks gravatar imageAbhisheks ( 2019-01-08 11:45:36 -0600 )edit

Firstly install guestfish:

apt-get install guestfish

In order to edit the img file:

guestfish --rw -a precise-server-cloudimg-amd64-disk1.img

Then, start your image file:

<fs> run

Find the image local disk:

<fs> list-filesystems /dev/vda1: ext4

Mount the image disk to guestfish root:

novainfinite gravatar imagenovainfinite ( 2019-01-09 04:50:51 -0600 )edit

<fs> list-filesystems /dev/vda1: ext4

Mount the image disk to guestfish root:

<fs> mount /dev/vg_centosbase/lv_root /

Now, you can edit /etc/cloud/cloud.cfg file in order to load whatever you want when instance created. I wanted to set user password for ubuntu user, so I added these lines to th

novainfinite gravatar imagenovainfinite ( 2019-01-09 05:05:31 -0600 )edit

If you get public key denied, something is wrong with the key. Are you sure the key on the ssh command line corresponds to the key you used when launching the instance?

The key's fingerprint should be in the console log, if I am not mistaken.

Bernd Bausch gravatar imageBernd Bausch ( 2019-01-09 17:35:07 -0600 )edit

You should not have to modify the image with guestfish or other methods. I can confirm that there is no problem logging on to a Ubuntu 16 instance.

Bernd Bausch gravatar imageBernd Bausch ( 2019-01-09 17:37:09 -0600 )edit

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


Asked: 2019-01-08 10:34:13 -0600

Seen: 35 times

Last updated: Jan 08