Total Pageviews

Thursday, April 14, 2011

Windows Virtual Machine with RHEV Guest tools in RHEV

Setting up  Windows Virtual machine with VIRTIO Drivers  in RHEV and Virtual Machine Sub Tabs Explained


 In this section we are going to see how to create a windows 2003 virtual machine  with virtio disk and NIC, for better performance and the installation of guest agent tools . You can follow the same Procedure for  other supported windows version,  In case of any changes i will mention it explicitly with a note section for corresponding versions .

Log in to RHEV Manager-->Click on New Server under Virtual Machine tab.

General

In our example We are creating a virtual machine in Data Centre Named Mumbai-DC1, on a Cluster Named Web Cluster and Selected the Default Host to "Auto Assign" in the cluster . Selecting Auto Assign is always recommended so that RHEVM will choose the best host available with maximum resource avialbale  on the cluster based on internal algorithm , and also for the cluster load balancing policy to work properly you need to select the Auto Assign Instead of telling the Virtual Mahcine to run on any Specific host in the Cluster.


And in the VM named field give the virtual machine name with relevant description on the next  field , If you are going to Create a virtual machine from already exisiting template select it from the drop down menu of "Based on Template" , If there is no such then select the Blank Template with Required Cores,Sockets,Memory and Operating system Type.

I will Cover up the Cluster Load Balancing and Even Distribution, Creating Virtual Machine templates and deriving the virtual machine from existing templates  in a seperate Blog

Windows Sys Prep

Then Move to Next Tab sysprep and if you want to join the virtual machine in to any of the existing DC, add  your domain name else leave it blank and its not mandatory , and select your time zone relevant to your location.



Console

In the Console Section Select VNC, if its an Server Class Operating system and SPICE is recommended for desktop class virtual machines like xp and windows 7 . And coming  ot the USB Policy its disabled by default for Server Class Virtual Machines and if you create any desktop using "New Desktop" then you will find the USB Option Enabled , else its always greyed out for server class virtual machines .

This usb is nothing but when you access any of the desktop class virtual machines from  the user portal either from thin client or some from remote browser , then you can pass you locally connected USB to the remote desktop running on rhev.


I will Cover up USB pass through and User Portal under VDI Section as a seperate Blog

High Availability

Then Move to High Availability, If you want this virtual machine to be highly avilable , Simple Enable it  so upon any hardware failure on host  where it runs  , the virtual machines will move to other available host in the same cluster . You can set even the Priority , the Virtual machine with High will move first , Medium Next and Low follows rest .


Boot Sequence


Under "Boot Sequence" Leave default as it is  if you are creating the virtual machine for first , i just highlited all the option available under the drop down menu , its very usefull  after the post install for example incase if you want o dual boot the vm with other os  using either CD or network pxe  or else you can run it from local hard disk . And Even you can Attach a CD as well .


Finally Click Ok You will get a Required Action Screen to Launch the Virtual Machine Instance.



Attaching  NIC

From the above action Select and Attach NIC, Don't forget select Red Hat Virt Io for better network I/O Performance and rtl8139 is the generic driver ships with windows os but performance wise its very poor . And if yo have more than one network then select the network name instead of rhevm and  even you can pass the optional fixed MAC to the virtual machine NIC


Attaching Disk


Next Configure the virtual Disk for the vm, For this Select the Disk size in GB,Storage Domain to create the virtual machine image , if you have more than one Storage Domain in the Data Cenre, the n you can slect the one you desired , and under Advanced option , leave default disk type to system , since this is the first system disk aatched to the virtual machine ,and for the Interface always select virtio and Select Disk Format to Preallocated instead of sparse .




Preallocated is recommended for server class work loads and Thin Provisioning is Ok , if you are running less I/O intensive desktop class work loads. Thin Provisioning will  allows you to do storage over commit in short , its a copy and write image format .

Wipe After Delete , this is just an security option selectin this will  write  zeros and ones to the disk once you deleted the virtual disk . So that no can tamper the disk image even though after vm or disk deletion.



Is boo-table, is always enabled for the first virtual machine disk you added to any virtual machine

Note: If you add second disk , then its going to be Disk type of Data ,and the Is Botable option will be greyed out



Once the above things are Select Configure Latter Tab and finish the configuration


Starting the Virtual Machine For First Time

Now you see from above , the w2k3 vm we created is in down state. Select the vm and Right click and Run Once


On the Above screen select the virtual floppy drive for virtio disk driver , since windows doesn't ships with this by default, failure to select this will lead to your windows intaller will fail to detect the hard disk .


Attach the Operating system iso disk , and leave the default display protocol to vnc and don't select Start in Pause Mode or Run Stateless and Click OK.

 Start in Pause mode will be better if you are going to boot the already installed virtual machine  using network pxe or  if in case if you are going to dual boot with other operating system on a virtual machine

Run stateless: It will create a stateless virtual machine , what ever  data you stored on you current session won't persist after reboot.

Then the Virtual Machine will start Powering up, Now Select the virtual machine , Right Click and Select the Console .



It will open a vnc console with windows installtion screen . Follow your windows installtion step to finish your installation.


One thing  to note as below in the screen shot you will see while windows Partioning , you will see 8198MB disk0 at Id 0 on bus 0 on viostor[MBR] . This viostor indicates your system disk  is virtio disk not an IDE one


Note: For windows 2008 and Windows 7, You have to select the Load Driver Option during this step and Select the Virtual Floppy Drive we attached from a Run Once Tab and Browse the virtio disk driver as per your architecture and install it , then the installer will detect the hard drive and you proceed the installation as per your windows Installation guide.


To change the CD , If your installer is shipped with multiple CD, then you can select the virtual machine from the Virtual machine tab, Right Click and Select the Change CD and Proceed the installation


RHEV Guest Tools Installation


Before Proceeding this Ensure you uploaded RHEVM tools and virtual flpoppy drive on to the nfs iso library . Eg  RHEV-toolsSetup_2.2_47513.iso & virtio-drivers-1.0.0-45801.vfd


After the Installation , Attach your RHEV-Tools setup iso on your virtual machine CDROM , by Select & Right Click on virtual machine--> Change CD option.


Now login via vnc console to the virtual machine and in the D: drive , run the RHEV-tools setup , as like below


Click Next-->Leave all Selected by default RHEV Network for your Virtual Machine NIC driver ,RHEV Block is virtio disk driver for better performance and RHEV Agent is the tools runs inside your windows guest and give you all the installed applications inside the virtual machines and the ip,memory and cpu statistics.




Click Install and Finish



Reboot the Guest and Now if you see the windows guest started Showing the IP and other installed applications

I will take you to the Virtual Machine Templates and Snapshots of both RHEL and windows virtual machines, RHEV Log Files , Troubleshooting Tips, User Management, VDI, User Portal  and much more  in next couple of days in My Blog Stay Tuned....

2 comments:

Unknown said...

thanks a lot.............ultimate work

Unknown said...

thanks a lot...ultimate work