Monday, September 1, 2014

Creating Custom Windows Images for Openstack

Setting up the KVM environment to create the custom images.

yum install kvm qemu-kvm python-virtinst libvirt libvirt-python virt-manager libguestfs-tools

Once the packages are installed we need to get the ISO’s.

For example are getting windows7 from the

Now we need the Virtio Driver’s so that windows can detect unsigned devices like linux from


First Create the Disk on which the OS need to be installed

qemu-img create -f qcow2 -o preallocation=metadata windows.qcow2 20G

Start the KVM installation
/usr/libexec/qemu-kvm -m 2048 -smp 2 -cdrom X17-24395.iso -drive file=virtio-win-0.1-81.iso,index=3,media=cdrom -drive file= windows.qcow2,if=virtio,boot=off -boot d -vga std -k en-us -vnc -usbdevice tablet

Connect to Installation

Once the above step is done you will be able to connect to VNC using
You will be connected to VNC and you will be at the installations screen. Click Next to continue


Select Install option to continue with installation.


While secting the Installation driver we need to load the driver, Select the load driveroption and load the driver from the Virto ISO we have mounted


Continue with the installation


Once you are done download the Cloud init for windows from
Once installation is completed load the computer with virto NIC with following Command

/usr/libexec/qemu-kvm -m 2048 -smp 2 -drive file=virtio-win-0.1-81.iso,index=3,media=cdrom -drive file=windows-7.qcow2,if=virtio -boot d -vga std -k en-us -vnc -usbdevice tablet -net nic,model=virtio
Connect to VNC and add the Virto NIC Driver From Device manager


Now install the Cloud-init and initialize the Image


Enable RDP for the access.

Now the Image is ready for Use .

You can get the windows password by

nova get-password <instance ID> <ssh-key>



Nova Rule

nova secgroup-add-rule default tcp 3389 3389

No comments:

Post a Comment