I want to have os image that can login with password.

download UEC image. for example, this precise. http://cloud-images.ubuntu.com/precise/current/precise-server-cloudimg-amd64-disk1.img

this image was forbidden to password login feature in terminal console. it's reasonable for use of cloud image.

but now, I test sample image for use of OpenStack. so, I create iamge that can login with password in terminal console.


# qemu-nbd --connect=/dev/nbd0 /home/ubuntu/os_images/precise-server-cloudimg-amd64-disk1.img
# mkdir /mnt/target_vm
# mount /dev/nbd0p1 /mnt/target_vm

chroot to qcow2 image

# chroot /mnt/target_vm/

change password for ubuntu user

root@ubuntu12:/# passwd ubuntu
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully

terminate chroot

# exit

unmount qcow2 image

# cd /
# umount /mnt/target_vm
# sudo qemu-nbd --disconnect /dev/nbd0
/dev/nbd0 disconnected

test vm

kvm -drive file=./os_images/precise-server-cloudimg-amd64-disk1-custom.img -m 512 -boot d -vnc :0

access with vnc, and check that you can login with password!


http://www.geocities.co.jp/SiliconValley/2994/tool/nvp.html http://www.postcard.st/nosuz/blog/2011/09/10-14