29
OVM Step By Step Guide By./Ahmad Hassaan http://Solarisway.wordpress.com Page 1 of 29 Virtualization Technologies : Oracle VM components:

OVM Step By Step

Embed Size (px)

Citation preview

OVM Step By Step Guide By./Ahmad Hassaan

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

Virtualization Technologies :

Oracle VM components:

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)

OVM Step By Step Guide By./Ahmad Hassaan

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

Oracle VM server Requiremenst:

Oracle VM Manager Requirements:

OVM Step By Step Guide By./Ahmad Hassaan

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

Oracle VM Resources:

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

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

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.

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.

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 we

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

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

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.

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 inside

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

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”

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”

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.

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.

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 each

server)

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

OVM Step By Step Guide By./Ahmad Hassaan

http://Solarisway.wordpress.com Page 18 of 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 pool

Virtual 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

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)

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

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]

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.

OVM Step By Step Guide By./Ahmad Hassaan

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

Importin ISO files into repository

It is very important step and mandatory,before creating vm you must have the iso image of OS that

will be used to install OS on your vm, i.e (linux,windows,solaris….etc),unlike vmware, OVM doesn’t

have the option to browse or redirect cd/dvd device.

The only way is to import iso files is by ftp,so on your laptop/desktop install any free ftp server

(https://filezilla-project.org/download.php?type=server )

and create a folder and put OS iso files in that folder as following

Click here to

open Users

configuration

window

sers configuration

Click here to add new

users,make a new user

named ovm

Enter the password

for this

account,”123456”

Click on “shared

folder” to add

folder that will

contain iso files

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

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

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”

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

OVM Step By Step Guide By./Ahmad Hassaan

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

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.