Total Pageviews

Showing posts with label RHEV. Show all posts
Showing posts with label RHEV. Show all posts

Sunday, December 9, 2012

RHEV & Ovirt

  Difference between and RHEV & Ovirt


RHEV is the stable version, while oVirt is upstream.

Features from oVirt get merged into RHEV when stable and tested.

Consider Fedora and RHEL - Fedora is a rich distribution in terms of features and packages, but it's not supported commercially, has a short lifecycle, and is not geared towards stability. RHEL is based on Fedora, but it's code is tested and stabilized.

Same goes for oVirt - it's a bleeding edge development, off of which RHEV is based. oVirt is very new, but not as stable as RHEV, and has no commercial support. RHEV is not as advanced, but it's stable, well tested and geared towards the enterprise and mission critical systems.

To know more about  Ovirt  Click Here 

For RHEV Click Here


Reference: http://serverfault.com/questions/385867/what-is-the-difference-between-rhev-and-ovirt

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

Saturday, March 26, 2011

Adding RHEL Host in RHEV Manager

How to use RHEL Host as an Hypervisor in  RHEV 2.2?


You can use either RHEV-H or RHEL5 Update 4 and Later as an Hypervisor on your RHEV.  To add RHEL Host in a RHEV , Ensure that Red Hat Enterprise Linux 5.5 is correctly installed and configured on the physical host. if you are running RHEV 2.2 and you can use RHEL5.4 for RHEV 2.1. Refer to theRed Hat Enterprise Linux Installation Guide for more information.

Only the Base package group is required. All other packages can be removed or not selected.

Note: While doing an Fresh Host installation Do not select any Virtualization or KVM Package.

Ensure the host is correctly subscribed to the appropriate Red Hat Network channels.

Red Hat Enterprise Virt Management Agent (v.5 for x86_64)

RHEL Virtualization (v. 5 for 64-bit x86_64)

Once  the above channels are subscibed Log in to the Host and run the below command to verify it and you will get Similar output as like below on your host.


# yum repolist

Loaded plugins: rhnplugin, security
rhel-x86_64-rhev-mgmt-agent-5                                                             | 1.3 kB     00:00
rhel-x86_64-rhev-mgmt-agent-5/primary                                                     | 3.7 kB     00:00
rhel-x86_64-rhev-mgmt-agent-5                                                                              22/22
rhel-x86_64-server-vt-5                                                                   | 1.4 kB     00:00
rhel-x86_64-server-vt-5/primary                                                           | 105 kB     00:03
rhel-x86_64-server-vt-5                                                                                  386/386
repo id                            repo name                                                      status
rhel-x86_64-rhev-mgmt-agent-5      Red Hat Enterprise Virt Management Agent (v.5 for x86_64)      enabled:     22
rhel-x86_64-server-5               Red Hat Enterprise Linux (v. 5 for 64-bit x86_64)              enabled: 11,118
rhel-x86_64-server-vt-5            RHEL Virtualization (v. 5 for 64-bit x86_64)                   enabled:    386
repolist: 11,526



Install the below required packages

yum install bridge-utils fence-agents kvm-qemu-img

In case if there is any xen or libvirt packages , Remove the xen, kernel-xen and libvirt packages using below command.

 yum remove xen kernel-xen libvirt

Then edit the /etc/hosts file entry and add your rhev manager ip and hostname entry as relevant to your environment , so that RHEV Manager will  enable vdsm and other services to connect properly to the host while adding the Host to the RHEV Manager as well as Point your /etc/resolv.conf to the proper DNS entry, so that both forward and reverse look up works properly .

 Append /etc/hosts and add below entries

yourhostip          yourhostfqdn
yourrhevmanagerip   yourhevmanagerfqdn


Then we need to create a Network Bridge called "rhevm" as prerequest on the Host manaully . You can check my below blog  to see how to create a bridge interface on stand alone kvm hypervisor , replace bridge name with rhevm.

http://rcritical.blogspot.com/2010/12/setting-up-bridge-networking-on-kvm.html

Sample Configuration

# cat ifcfg-rhevm
DEVICE=rhevm
TYPE=Bridge
ONBOOT=yes
IPADDR=IP
NETMASK=255.255.255.0
GATEWAY=GATEWAYIP
DELAY=0
PEERNTP=yes
DNS1=yourprimarydns ip

# cat ifcfg-eth1
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=none
HWADDR=00:25:B3:AD:61:13
BRIDGE=rhevm


Once your bridge is up and running and the Host registered to the RHN or local youm repository , Now its is the time to add a Host from the RHEV Manager UI . Un like RHEV-H , RHEL Host won't comes up for approval , you need to manully add the host to the DC from the RHEV Manager UI.

 Log into RHEV Manager UI-->Host-->New, feed all the details and Click on Ok


 As like RHEV-H Registration , RHEVManager will Validate the RHEL Host as well  , You will See all the Logs on the Under the Events Tab .


And if in case failed with some error check the Events tab first  on RHEVM UI and then log in to the host from ssh and check   vds_installer.xxx.log , vds_bootstrap.xxx.log under /tmp/ for RHEL host and bootstrap logs under /var/log/vdsm-reg/ in case of RHEV-H.

If ever thing succeeds it will go for a reboot, after the reboot cycle  RHEL Host will Comes into Up state in the RHEV Manager UI. Now you can create a new virtual machine or Live Migrate the existing Virtual Machine from other Hypervisors in the same to cluster to his new Host.






Note: Add Host button is only to add RHEL as a HOST , not for RHEV-H


Reference Link: http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Virtualization_for_Servers/2.2/html/Administration_Guide/Administration_Guide-Create_Objects-Add_Server.html

Wednesday, March 16, 2011

RHEV In a NutShell

RHEV Hypervisor Installation and  RHEV Manager  UI Deep Dive 

  Under this section we are going to complete tour of Installing and Setting up RHEV Hypervisor, RHEV Manager, starting from Creating Data Centre, Adding Cluster, Registering RHEV-Hypervisors as well RHEL as Hypervisors, Attaching storage, Creating and Managing Virtual Machines, Virtual Machine Snapshots, Templates, User and Role Management, Configuration Tuning and More .



Log in to RHEV Manager from  any of the Supported Browsers from your Desktop or you You can Go to Start-->All Programs-->Redhat-->RHEVManager-->RHEVManager IE TAB from the same machine where you installed RHEV Manager.



Browser Prerequisites:


A client with Windows XP and .NET Framework 3.1 with Service Pack 1, or Windows 7, is required to access the web-based administration portal. The client must be running Internet Explorer 7 or 8.


To connect to virtual machines with SPICE via the Red Hat Enterprise Virtualization administration portal, a SPICE browser plug-in is used. The SPICE plug-in for Internet Explorer is only compatible with 32-bit editions of Internet Explorer.


When using a 64-bit Windows operating system, you must install a 32-bit edition of Internet Explorer to use the SPICE plug-in. You must also make a global registry setting change to allow the WPF application to run as a 32-bit process. The process for making this change is described in Microsoft kbase article 974396


Note : If you get any Certificate Download error while downloading the WPF Certificate of RHEV Manager on your IE, You can disable the Internet Explorer Enhanced Security Feature by opening a ServerManager-->Configure IE ESC--->Select OFF.




Set up Overview

Some brief details about the set up we are going to use in our Demo.

RHEV Manager FQDN :   http://rhevmanager.rhev.in/
Admin User : rhevadmin
Domain :  rhev.in
Hypervisor 1: hyp1-ml350g6.rhev.in (RHEV-H)
Hypervisor 2: hyp2-dl580g5.rhev.in (RHEL as an Hypervisor)
DNS: rhev.in (With Forward and Reverse Lokk up configured for both hypervisors,RHEV Manager and storage in case of NFS and IscsI Set Up )

Lets starts with Login to RHEV Manager



Once you Logged in It will Take you to to Virtual machines Tab, But which will be  empty We are going to Set up  on our upcoming Section




To do that Go to Data Centres Tab . You will find a Default Data Centre in Uninitialized state.Either you can use the existing Default One or you can create a new as relevant to our environment.





Creating Data Centre


To Create a New Data Centre, Click on New under Data Centre Tab and fill as like below. In our Set up  We are going to Create a New Data Centre Named "Mumbai-DC1" with a Description of "Mumbai-Private-Cloud" with Storage type of FCP (Fibre Channel)  and Select the Compatibility Version to 2.2 and Click OK . I strongly recommend you to use rhev 2.2 instead of 2.1 since it comes up  with more features.


Note: I will cover  setting up NFS and ISCSI Data Centre Set up on Separate Blog and Its almost similar as like below with few changes




Once you Select  OK You will get a Pop up New Data Centre Guide Me screen as like Below, Select Configure Clusters




It will take you to the New Cluster Set up screen, Give the Cluster name "Web-Cluster" with some relevant description "Web Server Farms" and the Data Centre is going to be our newly Created Mumbai-DC1 by default, and from the Memory Overcommit Drop Down Menu Select " Server Load (150%) "  and From the CPU Name field Select your cpu type in our case its "Intel Xeon" and from the Compatibility Version select 2.2 and Click on OK




Next it will take you to Configure Host and Storage  as like below, Since we did not installed any Hypervisor, you can select Configure Later and Proceed to RHEV Hypervisor Installation.




As of now We created a Data Centre named Mumbai-DC1 and a cluster named web-cluster in that Data Centre.






Note: I will take you to the details of the Data Centre and Cluster Sub tabs in the upcoming section, so don't skip any of the below Section  and if you so it will work smoothly.



RHEV Hypervisor Installation


Download the Necessary RHEV-H Image from the RHN and burn it on A CD else you can use your USB drive as boo table media See below Link for more details on how to make your RHEV-H Boo table USB or if you have the RHN or any other PXE boot Server running environment you can integrate the one too . See below Link for more detail on USB and PXE Boo table of RHEV-H


Preparing a RHEV Hypervisor USB storage device
http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5/html/Hypervisor_Deployment_Guide/sect-Deployment_Guide-Preparing_Red_Hat_Enterprise_Virtualization_Hypervisor_installation_media-Preparing_a_RHEV_Hypervisor_USB_storage_device.html


RHEV-H PXE Cobbler
http://rcritical.blogspot.com/2010/11/rhev-hypervisor-installtion-using-rhn.html




Once you Prepared the Install media Boot the Server with RHEV-H , and you will find a below screen after the Post Bios .


Type  boot: linux storage_init=/dev/cciss/c0d0 firstboot


Note: Replace cciss driver with your Hardware Hard disk driver eg: /dev/sda


You will find all other possible boot parameter on the Boot Menu or you even refer the below Hypervisor installtion guide for more detail


http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5/html/Hypervisor_Deployment_Guide/chap-Deployment_Guide-Installing_Red_Hat_Enterprise_Virtualization_Hypervisors.html






Now from the Configration Set up Menu Select and configure in the following  order







Configure Storage
Select  1) "Configure Storage Partition"





Select the default value to yes or you can configure manually by selecting "Review Option", In our section am selecting the default one or if you are not sure which disk to select you go back by selecting "Return to Back Menu".




Now Select "Commit Configuration" & Accept and Proceed








Setting Up Root Password & Enable  SSHD


Enable SSH Authentication and Set the Password by seclecting "Configure Authentication" and I strongly recommend to enable this so that it will easy for remote administartion in case of any issues.


set admin password : you root password





Toggle SSH Password authentication : To enable sshd daemon





Press "Retun to Menu"  once you set the password and enabled sshd

Configure Host name

Now Set the hostname of the Hypervisor by Selecting "Set the Hostname" Option.


Configuring Networking

Move to the Next Step Enable Networking by Selecting "Networking Setup"

Choose the interface eth0 or eth1 as per your environment & Select Yes or No to find out the actual eth0 or eth1



Now Enable or Disbale Vlan as per your requirement , Now am going to make this as simple by slecting No, i will take you the rhev vlan deep dive on a sperate blog

Then Select the IP either its going to be Static Or DHCP, Netmask, Gateway, DNS and NTP Server IP, in our case Weare using static network configuration . Then finally Select "Save and Return to Main menu"

Note: At any point of time if you want to check the logs or some other configuration you can use the Option "Support Menu" , it will give you an nice  shell to  troubleshoot.

Registering to RHN

If your hypervisor Connected  to the internet you can use the Option "Resgister to RHN" to register the hypervisor with the RedHat Network Satellite.

Configure RHEV Host

We moved on to one of the important Phase , registering the hypervisor to the Red Hat Enterprise Virtualization Manager by slecting "Configuring the Host for RHEV"

Here you can give either the IP of the RHEV Manager or the Hostname , Hostname is prefered.In our case its rhevmanager.rhev.in, and set the Netconsole as same as rhevmanager.rhev.in ,If you dont have any network or dns  issue you will find the RHEVManager address is set as a output on both the option.

Finally  Select "Install Locally and Reboot", it will ask you to provide any extra kernel paramet leave default and Press Enter to Continue  , once the installtion is over it will go for a reboot .


Now the time to move into RHEV Manager UI and Proceeds rest of the Set up like Approve the Host and Attaching theStorage etc.


Adding RHEL Host as an Hypervisor in RHEV


Check my below Blog to  use RHEL 5.4 & Later as a Hypervisor in your RHEV Set Up 


.http://rcritical.blogspot.com/2011/03/adding-rhel-host-in-rhev-manager.html


Approving RHEV-H or Adding RHEL Host on the RHEV Manager

Log into RHEVManager-->>Go To Host Tab Now  You will  see the hypervisor we installed in our last step, will Pending for approval.


Select the host--> Right Click and Approve


Edit and Select cluster Name from Default to your Cluster Name in our case its web-cluster, and  Enable Power Management with the IP,Username,Password,Port and extra options as per your server remote management and Click on Save


Now RHEV-M  will check all the Hardware and Software Prerequise, Install ssl  cerificates  and Comes Up , You will get detailed Logs under the Events tab on the Down Pane.


After few seconds  hypervisor will come up  and you can simply ignore the failed to connect host to storage domain error as you see under the events tab of the below screen shot , because we are yet to attach the storage domain in the RHEV data center.

What is SPM?

Also if you see on the Host Tab there is an option called SPM status , SPM stands for storage pool manager , it will control and manage storage related locks on the data centre . So on every data centre there should be one SPMhost no matter how many cluster running on that Data centre, it will manage the storage . Once you attach the storage you will see the above host we approved become an spm . we will see more about in detail in the following section.


Adding Storage Domain

Now the Next step is to Add a Storage Domain . In RHEV for any Data Centre to be active you need atleast a singleData storage domain in short SD , to be added under the Storage Domain  and attached to the corresponding Data Centre. Always one of the disk in the Data Centre will be the Data(Master) , even though if the Data centre is running with mutiple data disk .

What is Data & ISO disk under RHEV Storage Domain?

So data disk is nothing but disk where you are going to store the virtual machine  iamges and there is a other disk called ISO disk , it will be used to strore all you ISO  software libraries required to spindle up new virtualmachines as well as to attach CD or Software or RHEV Guest agents tools on to the virtual machines as a cdrom device.

Export and Import Domains

Apart from the above two disk you can even attach the export disk where you can take the virtual machine backup , and you can use the same export disk and attach it to other data centre as a import disk  and import the  virtual machines . So this will be usefull in moving the virtual machines across different data centres . I will coverup the virtual machine export and import of  RHEV in a seperate blog.

Virtual Machine Image Back end Storage format

 In case of nfs storage all the virtual machnies images are created and stored as file whereas in ISCI or FCP storage , every virtual machine, snapshots and templates are stored as a logical volume .

Hope you get a good basic idea about RHEV Storage Domains lets move and see how we can attach the data and iso disks.

Attaching a Data and ISO Disk

Once the Host is Up, Go to Storage Tab-->New Domain-->Select Domain Function as "Data" and Storage Type as "FCP" ,Provided If you already assigned the LUN from you storage to the Hypervisor , it will  try to scan and retrieve n and show you the List of Presented LUN to the Hypervisor as like below. Give some relevant Name to the data disk for example we had given Mumbai-dc1-data1 you can see in one snapshot later below

What is the difference between  "Build New Domain" and "Preconfigured Domain" ?

Leave "Build New Domain" as default since we are doing an fresh set up . "Preconfigured Domain" Will be usefull in a scenario where you don't have full control over you storage environment , so in that case your storage admin create raw volume group and provide  the detail to you , so that you can use this Preconfigured Domain option to import such raw fresh Storage Volume group already created on top of the LUN which is presented  either from you FCP or ISCSI Storage.

Use Host

 Since we have only one approved host , you can use that host in Use host: tab and if you have multiple host already approved on the data centre or in the specific cluster  and presented the same LUN to all  the you can user any host by selecting it using the drop down box.


Now Select the Disk you want to attah and "Add" it using the Down Arrow Key and Click 
OK


After that If there is no error , then the disk will show as "Unattached State" under stroage tab . If you get any error , Log into RHEV Hypervisor and check /var/log/vdsm/vdsm.log to find out  for what reason it getting failed. I will cover about RHEV troubleshoting & RHEV Log files in a sperate blog.


Now we attached the first data disk in the Storage Domain . Now to attach to the specific data centre in our casefor Mumbai-DC1, Go to Datacentre-->Mumbai-DC1-->Select Attach Domain Under Storage Sub section in the Down Pane. You can see the Disk what we attached, select the disk(Mumbai-DC1-Data-1) and Click OK


It will take some time, Disk will go in Locked state and it will become active in some seconds .  See below snapshots the disk is active and since this is the first disk in the DC, it tooks a role of Data Master and the Data Centre Mumbai-DC1 comes to UP and Active State.


Attaching NFS ISO Library

 To attach a NFS iso disk we need one nfs exported empty disk with write permisssion for the Hypervisors , for that we already exported empty nfs export disk with the owner and group permission set to 36:36 on the nfs server .This 36:36 ownership  is manadatory for any nfs exported disk you are going to use with rhev storage.

Setting up NFS Storage  exports on RHEL for RHEV ISO Library or RHEV Data Disks

The below steps also  applicable to RHEV NFS storage data centre and use NFS data disk to store virtual machines. Log into NFS  server console and check, In our case the export disk is /rhev-22-iso and the NFS is running on RHEL5.

#[root@nfs1 ~]# ls -ld /rhev-22-iso/
#drwxr-xr-x 3 root root 4096 Mar 15 01:31 /rhev-22-iso/

Change the Ownership to 36:36

#[root@nfs1 ~]# chown 36:36 /rhev-22-iso/
#[root@nfs1 ~]# ls -ld /rhev-22-iso/
drwxr-xr-x 3 36 36 4096 Mar 15 01:31 /rhev-22-iso/

Cross verfiy the export disk is empty

[root@nfs1 ~]# ls -al /rhev-22-iso/
total 28
drwxr-xr-x  3   36   36  4096 Mar 15 01:31 .
drwxr-xr-x 36 root root  4096 Mar 15 02:00 ..
drwx------  2 root root 16384 Mar 15 01:31 lost+found

To export the Disk,  open /etc/exports and put entry like below

[root@nfs1 ~]# cat /etc/exports
/rhev-22-iso *(rw)

Refresh the export and start portmap and nfs daemon

#[root@nfs1 ~]# exportfs  -rav
exporting *:/rhev-22-iso

Note: In case on your RHEL NFS server selinux is enabled please configure proper labels for the exports

Now go to RHEVManager-->Storage-->New Domain-->Select Data Function to "ISO" and storage type to "NFS"


Note: Remove the last forward slash after the export as i wrongly captured in above diagram

After that If there is no error , then the ISO disk  will show as "Unattached State" under stroage tab . If you get any error , Log into RHEV Hypervisor and check /var/log/vdsm/vdsm.log  ti find out for what reason it getting failed.


Now we attached the ISO disk in the Storage Domain . Now to attach to the specific data centre in our case for Mumbai-DC1, Go to Datacentre-->Mumbai-DC1-->Select Attach ISO Tab  Under Storage Sub section in the Down Pane. You can see the Disk what we attached select the disk(Mumbai-DC1-ISO) and Click OK


It will take some time, Disk will go in Locked state and it will become Inactive  in some seconds. Select the Disk and Click on Activate Button to make it active on the Data Centre.



Note: If you are running multiple data centre there is no need to create seperate ISO library for each  instead you can detach from one data centre and attach to other data centre. Apart from the first data disk you attach a new data centre rest of the disk to be activated manaully else it will always in Inactive state after attached todata centre from the Storage Domain.

So we are having both Data disk and ISO disk active in a RHEV Data centre, Now we can Push some ISO's , to spindle up some new virtual machines.

Uploading ISO's in RHEV

In our example am going to show you the deployment of RHEL6 and windows 2008 Virtual Machines and   how to install RHEV guest tools to install guest agents and virtio block and network drivers for better performance.

Also  am going to upload virtual floppy drives image that contains the virtio block and network drivers to use with os disk  while installing windows virtual machines to provide virtio driver for the Hard disk and NIC for better performance instead of using IDE as an Hard disk inside the virtual Machines .

Note: For RHEL5 Update 4 and Later and RHEL 6,  virtio drivers are integrated into kernel by default so there is no need to manully install any virtio performance drivers for  these RHEL Versions.

To upload ISO Go to the windows RHEV Manager server and Start-->>All Programs-->RedHat-->RHEVManager-->ISO Uploader-->Add-->Browse the ISO path from your local or network drive--> Upload. In our below example am uploading the RHEVGuest tools iso on to the ISO library.


 Use the same step to upload RHEL or windows ISO. If you want to do some bulk upload you can even scp the iso from the source to the remote nfs iso export library path . But it is not recommended but it will work smoothly and fastly as well. To do it from scp command line log in to nfs server and find the path to copy

[root@nfs1 ~]# ll  /rhev-22-iso/9f740b2c-a15a-4666-8f5a-c934f5711bbb/images/11111111-1111-1111-1111-111111111111/ 
total 103044
-rw-r--r-- 1 36 36 105406464 Mar 16  2011 RHEV-toolsSetup_2.2_47513.iso

Note: Second directory with random Alphanumeric number (9f740b2c-a15a-4666-8f5a-c934f5711bbb) will vary across set up , scp the iso on to this path and change the ownership to 36:36 as like below.

From your iso dumps server copy the iso to the nfs iso library

# scp -r rhel-server-6.0-x86_64-dvd.iso root@nfs1.rhev.in:/rhev-22-iso/9f740b2c-a15a-4666-8f5a-c934f5711bbb/images/11111111-1111-1111-1111-111111111111/

Once the iso uploaded then you can go to virtual machines tab and start creating the virtual machines.


Creating Virtual Machine on RHEV

Virtual Machine General Information Tab

Lets start with creating a RHEL6 Virtual Machine. To do do Log into RHEV Manager-->Virtual Machines-->New Server and Feed the Necessary Inputs. Under General Tab configure  Data Centre: Mumbai-DC1, Host-Cluster:Web-Cluster, Default Host:Auto Assign (Leave to default its recommended for virtual machine High Availabillity), Name: RHEL6-WEB(VM NAME), Description: RHEL6 Web Server , Based On Template: Blank(since this is our first virtual machine I will cover up template in the later section) , Select Memory,Cores and Cpus and Operating System Type from the Drop Down Menu.

Note: Only the Operating system available in the Dropdown box menu of Operating System Filed is supported and tested on RHEV Virtualization Infrastructure.




Console Tab

Then on Console Tab Keep VNC as default you can even use SPICE protocol, but i prefer SPICE only for VDI rather for any servers class systems  , USB Policy is default disabled for Server and its only for Desktops , In our example i am going to use VNC and i will cover spice in a later section or in a seperate blog for VDI.

Virtual Machine High Availlabillity Tab

Moving to High Availability Section You can either enable or disable Virtual machine HA based upon the criticallity of the service its running and even you can select priority as like low, medium and High.

 So in a scenario if the host runnning the virtual machines went non responsive for some reason , then the virtual machines which are all marked HA will start migrate to other available host in the same cluster . The vm with High Priority will move first , Medium Next and Low Last .

Since we are running only a single host on the cluster am not enabling this for time being, once we added second host to the same cluster in the data centre , I will cover this and Virtual Machine Live Migration in detail later.

Boot Sequence Tab

Under this you can set First & Second Boot Device, and even you can attach CD once the Virtual Machine was created. Leave Default when you are creating the virtual machine for first time .

After given all the information , you will get "Guide Me" Popup to  add a NIC and Virtual Disk for the Virtual Machine


Configuring NIC for Virtual Machine

Select Configure Network Interface-->Name(nic1)-->Network(rhevm) first logical network you can change as relevantto your environment --> Type(Redhat Virtio) --> If you want you can even specify MAC Address as well-->OK


Note: For RHEL3 & RHEL4 till RHEL4U5, RHEL5 to RHEL5U3 you can't use virtio so in that case select network drivertype to e1000 driver and for RHEL5U4 & later release you can use virio drivers  and for windows you can use Redhat Virtio for better performance when compared generic rtl8139 driver. Its applicable to Virtual Hard disk as well

Configuring Virtual Disk

Select Configure Virtual Disk--> size of disk (5 GB)-->Storage Domain: Mumbai-DC1-Data1(Data Disk Where you want to create te virtual machine)-->and in Advanced Tab-->Disk Type: system (since this is first os installer disk ifyou are going to atttach second disk it sholud be data)-->> Interface: virtio (Hard disk driver for better performace)-->>Format:Preallocated (for better server workloads and you can select thin provisiong for lesser I/O loads or for  dekstops) and Generally for fist virtual disk of vm Bootable flag is enabled and wipe after delete will delete complete refernce about this virtual machine from the storage when you deleted the virtual machine from the RHEVM and this is for security reasons.


Once you click on Ok , Guide me Windows will ask you for option additional NIC and virtual disk configuration youcan safelly Ignore by configure later option then  the Virtual Machine Image will go in  Locked state for few seconds then comes down to Down state

Starting the Virtual Machine for First Time


Now you can start the virtual machine installtion by following the below steps

Select the virtual machine--> "Run Once" (This is only to be run if you are installing for first time or your aregoing to dual boot or reinstall the existing OS else to start the virtual machine you must  always to use "Run" not "Run Once")


Under Run Once Select Boot Options : Select Attach CD-->Select the ISO to use -->> Leave Rest Default and Click OK



Attach Floopy : It will be usefull for windows guest to provide virtual floppy drivers I will Cover later

Boot Sequence : No need any extra fancy explanation

Start in Pause Mode : In case if you are dual booting or starting the virtual machine using PXE this will be helpfull it will boot phase  by phase.

Run Stateless : Its to create stateless virtual machines in short what ever stored on the guest won't persist across guest reboot

Virtual Machine Console

Once the Virtual Mahcine Powered Up Completly, Select the Virtual Machine-->Right Click-->Console.





Then follow the OS install instruction  as per the Operating System guide and deploy your application and test.


Windows Guest Installation


 Check my Below Blog for windows guest installation on RHEV and the rhev guest tools setup .

 http://rcritical.blogspot.com/2011/04/windows-virtual-machine-with-rhev-guest.html

 I will cover up virtual machines snapshots, Templates and User Management and rest of RHEV in next couple of days under the same or in a separate blog as per the topic .

Hope it all helps you guys and your Comments and suggestions are always welcome to improve further.