How to Install and Configure oVirt 4.0 on CentOS 7 / RHEL 7

oVirt is a free and open source virtualization software used in Linux like operating systems such as Fedora,  CentOS and RHEL. In other words we can say oVirt is the alternate of VMware vSphere in Linux. Ovirt community is founded and supported by Red Hat and it is considered as upstream project for Red Hat Enterprise Virtualization (RHEV).

oVirt consists of two main components :

  • oVirt Engine
  • oVirt Node

oVirt Engine is a graphical user interface or we can say it is a Web administrator portal from where we can manage virtual machines, compute, network and storage resources.

oVirt Node is either a RHEL / CentOS or Fedora Server on which vdsm service is up and running. Ovirt node will act as Hypervisor (KVM) on which all the Virtual machines will be created.

In this article we will install the latest version oVirt 4.0.3 on CentOS 7 / RHEL 7 . We will be using two servers one will act as ovirt engine and other will act as ovirt node.  Below are the details :

oVirt Engine : ovirtengine.example.com (192.168.1.30 )

oVirt Node : ovirtnode.example.com (192.168.1.40)

Update the below  entries in /etc/hosts file in case you don’t have your local dns server.

192.168.1.30  ovirtengine.example.com
192.168.1.40  ovirtnode.example.com

Installation Steps of oVirt Engine on CentOS 7 / RHEL 7

Following are minimal requirements for ovirt-engine :

  •  Minimal OS ( CentOS 7.x / RHEL 7.x )
  •  Dual core server
  •  4 GB RAM
  • 25 GB Disk Space
  • 1-Gbps Lan Card

Perform the following steps one after the another to install ovirt engine.

Step:1 Update the server using yum command

Install latest update on server using beneath yum command.

[root@ovirtengine ~]# yum update -y

Once the updates are installed reboot the sever.

Step:2 Enable oVirt 4.0.3 Repository

ovirt engine packages are not available in CentOS and RHEL yum repositories. Run below command to set and enable ovirt 4.0 repertory

[root@ovirtengine ~]# yum install http://resources.ovirt.org/pub/yum-repo/ovirt-release40.rpm

Step:3 Install oVirt Engine Package using yum command

Execute the following yum command to install ovirt engine.

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

Step:4 Start the ovirt engine installer

Run the command ‘engine-setup’ from the console, it will start the ovirt engine installer and will interactively ask series of question during the installation and will save all the answers to a answer file. Answer file can be reused in order to automate the installation.

[root@ovirtengine ~]# engine-setup --generate-answer=/root/answer.txt
[ INFO ] Stage: Initializing
[ INFO ] Stage: Environment setup
 Configuration files: ['/etc/ovirt-engine-setup.conf.d/10-packaging-jboss.conf', '/etc/ovirt-engine-setup.conf.d/10-packaging.conf']
 Log file: /var/log/ovirt-engine/setup/ovirt-engine-setup-20160918040600-2gbi6m.log
 Version: otopi-1.5.2 (otopi-1.5.2-1.el7.centos)
[ INFO ] Stage: Environment packages setup
[ INFO ] Yum Downloading: base/7/x86_64 (0%)
[ INFO ] Yum Downloading: updates/7/x86_64 (0%)
[ INFO ] Stage: Programs detection
[ INFO ] Stage: Environment setup
[ INFO ] Stage: Environment customization
 
 --== PRODUCT OPTIONS ==--
 
 Configure Engine on this host (Yes, No) [Yes]: Yes
 Configure Image I/O Proxy on this host? (Yes, No) [Yes]: Yes
 Configure WebSocket Proxy on this host (Yes, No) [Yes]: Yes
 Please note: Data Warehouse is required for the engine. If you choose to not configure it on this host, you have to configure it on a remote host, and then configure the engine on this host so that it can access the database of the remote Data Warehouse host.
 Configure Data Warehouse on this host (Yes, No) [Yes]: Yes
 Configure VM Console Proxy on this host (Yes, No) [Yes]: Yes
 
 --== PACKAGES ==--
 
[ INFO ] Checking for product updates...
[ INFO ] No product updates found
 
 --== NETWORK CONFIGURATION ==--
 
 Host fully qualified DNS name of this server [ovirtengine.example.com]: ovirtengine.example.com
[WARNING] Failed to resolve ovirtengine.example.com using DNS, it can be resolved only locally
 Setup can automatically configure the firewall on this system.
 Note: automatic configuration of the firewall may overwrite current settings.
 Do you want Setup to configure the firewall? (Yes, No) [Yes]: No

 --== DATABASE CONFIGURATION ==--
 
 Where is the DWH database located? (Local, Remote) [Local]: Local
 Setup can configure the local postgresql server automatically for the DWH to run. This may conflict with existing applications.
 Would you like Setup to automatically configure postgresql and create DWH database, or prefer to perform that manually? (Automatic, Manual) [Automatic]: Automatic
 Where is the Engine database located? (Local, Remote) [Local]: Local
 Setup can configure the local postgresql server automatically for the engine to run. This may conflict with existing applications.
 Would you like Setup to automatically configure postgresql and create Engine database, or prefer to perform that manually? (Automatic, Manual) [Automatic]: Automatic
 
 --== OVIRT ENGINE CONFIGURATION ==--
 
 Engine admin password: 
 Confirm engine admin password: 
[WARNING] Password is weak: it is too simplistic/systematic
 Use weak password? (Yes, No) [No]: Yes
 Application mode (Virt, Gluster, Both) [Both]: Both
 
 --== STORAGE CONFIGURATION ==--
 
 Default SAN wipe after delete (Yes, No) [No]: No
 
 --== PKI CONFIGURATION ==--
 
 Organization name for certificate [example.com]: example.com

 --== APACHE CONFIGURATION ==--
 
 Setup can configure the default page of the web server to present the application home page. This may conflict with existing applications.
 Do you wish to set the application as the default page of the web server? (Yes, No) [Yes]: Yes
 Setup can configure apache to use SSL using a certificate issued from the internal CA.
 Do you wish Setup to configure that, or prefer to perform that manually? (Automatic, Manual) [Automatic]: Automatic
 
 --== SYSTEM CONFIGURATION ==--
 
 Configure an NFS share on this server to be used as an ISO Domain? (Yes, No) [No]: No
 
 --== MISC CONFIGURATION ==--
 
 Please choose Data Warehouse sampling scale:
 (1) Basic
 (2) Full
 (1, 2)[1]: 1
 
 --== END OF CONFIGURATION ==--
 
[ INFO ] Stage: Setup validation
[WARNING] Warning: Not enough memory is available on the host. Minimum requirement is 4096MB, and 16384MB is recommended.
 Do you want Setup to continue, with amount of memory less than recommended? (Yes, No) [No]: Yes
 
 --== CONFIGURATION PREVIEW ==--
 
 Application mode : both
 Default SAN wipe after delete : False
 Update Firewall : False
 Host FQDN : ovirtengine.example.com
 Engine database secured connection : False
 Engine database host : localhost
 Engine database user name : engine
 Engine database name : engine
 Engine database port : 5432
 Engine database host name validation : False
 DWH database secured connection : False
 DWH database host : localhost
 DWH database user name : ovirt_engine_history
 DWH database name : ovirt_engine_history
 DWH database port : 5432
 DWH database host name validation : False
 Engine installation : True
 PKI organization : example.com
 Configure local Engine database : True
 Set application as default page : True
 Configure Apache SSL : True
 DWH installation : True
 Configure local DWH database : True
 Engine Host FQDN : ovirtengine.example.com
 Configure Image I/O Proxy : True
 Configure VMConsole Proxy : True
 Configure WebSocket Proxy : True
 
 Please confirm installation settings (OK, Cancel) [OK]: OK

[ INFO ] Stage: Transaction setup
[ INFO ] Stopping engine service
[ INFO ] Stopping ovirt-fence-kdump-listener service
[ INFO ] Stopping dwh service
[ INFO ] Stopping Image I/O Proxy service
[ INFO ] Stopping websocket-proxy service
[ INFO ] Stage: Misc configuration
[ INFO ] Stage: Package installation
[ INFO ] Stage: Misc configuration
[ INFO ] Upgrading CA
[ INFO ] Initializing PostgreSQL
[ INFO ] Creating PostgreSQL 'engine' database
[ INFO ] Configuring PostgreSQL
[ INFO ] Creating PostgreSQL 'ovirt_engine_history' database
[ INFO ] Configuring PostgreSQL
[ INFO ] Creating CA
[ INFO ] Creating/refreshing Engine database schema
[ INFO ] Creating/refreshing DWH database schema
[ INFO ] Configuring Image I/O Proxy
[ INFO ] Setting up ovirt-vmconsole proxy helper PKI artifacts
[ INFO ] Setting up ovirt-vmconsole SSH PKI artifacts
[ INFO ] Configuring WebSocket Proxy
[ INFO ] Creating/refreshing Engine 'internal' domain database schema
[ INFO ] Generating post install configuration file '/etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf'
[ INFO ] Stage: Transaction commit
[ INFO ] Stage: Closing up
[ INFO ] Starting engine service
[ INFO ] Starting dwh service
[ INFO ] Restarting ovirt-vmconsole proxy service
 
 --== SUMMARY ==--
 
[ INFO ] Restarting httpd
 In order to configure firewalld, copy the files from
 /etc/ovirt-engine/firewalld to /etc/firewalld/services
 and execute the following commands:
 firewall-cmd --permanent --add-service ovirt-postgres
 firewall-cmd --permanent --add-service ovirt-https
 firewall-cmd --permanent --add-service ovirt-fence-kdump-listener
 firewall-cmd --permanent --add-service ovirt-imageio-proxy
 firewall-cmd --permanent --add-service ovirt-websocket-proxy
 firewall-cmd --permanent --add-service ovirt-http
 firewall-cmd --permanent --add-service ovirt-vmconsole-proxy
 firewall-cmd --reload
 The following network ports should be opened:
 tcp:2222
 tcp:443
 tcp:5432
 tcp:54323
 tcp:6100
 tcp:80
 udp:7410
 An example of the required configuration for iptables can be found at:
 /etc/ovirt-engine/iptables.example
 Please use the user 'admin@internal' and password specified in order to login
 Web access is enabled at:
 http://ovirtengine.example.com:80/ovirt-engine
 https://ovirtengine.example.com:443/ovirt-engine
 Internal CA E2:96:0B:A0:6C:1E:B5:0D:BB:7B:B5:29:4D:88:92:5A:DA:1E:95:BC
 SSH fingerprint: 1f:7b:59:12:01:8c:b5:d7:21:49:3b:e9:e4:d1:72:da
[WARNING] Warning: Not enough memory is available on the host. Minimum requirement is 4096MB, and 16384MB is recommended.
 
 --== END OF SUMMARY ==--
 
[ INFO ] Stage: Clean up
 Log file is located at /var/log/ovirt-engine/setup/ovirt-engine-setup-20160918040600-2gbi6m.log
[ INFO ] Generating answer file '/var/lib/ovirt-engine/setup/answers/20160918041930-setup.conf'
[ INFO ] Generating answer file '/root/answer.txt'
[ INFO ] Stage: Pre-termination
[ INFO ] Stage: Termination
[ INFO ] Execution of setup completed successfully
[root@ovirtengine ~]#

In Case firewall is enabled on your server , then execute steps mentioned in above output.

Step:5 Access oVirt Engine Web Administrator portal.

Open the web browser and type URL :

https://ovirtengine.example.com

or

https://IP_Address

Replace the domain name or IP address as per your setup.

ovirt-engine-welcome-page

Click on Administrator Portal.

Enter the user name as ‘admin‘ and password that we mentioned during installation and Profile as internal.

ovirt-engine-log-in-screen

ovirt-engine-web-administration-portal-centos7

At this point ovirt engine installation is completed, now install ovirt node.

Installation Steps of oVirt Node (Hypervisor)

oVirt Node can be configure in two different methods , First method is that we can download the hypervisor or ovirt-node iso file from its official web site and install the server from the downloaded iso file.

Second method  is that we can make existing CentOS , RHEL and Fedora server as ovirt node by installing vdsm package on it and then we will add that host or server manually from ovirt engine administrator portal.

Minimum requirements for oVirt Node is :

  • Dual-core System
  • 10 GB Physical RAM
  • 10 GB Disk Space
  • 1-Gbps Lan Card

In this tutorial i am going with first method, I have already downloaded the oVirt 4.0 Node iso file. Burn the downloaded iso file either into DVD or USB drive and Boot the boot the server with DVD/USB follow the Screen instructions.

install-ovirt-node-4

Select the first option ‘Install oVirt Node 4.0.3

select-language-during-ovirt4-node-installation

Select the Language and Click on Continue …

In the Next Step perform the following steps :

  • Configure Networking
  •  Set Hostname
  •  Select disk for OS installation
  • Date and Time as per setup
  • Keyboard Layout

In my Case Hostname is “ovirtnode.example.com” and IP address is 192.168.1.40

installation-summary-ovirt4-node

Click on Begin Installation

Set root password and click on done

set-root-password-ovirt4-node

oVirt 4.0.3 Node installation is in progress.

ovirt4-node-installation-progress

Once the installation is completed reboot your server.

ovirt4-node-installation-completed

Add oVirt Node (ovirtnode.example) in ovirt engine from Web Administrator Portal.

Login to Administrator Portal  , Go to Hosts Tab —> click on New

Specify the ovirt node details.

adding-host-ovirt-engine-web-administration

Once done with the entries, click on OK.

skip-power-management-during-hosts-addition-ovirt-engine

As i am doing this setup in my lab so i am not going to “Configure Power Management“. Click on OK

As we can see below that ovirt engine is installing the software on ovirt node. In Case host does not get activated after installing the software, then select Host and Click on Activate

installing-software-ovirt-node-from-ovirt-engine

As we can see Host is activated now.

host-activated-ovirt-engine

That’s all. Hope you like the installation and Configuration steps of oVirt 4.0.3.In the coming article we will discuss how to create data centers, cluster and Virtual machines.

31 thoughts on “How to Install and Configure oVirt 4.0 on CentOS 7 / RHEL 7”

  1. oVirt is **one** alternative to vSphere 😉 For Xen world, there is Xen Orchestra, which is also Open Source. See ‘https://xen-orchestra.com’

  2. Hello,

    I got this problem when install ovirt4.0.3

    When i access via browser it alert “The client is not authorized to request an authorization. It’s required to access the system using FQDN.”

    Click “continue” choose “Adminstrator Portal” it loop to alert message

    How can i do to resolve?
    Please help

    Thanks

  3. Try to access the oVirt Portal using FQDN(Fully Qualified Domain Name) instead of IP address , In case DNS entry is not configured update your system’s hosts file put below entry so that it can resolve FQDN into your oVirt Engine Server’s IP address.

    FQDN

  4. i install on centos the ovirt and i got error, after i follow the steps when i want access the administrator :
    The client is not authorized to request an authorization. It’s required to access the system using FQDN.
    ‘https://80.1.123.15/ovirt-engine/error.html’
    80.1.123.15 its a example on the link
    i read on here the solution is edit the hosts in /etc/hosts , so i write in ssh console :
    nano /etc/hosts
    and i have this:

    127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
    ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

    How i resolve the problem what to add, maybe someone can help the novices.
    thank you a lot

    1. Hello Sage,

      Set the FQDN on your server with the command “hostnamectl set-hostname fqdn” and update your server’s host file as well, add the entry like below :

      ip_address_of_server FQDN

      Also add the same above entry in your machine from which you are trying access ovirt portal. Hope these steps will resolve the issue.

  5. When i access via browser it alert “The client is not authorized to request an authorization. It’s required to access the system using FQDN.”
    Click here to continue.

    How can i do to resolve?

    1. For those who tried on vmware or virtualbox:

      On Windows host:

      Install xming server from: https://sourceforge.net/projects/xming/
      Install Putty and access the server via ssh (enable x11 before opening session)

      On Server guest:

      yum install xorg-x11-xauth xterm
      vi /etc/ssh/sshd_config/

      X11Forwarding yes

      yum install firefox

      firefox

      Now you should be able to access web console.

    2. Stefano Stagnaro

      You can specify an alternative FQDN simply by editing the SSO_ALTERNATE_ENGINE_FQDNS variable in /etc/ovirt-engine/engine.conf.d/11-setup-sso.conf on the oVirt Engine.

      Then restart the engine daemon:
      # systemctl restart ovirt-engine.service

      1. You can specify an alternative FQDN simply by editing the SSO_ALTERNATE_ENGINE_FQDNS variable in /etc/ovirt-engine/engine.conf.d/11-setup-sso.conf on the oVirt Engine.

        ENGINE_SSO_CLIENT_ID=”ovirt-engine-core”
        ENGINE_SSO_CLIENT_SECRET=”FWkrOehmAMofkF9ZPlnxUKl3Epr4BOJf”
        ENGINE_SSO_AUTH_URL=”https://${ENGINE_FQDN}:443/ovirt-engine/sso”
        ENGINE_SSO_SERVICE_URL=”https://localhost:443/ovirt-engine/sso”
        ENGINE_SSO_SERVICE_SSL_VERIFY_HOST=false
        ENGINE_SSO_SERVICE_SSL_VERIFY_CHAIN=true
        SSO_ALTERNATE_ENGINE_FQDNS=” here need to specify FQDN”
        SSO_ENGINE_URL=”https://${ENGINE_FQDN}:443/ovirt-engine/”

        eescape :wq

        then restat the engine-
        ## systemctl restart ovirt-engine.service

Leave a Comment

Your email address will not be published. Required fields are marked *