Install libguestfs-tools
sudo yum install libguestfs-tools # Fedora/RHEL/CentOS
sudo apt-get install libguestfs-tools # Debian/Ubuntu
Update /etc/cloud/cloud.cfg in QCOW2 image to allow password
[boris@icehouse1 Downloads]$ guestfish --rw -a trusty-server-cloudimg-amd64-disk1-tw1510.img
Welcome to guestfish, the guest filesystem shell for
editing virtual machine filesystems and disk images.
Type: 'help' for help on commands
'man' to read the manual
'quit' to quit the shell
><fs> run
100% ⟦▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒⟧ --:--
><fs> mount /dev/sda1 /
><fs> ls /etc/cloud
build.info
cloud.cfg
cloud.cfg.d
templates
><fs> edit /etc/cloud/cloud.cfg
system_info:
# This will affect which distro class gets used
distro: ubuntu
# Default user name + that default users groups (if added/used)
default_user:
name: ubuntu
lock_passwd: False
gecos: Ubuntu
groups: [adm, audio, cdrom, dialout, dip, floppy, netdev, plugdev, sudo, video]
sudo: ["ALL=(ALL) NOPASSWD:ALL"]
shell: /bin/bash
# Other config here will be given to the distro class and/or path classes
:wq
><fs> exit
Upload via glance and launch with both ssh keypair and post customization script :-
#cloud-config
password: mysecret
chpasswd: { expire: False }
ssh_pwauth: True

Active instance will allow login within VNC console
View also http://bderzhavets.blogspot.com/2014/...
[root@dfw02 ~(keystone_admin)]$ nova boot --flavor 2 --user-data=./myfile.txt
--image 03c9ad20-b0a3-4b71-aa08-2728ecb66210 VF19RS
where
[root@dfw02 ~(keystone_admin)]$ cat ./myfile.txt
#cloud-config
password: mysecret
chpasswd: { expire: False }
ssh_pwauth: True
Login via qdhcp-namespace && ssh keypair will still work
[root@icehouse1 Downloads(keystone_admin)]# ip netns exec qdhcp-c07c3957-b87b-4891-81a1-4119f354a922 ssh -i oskey45.pem ubuntu@40.0.0.20
The authenticity of host '40.0.0.20 (40.0.0.20)' can't be established.
ECDSA key fingerprint is 5e:49:4b:62:ca:72:20:11:f1:33:fa:08:9e:6f:de:4c.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '40.0.0.20' (ECDSA) to the list of known hosts.
Welcome to Ubuntu 14.04.1 LTS (GNU/Linux 3.13.0-37-generic x86_64)
* Documentation: https://help.ubuntu.com/
System information as of Fri Oct 17 17:00:50 UTC 2014
System load: 0.0 Processes: 76
Usage of /: 15.8% of 4.89GB Users logged in: 1
Memory usage: 3% IP address for eth0: 40.0.0.20
Swap usage: 0% IP address for eth1: 20.0.0.17
Graph this data and manage this system at:
https://landscape.canonical.com/
Get cloud support with Ubuntu Advantage Cloud Guest:
http://www.ubuntu.com/business/services/cloud
2 packages can be updated.
2 updates are security updates.
Last login: Fri Oct 17 17:00:50 2014 from 192.168.1.153