Create Windows Image for Openstack on virtual box

Hi my dears….

Now again its easier to built windows Openstack VM with virtual box, If you are windows lover, Do it from Virtual Box .. No need of Linux machines.

Windows Image Creation

Requirements :

 

  • Oracle Virtual box
  • ISO image of the Windows OS
  • VirtIO ISO driver for Windows.
  • Cloud Base init  x-64 (for all 64 bit windows versions) drivers

Procedure :

Boot Virtual Box VM from Windows ISO

  • Qcow disk type
  • 40GB Root Disk
  • Load your Windows ISO to the Primary CD drive
  • Add a secondary CD drive and attach the VirtIO ISO to it

Proceed with Windows installation

  • Load VirtIO drivers from the attached ISO during the installation

Enable RDP & user account

Once Image spawn and get into machine Enable RDP, Create User account with admin Privileges.

Install Cloudbase-Init

[DEFAULT]
username=Admin
groups=Administrators
inject_user_password=true
plugins=cloudbaseinit.plugins.windows.sethostname.SetHostNamePlugin,cloudbaseinit.plugins.windows.createuser.CreateUserPlugin,cloudbaseinit.plugins.windows.networkconfig.NetworkConfigPlugin,cloudbaseinit.plugins.windows.sshpublickeys.SetUserSSHPublicKeysPlugin,cloudbaseinit.plugins.windows.extendvolumes.ExtendVolumesPlugin,cloudbaseinit.plugins.windows.userdata.UserDataPlugin
network_adapter=
config_drive_raw_hhd=true
config_drive_cdrom=true
verbose=true
logdir=C:\Program Files (x86)\Cloudbase Solutions\Cloudbase-Init\log\
logfile=cloudbase-init.log
  • Disable Windows Firewall

  • Apply customization to image 

Install packages, add users, modify configurations, etc.

  • Run Windows Update 

  • Run Sysprep:

C:\Windows\System32\sysprep\sysprep.exe /generalize /oobe /shutdown

  • Convert disk image into qcow2 

Sorry to get into Ubuntu.. We need some what. VirtualBox only supports Qcow images, not Qcow2, so we’ll use qemu-img to convert the image to Qcow2 for use with OpenStack. as below

qemu-img convert -f qcow -O qcow2 windows.qcow windows.qcow2

  • 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 ).

Now you are successfully integrated into Openstack.. Here you go…
Advertisements

3 thoughts on “Create Windows Image for Openstack on virtual box

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