Login credentials of Ubuntu Cloud server image

Posted on Apr 28, 2022

Question

I am trying to build a cloud infrastructure using VM's

In the Openstack manuals, it is mentioned that the images in this link contain, Openstack pre-installed.

I downloaded the trusty-server-cloudimg-amd64-disk1.img file and I loaded it using KVM. I instantiated a Virtual Machine using this image but I am not able to login (using the console) or ssh into it.

I do not know the default username and password of that OS.

Also (a different question), I would like to build a Cloud using the 2 Virtual Machines, is it possible to use the same image?

Answer

18.04 setup step-by-step with cloud-localds

In short you need on the host:

sudo apt-get install cloud-image-utils

cat >user-data <<EOF #cloud-config password: asdfqwer chpasswd: { expire: False } ssh_pwauth: True EOF

cloud-localds user-data.img user-data

user-data.img MUST come after the rootfs.

qemu-system-x86_64
-drive file=ubuntu-18.04-server-cloudimg-amd64.img,format=qcow2
-drive file=user-data.img,format=raw
-m 1G …

and now you can login with:

  • username: ubuntu
  • password: asdfqwer

Here I describe a full minimal detailed working QEMU example: https://askubuntu.com/questions/281763/is-there-any-prebuilt-qemu-ubuntu-image32bit-online/1081171#1081171

Tested on an Ubuntu 18.04 host.