Thursday, April 11, 2013

Network card issue in OpenVz kernel


Network card issue in OpenVz kernel 



1. Install  OenvenVz kernel devel pakage
     
     Code: [Select]

        yum install vzkernel-devel

2.First download AR81Family Linux Driver  and install

    Code: [Select]

         cd /usr/local/src
         wget http://app.jamshi.com/AR81Family-linux-v1.0.1.14%20%281%29.tar.gz
         tar -zxvf  AR81Family-linux-v1.0.1.14%20%281%29.tar.gz
         cd src/

     Code: [Select]

         make install
         modprobe atl1e

3.Configure N/w

     Code: [Select]

          vi /etc/sysconfig/network-scripts/ifcfg-eth0
                    and set parameters

     Quote
DEVICE=eth0
IPADDR=
NETMASK=
GATEWAY=

Save and exit.

System-config-network

Change the dns

192.168.1.1 (name server )
Save and exit

          Code: [Select]

         Ifup eth0

          Code: [Select]

          service network restart

OpenVZ Server Setup

OpenVZ Server Setup:


Stage 1 :  Server Setup
------------------------------

1 . Add the openVZ repository to  yum.
   
Code: [Select]
 a. cd /etc/yum.repos.d
 b. http://download.openvz.org/openvz.repo
 c. rpm --import  http://download.openvz.org/RPM-GPG-Key-OpenVZ

2. Search  Available kernels

 a. Code: [Select]
   yum  search vzkernel

3 Install  kernel   
 
 a. Code: [Select]
   yum  install  vzkernel 
     
 * it will  install  necessary packages for openvz virtualization inludes  vzctl ,vzquota etc*

 b.Code: [Select]

   rmp -qa | grep  vzk*
    ---> verification command

4.Configure boot loader
   
     a . /etc/grub.conf
     b . edit   title  of   vzkernel  as OpenvZ   ( Just for  clarity  )

5. Set Kernel  parameters and disable  SElinux
   
     a. Code: [Select]
     vim  /etc/sysctl.conf
          and  set below parameter 
       

             
Quote
net.ipv4.ip_forward = 1
              net.ipv6.conf.default.forwarding = 1
              net.ipv6.conf.all.forwarding = 1
              net.ipv4.conf.default.proxy_arp = 0
             
Quote
# Enables source route verification
               net.ipv4.conf.all.rp_filter = 1
               # Enables the magic-sysrq key
                kernel.sysrq = 1
               # We do not want all our interfaces to send redirects
                 net.ipv4.conf.default.send_redirects = 1
                 net.ipv4.conf.all.send_redirects = 0
   
          b. Code: [Select]
         vi  /etc/sysconfig/selinux 
  and set 

              Code: [Select]
         SELINUX=disabled

6. Now rebooting to  OpenVz kernel


7.Check whether  Eth0 detected or not  ,if no refer below link  for  fix .

          http://linuxshadow.blogspot.in/2013/04/network-card-issue-in-openvz-kernel.html
   
8. Start OpenVz
     
    Code: [Select]
    /sbin/service vz start

Stage 2 : Templates
--------------------------


1. Download OS templates to  /vz/template/cache/
     Check http://wiki.openvz.org/Download/template/precreated

Stage 3 :  Setup VMs
---------------------------

 
 1. Create virtual  machines   ( CID --> Container ID )
         
 Code: [Select]
      vzctl create  CID  --ostemplate   template  --config-basic     
          vzctl set  CID  --onboot yes --save

---> To  start Vms on boot

 2. Configure VM
     
       a. add ip
           
        Code: [Select]
       vzctl set  CID --ipadd ip --save
       
        b. No of sockets
             
        Code: [Select]
       vzctl set CID  --numothersock  150 --save
       
        c. Set name server for  N/w access
               
        Code: [Select]
       vzctl set CID  --nameserver  IP --save
                                                   ( our case  192.168.1.1 )
       
         d. Start  VM
               
        Code: [Select]
       vzctl start  CID 


Linux virtualization:



                           The  Linux virtualization refers to running one or more virtual machines on a physical computer that's operated by an "opensource Linux Operating System". It  can be used for isolating specific apps, programming code or even an operating system itself, as well as for security and performance testing purposes.
                            Today's more powerful computers and hardware have made virtualization more practical and feasible for both desktop and server environments, helping to save power by consolidating several workspaces on one system as well as maximizing the workload that the compute can handle. We can make linux virtualization in  the "open source linux system"  by using any of Open source Linux Virtualization Softwares.  Popular Linux virtualization solutions include Xen, KVM, QEMU, VirtualBox and VMware.

Why we need to go for virtualization?

  • Consolidation - It means combining multiple software workloads on one computer system. we can run various virtual machines in order to save money and power (electricity).
  • Testing - We can test various configurations, we can check various operating systems.
  • Security and Isolation - If mail server or any other app gets cracked, only that VM will be under control of the attacker. Also, isolation means in virtualization the operating systems or the containers are logically seperated so misbehaving apps (e.g. memory leaks) cannot bring down whole server.

Open Source Linux Virtualization Softwares:


  1. OpenVZ is an operating system-level virtualization technology based on the Linux kernel and operating system.
  2. Xen is a virtual machine monitor for 32 / 64 bit Intel / AMD (IA 64) and PowerPC 970 architectures. It allows several guest operating systems to be executed on the same computer hardware concurrently. XEN is included with most popular Linux distributions such as Debian, Ubuntu, CentOS, RHEL, Fedora and many others.
  3. Kernel-based Virtual Machine (KVM) is a Linux kernel virtualization infrastructure. KVM currently supports native virtualization using Intel VT or AMD-V. A wide variety of guest operating systems work with KVM, including many flavours of Linux, BSD, Solaris, and Windows etc. KVM is included with Debian, OpenSuse and other Linux distributions.
  4. Linux-VServer is a virtual private server implementation done by adding operating system-level virtualization capabilities to the Linux kernel.
  5. VirtualBox is an x86 virtualization software package, developed by Sun Microsystems as part of its Sun xVM virtualization platform. Supported host operating systems include Linux, Mac OS X, OS/2 Warp, Windows XP or Vista, and Solaris, while supported guest operating systems include FreeBSD, Linux, OpenBSD, OS/2 Warp, Windows and Solaris.
  6. Bochs is a portable x86 and AMD64 PC emulator and debugger. Many guest operating systems can be run using the emulator including DOS, several versions of Microsoft Windows, BSDs, Linux, AmigaOS, Rhapsody and MorphOS. Bochs can run on many host operating systems, like Windows, Windows Mobile, Linux and Mac OS X.
  7. User Mode Linux (UML) was the first virtualization technology for Linux. User-mode Linux is generally considered to have lower performance than some competing technologies, such as Xen and OpenVZ. Future work in adding support for x86 virtualization to UML may reduce this disadvantage.

Proprietary Linux Virtualization Softwares:

  1. VMware ESX Server and VMWare Server - VMware Server (also known as GSX Server) is an entry-level server virtualization software. VMware ESX Server is an enterprise-level virtualization product providing data center virtualization. It can run various guest operating systems such as FreeBSD, Linux, Solaris, Windows and others.
  2. Commercial implementations of XEN available with various features and support.
    • Citrix XenServer : XenServer is based on the open source Xen hypervisor, an exceptionally lean technology that delivers low overhead and near-native performance.
    • Oracle VM : Oracle VM is based on the open-source Xen hypervisor technology, supports both Windows and Linux guests and includes an integrated Web browser based management console. Oracle VM features fully tested and certified Oracle Applications stack in an enterprise virtualization environment.
    • Sun xVM : The xVM Server uses a bare-metal hypervisor based on the open source Xen under a Solaris environment on x86-64 systems. On SPARC systems, xVM is based on Sun's Logical Domains and Solaris. Sun plans to support Microsoft Windows (on x86-64 systems only), Linux, and Solaris as guest operating systems.
  3. Parallels Virtuozzo Containers - It is an operating system-level virtualization product designed for large-scale homegenous server environments and data centers. Parallels Virtuozzo Containers is compatible with x86, x86-64 and IA-64 platforms. You can run various Linux distributions inside Parallels Virtuozzo Containers.

My First Blog...





Ping to linux, Live in Possibilites......  


http://linuxshadow.blogspot.in/