Openstack – Microsoft Windows Image

Requirements :

  • ISO image of the Windows OS.
  • VirtIO driver for Windows.
  • Cloud init drivers for Windows.

Procedure :

Download the signed VirtIO drivers ISO from the Fedora website.

https://launchpad.net/kvm-guest-drivers-windows/20120712/20120712/+download/virtio-win-drivers-20120712-1.iso

Create a target hard drive to install the Windows Server 2008 R2 Operating System.

$ cd ~ && mkdir KVM && cd KVM

$ qemu-img create -f qcow2 WIN2K8R2.qcow2 20G

Attach Windows Server 2008 R2 ISO and boot the same.

$ qemu-system-x86_64 –enable-kvm -m 2048 -boot d -drive file=WIN2K8R2.qcow2,if=virtio -cdrom Win2K8X64R2Ent.iso -drive file=virtio-win-drivers-20120712-1.iso,media=cdrom -net nic,model=virtio

If Don’t have KVM, remove KVM enabled

$ qemu-system-x86_64  -m 2048 -boot d -drive file=WIN2K8R2.qcow2,if=virtio -cdrom <path to windwos.iso> -drive file=<path to VirtIO.iso>,media=cdrom -net nic,model=virtio

Once installation is started you need to connect to VM using tight VNC viewer.
Follow the below mentioned steps to install the drivers & operating system.

  • Click Install
  • Select your Operating System type
  • Accept License Terms
  • Select Custom Installation
  • Click ‘Load Driver’
  • Click Browse
  • Navigate to the cdrom ‘Virtio Drivers’ You should see two cdroms attached. One is the install cdrom and the other the ‘Virtio Drivers’
  • Select ‘Virtio Drivers’ => STORAGE => SERVER2008R2 => AMD64
  • Click OK
  • The ‘Red Hat VirtIO SCSI controller’ driver should be highlighted. If not then you have done something wrong.
  • Click Next Driver should load without error and take you back to the screen to select the hard drive to install the Operating System on
  • Click ‘Drive options’
  • Click ‘New’ Ensure the entire drive space is being used – in our case the entire 20G
  • Click ‘Apply’
  • Click ‘OK’
  • Click ‘Next’ The Operating System will install. This process may take awhile depending on resources you gave initially.
  • Once completed you should be prompted to changed the Administrator password.

Set the Date and Time

  • From the ‘Initial Configuration Tasks’ screen
  • Click ‘Set time zone’
  • From the ‘Date and Time’ window Click ‘Change time zone…’
  • From the ‘Time zone:’ drop-down select your time zone.
  • Click ‘OK’
  • Click ‘OK’

Enable Remote Desktop

  • From the ‘Initial Configuration Tasks’ screen scroll down to the option ‘3. Customize This Server’
  • Click ‘Enable Remote Desktop’
  • At the ‘System Properties’ window the ‘Remote’ tab under ‘Remote Desktop’ select your preferred level .
  • Click ‘OK’

Once remote desktop enable for the VM, establish a remote desktop connection & install cloud init driver in the VM from below links :-

From the below links you are able to download cloud init package for window .
http://www.cloudbase.it/cloud-init-for-windows-instances/

Once cloud init installed sucessfully it will ask you to run sysprep at end to installation of cloud init package.

After cloud init is installed you need to check “Cloud Initialization Service” running in services.

Reboot the VM.

Now import the qcow2 image in glance .

# glance image-create –name window –is-public=true –disk-format=qcow2 –container-format=bare –file (location of qcow2 image that you want to import into glance ).

 

Note : For windows lovers who likes to prepare image in windows, can use qemu-windows libraries click qemu-windows

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s