Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: How to install oVirt Engine on CentOS  (Read 6103 times)

0 Members and 1 Guest are viewing this topic.

vinayakk

  • Guest
How to install oVirt Engine on CentOS
« on: February 03, 2014, 01:06:34 pm »
oVirt is a free platform virtualization management web application community project started by Red Hat. oVirt is built on libvirt which could allow it to manage virtual machines hosted on any supported backend, including KVM, Xen and VirtualBox. However, oVirt is currently focused on KVM alone. oVirt is an open source software with backing from Red Hat and it is the base for Red Hat Enterprise Virtualization.

Configure oVirt control server

Install oVirt that is the management tool for virtualization environment.

This example shows to configure on the environment below.

(1) ovirt.control.server [10.0.0.50]   ⇒   oVirt Control Server ( over 4G memories recommended )
(2) node01.server [10.0.0.40]   ⇒   oVirt Node ( KVM Host configured )

Setup DNS lookup first that oVirt Control Server or oVirt Node can resolve normally.

To install & configure oVirt Control Server.


Install oVirt Engine

oVirt Engine is the control center of the oVirt environment. It allows you to define hosts, configure data centers, add storage, define networks, create virtual machines, manage user permissions and use templates from one central location.

[root@ovirt ~]# wget http://dev.centos.org/centos/6/ovirt/ovirt.repo -P /etc/yum.repos.d

[root@ovirt ~]# yum -y install ovirt-engine
[root@ovirt ~]# engine-setup

Welcome to oVirt Engine setup utility
In order to proceed the installer must stop the ovirt-engine service
Would you like to stop the ovirt-engine service? (yes|no):yes  # Yes

oVirt Engine uses httpd to proxy requests to the application server.
It looks like the httpd installed locally is being actively used.
The installer can override current configuration .
Alternatively you can use JBoss directly (on ports higher than 1024)
Do you wish to override current httpd configuration and restart the service? ['yes'| 'no'] [yes] : # Enter (Yes)

HTTP Port [80] : # Enter (input a value if you change the port)

HTTPS Port [443] : # Enter (input a value if you change the port)

Host fully qualified domain name. Note: this name should be fully resolvable [ovirt.server.world] : # confirm your server's FQDN and Enter

Enter a password for an internal oVirt Engine administrator user (admin@internal) :  # set any password for oVirt admin

Confirm password : # confirm

Organization Name for the Certificate [server.world] :  # Enter (change if you want)

The default storage type you will be using ['NFS'| 'FC'| 'ISCSI'| 'POSIXFS'] [NFS] :  # Enter (change if you want)

Enter DB type for installation ['remote'| 'local'] [local] :  # Enter (change if you want)

Enter a password for a local oVirt Engine DB admin user (engine) :  # set any password for local database admin

Confirm password : # confirm

Configure NFS share on this server to be used as an ISO Domain? ['yes'| 'no'] [yes] :  # Enter (if you want, input "no")

Local ISO domain path [/var/lib/exports/iso] :  # confirm ISO domain's PATH (change if you want)

Firewall ports need to be opened.
The installer can configure iptables automatically overriding the current configuration. The old configuration will be backed up.
Alternately you can configure the firewall later using an example iptables file found under /etc/ovirt-engine/iptables.example
Configure iptables ? ['yes'| 'no']:no  # if you set iptables, answer "Yes"

oVirt Engine will be installed using the following configuration:
=================================================================

override-httpd-config:         yes
http-port:                     80
https-port:                    443
host-fqdn:                     ovirt.control.server
auth-pass:                     ********
org-name:                      server.world
default-dc-type:               NFS
db-remote-install:             local
db-local-pass:                 ********
nfs-mp:                        /var/lib/exports/iso
config-nfs:                    yes
override-iptables:             no

Proceed with the configuration listed above? (yes|no):yes  # Yes


Installing:
Configuring oVirt-engine...                                             [ DONE ]
Configuring JVM...                                                           [ DONE ]
Creating CA...                                                                 [ DONE ]
Updating ovirt-engine service...                                     [ DONE ]
Setting Database Configuration...                                  [ DONE ]
Setting Database Security...                                           [ DONE ]
Creating Database...                                                      [ DONE ]
Updating the Default Data Center Storage Type...         [ DONE ]
Editing oVirt Engine Configuration...                               [ DONE ]
Editing Postgresql Configuration...                                 [ DONE ]
Configuring the Default ISO Domain...Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
NFSD: starting 90-second grace period                          [ DONE ]
Configuring Firewall (iptables)...                                     [ DONE ]
Starting ovirt-engine Service...                                        [ DONE ]
Configuring HTTPD...                                                        [ DONE ]

 **** Installation completed successfully ******

# change the setting
[root@ovirt ~]# sed -i 's/`;/ 2>\/dev\/null`;/' /usr/share/ovirt-engine/scripts/ovirtlogrot.sh
[root@ovirt ~]# vi /etc/sysconfig/nfs

# add at the last line
NFS4_SUPPORT="no"

[root@ovirt ~]# mkdir /var/lib/exports/data
[root@ovirt ~]# chown vdsm:kvm /var/lib/exports/data
[root@ovirt ~]# vi /etc/exports

# add entry for data storage
/var/lib/exports/iso    0.0.0.0/0.0.0.0(rw)     #rhev installer
/var/lib/exports/data   0.0.0.0/0.0.0.0(rw)     #rhev data

[root@ovirt ~]# /etc/rc.d/init.d/nfs restart
Shutting down NFS daemon: [ OK ]
Shutting down NFS mountd: nfsd: last server has exited, flushing export cache
[ OK ]
Shutting down NFS services: [ OK ]
Starting NFS services: [ OK ]
Starting NFS mountd: [ OK ]
Starting NFS daemon: NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
NFSD: starting 90-second grace period
[ OK ]


Configure oVirt Node

[root@node01 ~]# wget http://dev.centos.org/centos/6/ovirt/ovirt.repo -P /etc/yum.repos.d
[root@node01 ~]# yum -y install vdsm

[root@node01 ~]#vi /etc/sysconfig/network-scripts/ifcfg-br0

# change the name of bridge interface
DEVICE=ovirtmgmt

[root@node01 ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0

# change
BRIDGE=ovirtmgmt

# change the setting
[root@node01 ~]# sed -i 's/ su / #su /' /etc/logrotate.d/vdsm
[root@node01 ~]# reboot


 :)
« Last Edit: February 03, 2014, 01:08:23 pm by Vinayak Krishna »