How to install the oVirt virtual machine manager on CentOS 8

If you're looking for a web-based virtual machine manager, oVirt might be the tool for you. Jack Wallen shows you how to install this powerful, open source solution on CentOS 8.

datacenter.jpg

Image: iStockphoto/monsitj

oVirt is a complete virtualization management system that's based on Red Hat's Enterprise Virtualization solution. With this web-based tool you can manage the compute, storage, and networking resources of your entire virtualized infrastructure. This particular solution uses the KVM hypervisor, libvirt, Gluster, PatternFly, and Ansible to make it's magic.

I'm going to walk you through the process of getting it up and running.

SEE: MSP best practices: Server deployment checklist (TechRepublic Premium)

What you'll need

In order to make this happen, you're going to need the following:

  • A running instance of CentOS 8 with at least 16GB of RAM (which is the minimum recommendation for oVirt)

  • Access to the root user account

How to set your hostname

The first thing you must do is set your machine's hostname to an FQDN. This is crucial and you have to make sure that hostname is accessible from any machine you'll use to manage oVirt. I used a LAN-only hostname and then mapped that hostname to the IP address in the hosts files on the desktop clients used to reach oVirt. That's the easy way around using an actual domain for this server.

To set the hostname on your CentOS 8 machine, log in, open a terminal window, and su to the root user. From that terminal issue the command:

hostnamectl set-hostname FQDN

Where FQDN is the fully qualified domain name of your server. 

Note: This can be a LAN-only address (so long as you remember to map it in clients hosts file).

Next, open the hosts file on the server with the command:

nano /etc/hosts

At the bottom of that file, add an entry for the server like so:

SERVER_IP FQDN

Where SERVER_IP is the IP address of the hosting server and FQDN is the fully qualified domain name of the server.

Save and close the file.

How to install the necessary repository

Next, we're going to add the necessary repository so oVirt can be installed. From the terminal window, issue the command:

dnf install https://resources.ovirt.org/pub/yum-repo/ovirt-release44.rpm

When the above command completes, enable the Java, pki-deps, and PostgreSQL modules with the commands:

dnf module enable javapackages-tools -y
dnf module enable pki-deps -y
dnf module enable postgresql:12 -y

How to install oVirt

Now it's time to install oVirt. Update DNF with the command:

dnf update -y

When the DNF update completes, install oVirt with the command:

dnf install ovirt-engine -y

The ovirt-engine installation will take some time (10-20 minutes, depending on your hardware and network connection).

How to configure oVirt

It's now time to configure oVirt. To do that, issue the command:

engine-setup

You will be asked a number of questions. Unless you have a reason otherwise, accept the default answers for all of the questions. Make sure to read them carefully and answer them according to your needs--but the defaults should do. You will also be asked to create an oVirt engine password. Make sure to use a strong, unique password for this.

How to configure the firewall

We need to make sure SELinux doesn't prevent oVirt from functioning properly. For that, issue the command:

setsebool -P httpd_can_network_connect 1

Next, set a couple of new firewall rules (to open ports 80 and 443) with the commands:

firewall-cmd --permanent --zone public --add-port 80/tcp
firewall-cmd --permanent --zone public --add-port 443/tcp

Finally, reload the firewall with the command:

firewall-cmd --reload

How to access the oVirt console

Open a browser (on a machine that is capable of reaching the oVirt FQDN) and point it to https://SERVER/ovirt-engine/sso/login.html (where SERVER is the FQDN of the hosting server).

You should be presented with the oVirt console, where you can access the Admin, VM, and Monitoring portals, as well as downloads for the console client, CA certificate, and moVirt for Android (Figure A).

Figure A

ovirtconsol.jpg

The oVirt console gives you access to everything you need.

In the upper-right corner, click the login drop-down and then (when prompted) type admin as the username and the password you created during the installation. Once logged in, click Administration Portal and you'll find yourself on the oVirt dashboard, where you can start working with your new virtualization manager (Figure B).

Figure B

ovirtdashboard.jpg

The oVirt administration dashboard is ready to get to twork.

Congratulations on getting your new web-based virtualization administration platform up and running.

Also see

By Jack Wallen

Jack Wallen is an award-winning writer for TechRepublic, The New Stack, and Linux New Media. He's covered a variety of topics for over twenty years and is an avid promoter of open source. For more news about Jack Wallen, visit his website jackwallen....