Install and configure oVirt 4.4 on CentOS 8

You can download this article in PDF format via the link below to support us.

Download the guide in PDF format

turn off


oVirt is a free-to-use open source virtualization solution sponsored by Red Hat. oVirt is designed to manage your entire enterprise infrastructure. It uses the KVM enterprise-level hypervisor to achieve scalability and high availability. The oVirt integration building block includes other other community projects, including libvirt, Gluster, PatternFly, and Ansible.

In this blog, we will introduce the installation and configuration of oVirt Virtualization platform on CentOS 8 server.

Some key basic functions of oVirt include:

  • Rich web-based user interface for administrators and non-administrators
  • Integrated management of host, storage and network configuration
  • Live migration of virtual machines and disks between host and storage
  • High availability of virtual machines when the host fails

Install oVirt on CentOS 8 with Cockpit

We will perform a self-hosted engine installation of oVirt, which uses Ansible and engine devices (pre-configured engine virtual machine images) to automatically perform the following tasks:

  • Configure the first self-hosted engine node
  • Install Enterprise Linux virtual machine on this node
  • Install and configure oVirt Engine on this virtual machine
  • Configure self-hosted engine storage domain

If you plan to have multiple compute nodes for virtualization needs, you should install CentOS 8 physical server or multiple servers.

If you want to run a dedicated oVirt Engine in the VM, please refer to the article in the link below.

How to install standalone oVirt Engine on CentOS 8

Setup requirements:

The standard setup requirements are:

Step 1: Install CentOS 8 server

Use ssh to log in to your CentOS 8 host system.

$ ssh [email protected]

Confirm that it is a CentOS 8 system.

$ cat /etc/redhat-release
CentOS Linux release 8.2.2004 (Core)

Set the correct hostname:

sudo hostnamectl set-hostname

Set the time zone.

sudo timedatectl set-timezone Africa/Nairobi

Update the system.

sudo yum -y update

Wait for the upgrade to complete, and then restart the server.

sudo systemctl reboot

Add the official oVirt repository:

sudo dnf -y install

Step 2: Prepare storage for oVirt

We recently gave a comprehensive guide on setting up oVirt storage using NFS. Use the following link to introduce competitively how to configure NFS storage for oVirt.

How to add NFS data, ISO and export storage domains to oVirt/RHEV

This article introduces NFS data, ISO and export storage domain settings. The only necessary step for this setup is step 1 with Step 2.

My personal storage settings (NFS with Raid 1)-don’t copy and paste!

In my setup, I have many raw devices and configure them to use RAID 1.

$ lsblk

Install Raid configuration tool.

sudo dnf -y install mdadm

Clear the disk before RAID configuration.

for i in sdc sdd sde sdf sdg sdh; do
  sudo wipefs -a /dev/$i
  sudo mdadm --zero-superblock /dev/$i

Create partitions on the disk and set the RAID flag.

for i in sdc sdd sde sdf sdg sdh; do
  sudo parted --script /dev/$i "mklabel gpt"
  sudo parted --script /dev/$i "mkpart primary 0% 100%"
  sudo parted --script /dev/$i "set 1 raid on"

Create a RAID 1 device:

sudo mdadm --create /dev/md1 --level=raid1 --raid-devices=6 /dev/sdc1 /dev/sdd1 /dev/sde1 /dev/sdf1 /dev/sdg1 /dev/sdh1

Display the status of raid equipment:

$ cat /proc/mdstat

Create a file system on the RAID device:

sudo mkfs.xfs /dev/md1

Create installation point:

sudo mkdir /nfs

Configure mount in /etc/fstab:

echo "/dev/md1 /nfs xfs defaults 0 0" | sudo tee -a /etc/fstab

Confirm that it can be installed correctly:

$ sudo mount -a
$ df -hT

Install the NFS server software package:

sudo yum -y install nfs-utils
sudo systemctl enable --now nfs-server rpcbind

If it does not already exist, create a system group named kvm on the NFS server:

$ getent group kvm || sudo groupadd kvm -g 36

Create user vdsm In the group kvm

getent passwd vdsm || sudo useradd vdsm -u 36 -g 36

I will create an NFS export directory for oVirt.

sudo mkdir -p /nfs/exports/ovirt/{data,iso,export}

Set the ownership of the export directory to 36:36, which gives vdsm:kvm ownership:

sudo chown -R 36:36 /nfs/exports/ovirt/data
sudo chown -R 36:36 /nfs/exports/ovirt/iso
sudo chown -R 36:36 /nfs/exports/ovirt/export

Change the mode of the directory to grant the owner read and write access:

sudo  chmod 0775 /nfs/exports/ovirt/data
sudo  chmod 0775 /nfs/exports/ovirt/iso
sudo  chmod 0775 /nfs/exports/ovirt/export

Configure the NFS export file as follows.

$ sudo vim /etc/exports
/nfs/exports/ovirt/data       *(rw,anonuid=36,anongid=36,all_squash)
/nfs/exports/ovirt/iso        *(rw,anonuid=36,anongid=36,all_squash)
/nfs/exports/ovirt/export     *(rw,anonuid=36,anongid=36,all_squash)

Start and enable the NFS server service.

sudo systemctl restart nfs-server
sudo systemctl enable nfs-server

Update the NFS export table.

$ sudo exportfs -rvv
exporting *:/nfs/exports/ovirt/export
exporting *:/nfs/exports/ovirt/iso
exporting *:/nfs/exports/ovirt/data

If you have a running Firewalld service, please allow nfs service:

sudo firewall-cmd --add-service={nfs,nfs3,rpc-bind} --permanent
sudo firewall-cmd --reload

Step 3: Install Cockpit using Ovirt plugins and other tools

We need to install the Cockpit and cockpit-ovirt-dashboard plugins from the added repository.

sudo dnf -y install cockpit cockpit-ovirt-dashboard  gluster-ansible-roles ovirt-engine-appliance

After installation, start and enable the Cockpit service.

sudo systemctl enable --now cockpit.socket

Enable the cockpit service port in the firewall.

sudo firewall-cmd --add-service=cockpit
sudo firewall-cmd --add-service=cockpit --permanent
sudo firewall-cmd --reload

Step 4: Install oVirt using the Cockpit wizard

Set up prerequisites:

  • FQDN for your engine and deployment host. Both forward and reverse lookup records must be set in DNS.
# Updating /etc/hosts file  # Deployment host          # Ovirt Engine
  • When using FCP or iSCSI block storage domains, a single target LUN is the only supported setting for the self-hosted engine.

Log in to Cockpit as the root user. https://[Host IP or FQDN]: 9090

Please click VirtualizationHosting engine.

Install and configure oVirt 4.4 on CentOS 8

Click “Hosting engine“Button to deploy the oVirt hosting engine on the configured storage.

Install and configure oVirt 4.4 on CentOS 8

Fill engine details:

  • VM FQDN – in DNS or add to /etc/hosts
  • IP address/gateway/DNS server
  • The interface from which the bridge is created
  • Root user password

In the next window, set engine credentials and SMTP for email notification.

Install and configure oVirt 4.4 on CentOS 8

Verify the virtual machine details and click “Prepare the virtual machine“Button.

Install and configure oVirt 4.4 on CentOS 8

Wait for the virtual machine setup to complete, and then continue to configure storage.

Install and configure oVirt 4.4 on CentOS 8

Complete the setup, then visit the Ovirt Engine dashboard https://[ServerFQDN]

Install and configure oVirt 4.4 on CentOS 8

In the next article, we will introduce how to add hosts to be managed by oVirt Engine.

How to add a computing host to oVirt virtualization

You can download this article in PDF format via the link below to support us.

Download the guide in PDF format

turn off