Saturday, May 12, 2012

LINUX XEN – VIRTUALIZATION


What is Virtualization? –
                       A functional Red Hat Virtualization system is multilayer and is driven by the privileged Red Hat Virtualization component. Red Hat Virtualization can host multiple guest operating systems. Each guest operating system runs in its own domain, Red Hat Virtualization schedules virtual CPU's within the virtual machines to make the best use of the available physical CPU's. Each guest operating systems handles its own applications. These guest operating systems schedule each application accordingly. 

You can deploy Red Hat Virtualization in one of two choices:

full virtualization or Para virtualization. Full virtualization provides total abstraction of the underlying physical system and creates a new virtual system in which the guest operating systems can run. No modifications are needed in the guest OS or application (the guest OS or application is not aware of the virtualized environment and runs normally). Para virtualization requires user modification of the guest operating systems that run on the virtual machines (these guest operating systems are aware that they are running on a virtual machine) and provide near-native performance. You can deploy both Para virtualization and full virtualization across your virtualization infrastructure.

For create a Virtual machine -

STEP 1 –
      At 1st we should install required RPMs.

#yum   groupinstall   Virtualization

#yum   install   xen

#yum   install   nfs-utils-1.1.3.-1 .i386. rpm

#yum   install   portmap-4.0-57. i386 .rpm

#yum   install   nfslock-1.1.3 -2 .i386 .rpm

STEP 2 –
         Now create a partition or a directory in (/) partition.

#mkdir   virt

STEP 3 –
        Now share the directory through NFS where your linux cd is copied.

#vi   /etc/exports

/var/ftp/pub/  *  (rw,sync)

Note –

      Pub is a directory where my CD is copied.

STEP 4 –
              Now run the following commands to make sure that the file you edit and going to share is correct or not…
#exportfs –a

#exportfs –r

#exportfs –u

#exportfs –v
             It will show what is share…
Note –
  • a for allow the shared document on the network
  • r for refresh the new shared directory
  • u for show the share directory
 
STEP 5 –
        Now restart the services

#Service   network   restart

#Service   portmap   restart

#Service   nfs   restart

#Service   nfslock   restart

#Service   iptables   stop

STEP 6 –
       Now restart the computer. You will find 3 Operating systems boot loader.



1-    Redhat Enterprise Linux – 5 (xen)

2-    Redhat Enterprise Linux – 5

3-    Other

Choose 1st loader and boot the system (Redhat Enterprise Linux – 5)

STEP 7 –
         Open graphic mode and follow following links.



Click at main menu ------- system ------------ virtual machine.



Now connect the local machine.

And right click on the upper machine. You will find New.

Click that option and get ready for create a virtual machine.

STEP 8 –

1-    Creating a new virtual system. (click next)

2-    Naming your virtual system. (guest machine) (click next)

3-    Choosing the virtualization method.

A – Paravirtualization –
                         Paravirtualization is lightweight method of virtualizing machine. Red Hat Virtualization's paravirtualization mode allows you to utilize high performance virtualization on architectures that are potentially difficult to virtualize such as x86 based systems. To deploy Para virtualization across your operating system(s), you need access to the Para virtual guest kernels that are available from a respective Red Hat distros (for example, RHEL 4.0, RHEL 5.0, etc.). Whilst your operating system kernels must support Red Hat Virtualization, it is not necessary to modify user applications or libraries.

B – Fully Virtualization –

                      In the fully virtualization, allowing for a greater range of operating system (does not require operating system specification) it is slower than Para – virtualization.

4-    Choose 1st option of virtualizing (Para virtualization). And click next.

5-    locating installation media

A – Install media URL – nfs://192.168.0.5/var/ftp/pub

B – Kick start - ______________

C – Kernel Para meters - __________________

    Choose one of them installation media. If you want to install operating system through NFS choose 1st option for installation media.

6-    Assigning disk storage space

    A – Normal disk partition (i.e. - /dev/hda6)

    B – Simple file (i.e. - /virt)

Choose one of them and click next. If you don’t have new partition on your disk choose 2nd option.



      7– Define here the file size. (10000MB)

      8- Now share the host machine’s hardware. Choose 2nd option (shared physical device) and click next.

       9- Allocate the memory and CPU.

Click next and then finish. And start installation.




             

  •   After starting installation choose nfs image for Install new machine.


  • Enable IPv4 and manually configure the IP for new machine.
                                  

  • Now named of NFS server name and directory which has your shared.
  • Click OK and next and get ready for install new virtual machine.


No comments:

Post a Comment