Oracle OVM Step by Step

download Oracle OVM Step by Step

of 13

Transcript of Oracle OVM Step by Step

  • 8/9/2019 Oracle OVM Step by Step

    1/29

    OVM Step By Step Guide By./Ahmad Hassaan

    http://Solarisway.wordpress.com  Page 1 of 29 

    Virtualization Technologies :

    Oracle VM components:

  • 8/9/2019 Oracle OVM Step by Step

    2/29

    OVM Step By Step Guide By./Ahmad Hassaan

    http://Solarisway.wordpress.com  Page 2 of 29 

    Oracle VM Architecture :

    External Storage Types: iscsi , NFS, and FC.

    Dom0: hypervisor domain

    Domu: user domain (container for virtual machine)

  • 8/9/2019 Oracle OVM Step by Step

    3/29

    OVM Step By Step Guide By./Ahmad Hassaan

    http://Solarisway.wordpress.com  Page 3 of 29 

    Oracle VM server Requiremenst:

    Oracle VM Manager Requirements:

  • 8/9/2019 Oracle OVM Step by Step

    4/29

    OVM Step By Step Guide By./Ahmad Hassaan

    http://Solarisway.wordpress.com  Page 4 of 29 

    Oracle VM Resources:

  • 8/9/2019 Oracle OVM Step by Step

    5/29

    OVM Step By Step Guide By./Ahmad Hassaan

    http://Solarisway.wordpress.com  Page 5 of 29 

    Oracle VM Manager Overview:

    Oracle VM3 has two new features:

    1- 

    DRS (Distributed Resource Scheduler)

    Shift vms workload among servers with objective that server resources are distributed

    2- 

    DPM ( Distributed Power Management ): minimum servers will be powered on to run vms

  • 8/9/2019 Oracle OVM Step by Step

    6/29

    OVM Step By Step Guide By./Ahmad Hassaan

    http://Solarisway.wordpress.com  Page 6 of 29 

    Steps for Building Oracle VM installation:

    First: OVM Servers :

    1- 

    Download OVM 3.2.7 server software image (hypervisor), its size is 250 MB,burn

    to a blank cd.2-

     

    Got to your server, put the OVM server CD and boot from it, follow installation

    steps shown on the screen.

    3-  Repeat this installation for all servers you have.

    Second: OVM Manager

    1- 

    Download OVM Manager software 3.2.6 (software to manage the whole environment

    ,its size= 2.5 GB.

    2- 

    Install oracle linux or redhat linux on any desktop or machine.3-

     

    Burn the image or copy it to the linux machine.

    4- 

    Mount the dvd rom,or image you just copied, and go to that directory

    5- 

    Run ( /createOracle.sh) ,this script will prepare linux for OVM installation

    6- 

    Run these commands :

    yum install unzip

    service iptables stop

    chkconfig iptables off

    7- 

    Now,your system is ready for OVM manager installation,start it by typing

    (./runInstaller.sh)

    8- 

    The final task needed to complete the installation is to install a VNC client. This will allow

    you to use Oracle VM Manager to launch console sessions on running VM guests  

    # rpm -ivh http://oss.oracle.com/oraclevm/manager/RPMS/tightvnc-java-1.3.9-3.noarch.rpm

    Retrieving http://oss.oracle.com/oraclevm/manager/RPMS/tightvnc-java-1.3.9-3.noarch.rpm

    Preparing... ########################################### [100%]

    1:tightvnc-java ########################################### [100%]

    Now,use browser and login to OVM webconsole by typing:

    (https://IP_of_ovm_manager:7002/ovm/console) ,type username as “admin” and password

    as you already set during ovm manager installation.

    Next steps.is for how to configure OVM manager

  • 8/9/2019 Oracle OVM Step by Step

    7/29

    OVM Step By Step Guide By./Ahmad Hassaan

    http://Solarisway.wordpress.com  Page 7 of 29 

    Step 1 (Server Discovery)Login to OVM manager using web browser (https://ovm_IP:7002/ovm/console)

    At “servers and vms “ tab, click on small icon as in the following picture

    default port is (8899) for ovm agent which is running at ovm server.

    Type ips of newly installed ovm servers, and password for agent.

  • 8/9/2019 Oracle OVM Step by Step

    8/29

    OVM Step By Step Guide By./Ahmad Hassaan

    http://Solarisway.wordpress.com  Page 8 of 29 

    -  Hint: during OVM server installation,it asked for two passwords, one for root,while the

    other for ovm agent [this one will be used by ovm manager to connect to ovm server

    and discover it]

    Server Discovery, so servers will come under “un-assigned servers” 

    Click OK to finish servers discovery.

  • 8/9/2019 Oracle OVM Step by Step

    9/29

    OVM Step By Step Guide By./Ahmad Hassaan

    http://Solarisway.wordpress.com  Page 9 of 29 

    Step 2 (Networks)

    Network Elements:

    Port: is the physical nic on OVM server itself,like eth0,eth1…etc 

    Bond: is logical nic created over one or more physical nic on single server,for example wecan create bond0 over one or two physical nics,like bond0 (eth0,eth1).

    VLAN:you create one or more vlan(virtual lan)over physical nics , it is like having virtual

    switch ,this switch is based on ports (eth0 on server A,eth0 on Server B , eth0 on Server

    C),and of course you can have multiple vlans on the same physical port,each vlan must have

    its own identifier (which is VLAN ID).

    Bridges: all vms nic are bridged over ovm server network.

  • 8/9/2019 Oracle OVM Step by Step

    10/29

    OVM Step By Step Guide By./Ahmad Hassaan

    http://Solarisway.wordpress.com  Page 10 of 29 

    Optional step :

    by default there is bond0 nic created for each ovm server during installation of ovm server, but if you

    want to change/add another bond you should do these steps:

    1- 

    Click “Servers and VMs” tab 

    2- 

    Select desired server to create network bond for it.

    3- 

    From “Perspective” drop-down list, chose “Bond Ports” 

    4- 

    Click on green “+” to add a new bond 

  • 8/9/2019 Oracle OVM Step by Step

    11/29

    OVM Step By Step Guide By./Ahmad Hassaan

    http://Solarisway.wordpress.com  Page 11 of 29 

    Bond network creation window

    Hint: you can’t add port that has ip address assigned to it.  

    Addressing:

    1-  None: don’t give ip now, just create bond

    2-  Use DHCP: to get ip from network

    3- 

    IP Address: put the ip address to be used

    Bonding Types:

    1- 

    Active Backup: one port will be master, others are slave

    2-  Dynamic Link Aggregation: two or more ports will act as one big port

    3- 

    Adaptive Load Balancing: all ports are active and the bond will make load balance

    between them.

  • 8/9/2019 Oracle OVM Step by Step

    12/29

    OVM Step By Step Guide By./Ahmad Hassaan

    http://Solarisway.wordpress.com  Page 12 of 29 

    (Step 2 )Creating Network:

    OVM manager needs to create network layer and attach virtual machines to it,to finish this task you

    must do Three Steps:

    Step 1 : create Network Layer,by using “Networking” Tab in OVM manager console. 

    Step 2:create virtual interfaces vnics [till now these vnics are free and not assigned to any network].

    Step 3: create your VM and give it one or more vnics, then assign this vnic to a network

    OVM has four types of network as appeared in this window

    Type 1: network with bonds/ports only

    OVM Manager will create network using bonds and/or physical ports directly from OVM

    servers.

    Type 2: network with VLANs only

    OVM manager will create network using vlans switch (which is already created insideVLAN Groups)

    Type 3: Hybrid(mix) network with bonds/ports and VLANs

    OVM manager will make one big virtual switch composed of vlans and bonds/ports

    Type 4: local network on a single server .

  • 8/9/2019 Oracle OVM Step by Step

    13/29

    OVM Step By Step Guide By./Ahmad Hassaan

    http://Solarisway.wordpress.com  Page 13 of 29 

    Now, I chose to create network using bonds/ports only option:

    1- 

    From “networking tab”,click on “+” 

    2- 

    Select first option “Create a network with bonds/ports only” 

    3-  give a name, and select all network channels ,unless you have a plan for different network

    channels.

    4-  Add all ovm servers to this network and click “Next” 

  • 8/9/2019 Oracle OVM Step by Step

    14/29

    OVM Step By Step Guide By./Ahmad Hassaan

    http://Solarisway.wordpress.com  Page 14 of 29 

    5-  Add ports that ends with (bond0) and click “Next” 

    6-  Select vlan group and vlan segment if applicable (optional ,unless you will make vlans)

    7- 

    In last window,leave all values as it is,it should be as following ,then click “finish”  

  • 8/9/2019 Oracle OVM Step by Step

    15/29

    OVM Step By Step Guide By./Ahmad Hassaan

    http://Solarisway.wordpress.com  Page 15 of 29 

    So,now you have a ready network for your virtual machines environment, next step is to

    create vnics (virtual network interfaces),so when you create a new virtual machine you can

    give it a network interface.

  • 8/9/2019 Oracle OVM Step by Step

    16/29

    OVM Step By Step Guide By./Ahmad Hassaan

    http://Solarisway.wordpress.com  Page 16 of 29 

    (Mandatory step )Creating VNics(virtual network interface) :

    From “Networking” Tab in OVM Manager 

    You should have enough vnics ,as every vm will need at least one vnic,so initially you can create 20 vnics.

    Put “20” in “create” field,then click on “Auto Fill” ,and click “Create” to finish vnics creation 

    Hint: later, during vm creation, we will attach vnic to that vm

    This window also will tell you which vnic is used by which vm on which network.

  • 8/9/2019 Oracle OVM Step by Step

    17/29

    OVM Step By Step Guide By./Ahmad Hassaan

    http://Solarisway.wordpress.com  Page 17 of 29 

    Optional (Creating VLAN):

    1- 

    Form “Networking” tab,click on VLAN Gropus,and add a new VLAN

    2- 

    Give it a name .

    3-  add all servers or required servers to vlans

    4- 

    Select network ports that VLAN will reside on it (normally chose at least one port from eachserver)

    5- 

    Determine how many vlans are reuired and click on “Add ,and click on next 

    6- 

    Total number of vlan interfaces = no_of_vlans * no_of_servers, in my environment ,am having

    four servers,and two vlans,so total of eight vlan ports ,as you can see in next image

  • 8/9/2019 Oracle OVM Step by Step

    18/29

    OVM Step By Step Guide By./Ahmad Hassaan

    http://Solarisway.wordpress.com  Page 18 of 29 

  • 8/9/2019 Oracle OVM Step by Step

    19/29

    OVM Step By Step Guide By./Ahmad Hassaan

    http://Solarisway.wordpress.com  Page 19 of 29 

    Step 3: Create Server Pool

    1-  At “Servers and VMs” tab,click on add new pool as in image 

    2- 

    Fill data in this window:

    Server Pool Name: name of the poolVirtual IP: should be in the same ovm server subnet.

    Uncheck clustered Server pool ( unless you have shared filesystem between servers that

    will be added to this pool).

    Click “Next”,and add servers to this pool 

  • 8/9/2019 Oracle OVM Step by Step

    20/29

    OVM Step By Step Guide By./Ahmad Hassaan

    http://Solarisway.wordpress.com  Page 20 of 29 

    Storage:

    Storage Tab:

    Three locations to add/discover new disks:

    1-  File Servers (you have to add all details,IP,user/password)

    2-  SAN Servers-->Unamanged FibreChannel ( you only scan for new disks,because luns will be

    assigned from SAN storage )

    3-  SAN Servers-->Unmanaged iSCSI (you have to config and scan for newly discovered iSCSI disks)

  • 8/9/2019 Oracle OVM Step by Step

    21/29

    OVM Step By Step Guide By./Ahmad Hassaan

    http://Solarisway.wordpress.com  Page 21 of 29 

    Repository Guide/Design:

    NFS Repository can be shared across all Server Pools, while can’t do for SAN volumes.

    Pool FS : must be 12GB or greater and is needed only if u have a pool cluster plan,otherwise no need

    for this filesystem

    Creating Repository Steps:

    In my environment,I have three LUN/Volumes mapped from Storage Array to all four OVM servers.

    1-  From repository tab, click on green “+” icon, chose whether NFS or Physical Disk

  • 8/9/2019 Oracle OVM Step by Step

    22/29

    OVM Step By Step Guide By./Ahmad Hassaan

    http://Solarisway.wordpress.com  Page 22 of 29 

    2- 

    after we click on “Magnifying Glass” we got these options to choose one of them, select

    carefully one disk, then click OK, you will be sent back to main screen ,so click on next [again

    be carefull ,as once u click on next it will start creating repository,so all data on this disk will

    be erased]

  • 8/9/2019 Oracle OVM Step by Step

    23/29

    OVM Step By Step Guide By./Ahmad Hassaan

    http://Solarisway.wordpress.com  Page 23 of 29 

    3-  Select which servers to access this repository by adding this server to right pane in the

    following window, then click on OK to finish creating repository:

    Now,you have finished all infra-structure layer :server pool,Netwokr,storage

    Next is to create virtual machines.

  • 8/9/2019 Oracle OVM Step by Step

    24/29

  • 8/9/2019 Oracle OVM Step by Step

    25/29

    OVM Step By Step Guide By./Ahmad Hassaan

    http://Solarisway.wordpress.com  Page 25 of 29 

    1-  Click “Repository Tab” 

    2- 

    click I”ISOs”

    3- 

    click on small icon as appeared in next image .

    a new window will appear and asking for ftp details

    Format of ftp command is : ftp://user_name:password@ServerIP/file_path

    ftp://user_name:[email protected]/linux5.9.iso

  • 8/9/2019 Oracle OVM Step by Step

    26/29

    OVM Step By Step Guide By./Ahmad Hassaan

    http://Solarisway.wordpress.com  Page 26 of 29 

    Create your First Virtual Machine:

    1- 

    From “Servers and Virtual Machines” Tab,click on new vm icon 

    2-  choose “Create a new VM”,click next 

    3-  Enter your vm details:

    OS type,VM name,Memory,cpus

  • 8/9/2019 Oracle OVM Step by Step

    27/29

    OVM Step By Step Guide By./Ahmad Hassaan

    http://Solarisway.wordpress.com  Page 27 of 29 

    4- 

    Choose one vnic and network you created in previous step ,click “Add VNIC”,and then click

    “Next” 

  • 8/9/2019 Oracle OVM Step by Step

    28/29

    OVM Step By Step Guide By./Ahmad Hassaan

    http://Solarisway.wordpress.com  Page 28 of 29 

    5-  In slot 0,select vdisk,then click on “+” to add this disk  

    6-  Enter disk size,this disk will be the main disk for OS installation on VM,then click on OK

    7- 

    On slot “1”,select CD/DVD ,and then click search icon that have “magnifying glass” 

    8-  Chose which iso image to attach to this vm,and click OK

  • 8/9/2019 Oracle OVM Step by Step

    29/29

    OVM Step By Step Guide By./Ahmad Hassaan

    9-  Move Disk and CDROM to right pane,and be sure CDROM is on top of Disk,so vm will boot

    from iso image you just attached,and now click finish.

    Now,back to “Servers and VirtualMachines” Tab,select your pool ,and on “perspective”

    select “Virtual machines”,a list of virtual machines that have been created will

    appear,right-click on newly created and select “Start”,again right -click and select Launch

    console.