Configure oVirt Node (Hypervisor) on Rocky Linux 8 / AlmaLinux 8

ComputingPost
8 min readOct 18, 2022

--

Virtualization technology was created to allow for efficient use of physical computing resources in IT Infrastructures. Each Virtual Machine will have its file system, network interface, IP address and other peripherals attached to it. The hypervisor is the software component on the host that manages and supports the physical server virtualization.

The work of the hypervisor is to run virtual machines for each virtualized operating system by providing access to virtual memory, storage, networking, CPUs, GPUs, and other system peripherals. It ensures there is restriction of virtual machines from having direct access to hardware or other virtual machines. In Virtualization, a host is the physical machine and operating system providing the hypervisor.

What is oVirt?

oVirt is an open source virtualization platform that provides centralized management of virtual servers, hosts, and desktops across one or more enterprise data centers. oVirt is based on Linux OS, Kernel-based Virtual Machine (KVM) technology, and other software components that delivers the entire Virtualization platform.

oVirt offers great features that suit enterprise-grade virtualization.

  • Live migration of Virtual Machines
  • Virtual Machines high availability, feature extension of Live migration
  • System scheduling
  • Power management
  • Image management
  • Monitoring through Grafana dashboards
  • Snapshots management for your Virtual Machines
  • Thin provisioning of VMs
  • Among other features

Below are the key components of oVirt virtualization platform.

Name Component Description oVirt Engine Service that provides a graphical user interface and a REST API to manage the resources in the environment. The Engine is installed on a physical or virtual machine running Enterprise Linux. Hosts Enterprise Linux hosts (Enterprise Linux hosts) and oVirt Nodes (image-based hypervisors) are the two supported types of host. Hosts use Kernel-based Virtual Machine (KVM) technology and provide resources used to run virtual machines. Shared Storage A storage service is used to store the data associated with virtual machines. Data Warehouse A service that collects configuration information and statistical data from the Engine.

This article will be focused on the installation of oVirt hypervisor components on Rocky Linux 8 / AlmaLinux 8 server. For oVirt Engine setup refer to our guide in the following link:

The requirements on the server to be used as oVirt compute host must meet the following;

  • CPU Requirements: The CPUs on the hosts system must have support for the Intel® 64 or AMD64 CPU extensions, and the AMD-V™ or Intel VT® hardware virtualization extensions enabled.
  • Memory Requirements: The minimum of memory required in a host is 2 GB, and supports up to 4 TB of RAM per Virtual Machine deployed on oVirt Node
  • Storage Requirements: Storage can be local or network-based. The total minimum storage requirement on the node is 55 GiB
  • Networking requirements: oVirt requires IPv6 to remain enabled on the physical or virtual machine running the Engine
  • Network Interface: 1 Network Interface Card (NIC) with bandwidth of at least 1 Gbps.
  • DNS(hostnames) and NTP time synchronization configured

Virtual Desktop Server Manager (VDSM) management agent

On every oVirt host (hypervisor) is the Virtual Desktop Server Manager (VDSM) management agent that runs to allow for communication between the oVirt Manager (Engine) and compute hosts. This VDSM allows oVirt Manager to manage virtual machines and storage, and retrieve statistics from hosts and guests. it uses libvirt to perform basic virtual machine life-cycle commands, such as start, stop, and reboot.

Step 1 — Configure hostname, DNS and NTP

We need a good DNS name configured on our server. My first oVirt node will have the hostname set below:

Hostname="ovirt-node-01.hirebestengineers.com"

sudo hostnamectl set-hostname $Hostname

Update DNS server and add A record for the name we’ve used on the server. You can also use /etc/hosts file if no DNS server in your infra.

[root@ovirt-node-01 ~]# ip ad show

1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000

link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00

inet 127.0.0.1/8 scope host lo

valid_lft forever preferred_lft forever

inet6 ::1/128 scope host

valid_lft forever preferred_lft forever

2: enp1s0: mtu 1500 qdisc fq_codel state UP group default qlen 1000

link/ether 52:54:00:36:ad:26 brd ff:ff:ff:ff:ff:ff

inet 192.168.70.3/24 brd 192.168.70.255 scope global noprefixroute enp1s0

valid_lft forever preferred_lft forever

inet6 fe80::5054:ff:fe36:ad26/64 scope link

valid_lft forever preferred_lft forever



[root@ovirt-node-01 ~]# vi /etc/hosts

# oVirt Nodes

192.168.70.2 ovirt-manager.hirebestengineers.com ovirt-manager

192.168.70.3 ovirt-node-01.hirebestengineers.com ovirt-node-01

Also set correct timezone of your region:

sudo timedatectl set-timezone Africa/Nairobi

Install chrony ntp server package

sudo yum -y install chrony

Start the service and sync date on the server

sudo systemctl enable --now chronyd

sudo chronyc sources

Verify current date setting on the server

[root@ovirt-node-01 ~]# date

Tue Jan 11 00:17:39 EAT 2022

Step 2 — Add oVirt RPM Repository to Rocky Linux 8 / AlmaLinux 8

There is an official YUM repository for EL systems that we can add and install required packages from it. An alternative installation is from oVirt host ISO file.

We can run the command shared to enable oVirt repos on our system

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

List all repositories available after addition

[root@ovirt-node-01 ~]# yum repolist

repo id repo name

appstream Rocky Linux 8 - AppStream

baseos Rocky Linux 8 - BaseOS

extras Rocky Linux 8 - Extras

ovirt-4.4 Latest oVirt 4.4 Release

ovirt-4.4-advanced-virtualization Advanced Virtualization packages for x86_64

ovirt-4.4-centos-ceph-pacific Ceph packages for x86_64

ovirt-4.4-centos-gluster8 CentOS-8 - Gluster 8

ovirt-4.4-centos-nfv-openvswitch CentOS-8 - NFV OpenvSwitch

ovirt-4.4-centos-opstools CentOS-8 - OpsTools - collectd

ovirt-4.4-centos-ovirt44 CentOS-8 - oVirt 4.4

ovirt-4.4-copr:copr.fedorainfracloud.org:sac:gluster-ansible Copr repo for gluster-ansible owned by sac

ovirt-4.4-copr:copr.fedorainfracloud.org:sbonazzo:EL8_collection Copr repo for EL8_collection owned by sbonazzo

ovirt-4.4-epel Extra Packages for Enterprise Linux 8 - x86_64

ovirt-4.4-openstack-victoria OpenStack Victoria Repository

ovirt-4.4-virtio-win-latest virtio-win builds roughly matching what will be shipped in upcoming RHEL

We can confirm there are oVirt repositories enabled on the system. We’ll be using them to install the packages needed to turn our Rocky Linux 8 / AlmaLinux 8 system into oVirt Virtualization compute node.

Step 3 — Install oVirt Packages and dependencies

Install the oVirt Cockpit module and other packages required:

sudo dnf -y install cockpit cockpit-ovirt-dashboard

If the node will be used to configure Glusterfs or deploy oVirt Manager as hosted engine, install these extra packages:

sudo dnf install gluster-ansible-roles ovirt-engine-appliance

Then enable and start cockpit socket

sudo systemctl enable cockpit.socket

sudo systemctl start cockpit.socket

If firewalld service is active, allow cockpit service on the firewall using firewall-cmd utility.

sudo firewall-cmd --add-service=cockpit

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

sudo firewall-cmd --reload

Step 4 — Prepare Storage for oVirt use

We have an article on configuring NFS storage for oVirt.

The only steps necessary for this setup are Step 1 and Step 2. Other steps can only be performed after addition of Compute host/hypervisor.

Step 5 — Add Compute host from oVirt managent portal

Ensure server names for oVirt Engine and your compute hosts are set correctly. Forward and reverse lookup records must both be set in the DNS. You can update /etc/hosts file with correct names and IP addresses.

# Updating /etc/hosts file

192.168.70.2 ovirt-manager.hirebestengineers.com ovirt-manager

192.168.70.3 ovirt-node-01.hirebestengineers.com ovirt-node-01

Login to oVirt Manager administration portal using set username and password.

install-ovirt-manager-rocky-almalinux-04-1024x460

Navigate to Compute > Hosts > New

install-ovirt-almalinux-01-1024x149

Select the Data Center for Host Cluster in the drop-down list for the new host. Then fill all required information for the host to be added — Name, IP address, and authentication details.

install-ovirt-almalinux-02-1024x797

For SSH Public Key authentication, you’ll copy the key displayed in the SSH Public Key field to /root/.ssh/authorized_keys on the host.

[root@ovirt-node-01 ~]# vi /root/.ssh/authorized_keys

#Paste-pub-key-here

Ansible is used to automatically configure new host. Click on its name to check progress

install-ovirt-almalinux-03-1024x153

Provisioning progress is available inside Events tab.

install-ovirt-almalinux-05-1024x317

Once the installation of oVirt host is done. There will be ansible deployment success message in events logs.

install-ovirt-almalinux-06-1024x281

Login and reboot the host before you can use it

[root@ovirt-node-01 ~]# reboot

Node status should be in Up status after the reboot.

install-ovirt-almalinux-07-1024x174

A logical network called ovirtmgmt is created automatically by the provisioner. This is usable for most workloads unless you have a special requirement for multiple network interfaces.

install-ovirt-almalinux-08-1024x236

The host primary interface will be bound to the Linux bridge created:

[root@ovirt-node-01 ~]# cat /etc/sysconfig/network-scripts/ifcfg-enp1s0

NAME=enp1s0

DEVICE=enp1s0

ONBOOT=yes

NETBOOT="yes"

TYPE=Ethernet

MTU=1500

UUID=c0ab6b8c-0eac-a1b4-1c47-efe4b2d1191f

LLDP=no

BRIDGE=aef0841b-771f-4bd7-a987-0791b97fa3b7



# cat /etc/sysconfig/network-scripts/ifcfg-ovirtmgmt

STP=no

TYPE=Bridge

HWADDR=

MTU=1500

PROXY_METHOD=none

BROWSER_ONLY=no

BOOTPROTO=none

IPADDR=192.168.77.3

PREFIX=24

DNS1=8.8.8.8

DNS2=8.8.4.4

DEFROUTE=yes

DHCP_CLIENT_ID=mac

IPV4_FAILURE_FATAL=no

IPV4_DNS_PRIORITY=40

IPV6_DISABLED=yes

IPV6INIT=no

ROUTING_RULE_1="priority 3200 to 192.168.77.0/24 table 329647082"

ROUTING_RULE_2="priority 3200 from 192.168.77.0/24 table 329647082"

NAME=ovirtmgmt

UUID=aef0841b-771f-4bd7-a987-0791b97fa3b7

DEVICE=ovirtmgmt

ONBOOT=yes

AUTOCONNECT_SLAVES=yes

More networks can be created from oVirt Management portal as required by your applications and mapped on the hosts. Next you configure storage domains in your oVirt data center. Check out our guide

Conclusion

In addition to this blog post, there are a number of useful resources that helps with the deployment and usage of oVirt Virtualization platform. In particular, visit and review the official oVirt Documentation. Navigate through various sections and access some useful information. Our future guides will demonstrate operations on oVirt environment from the user and Systems Administrator perspective. Stay connected for daily updates!.

https://www.computingpost.com/configure-ovirt-node-hypervisor-on-rocky-linux-8-almalinux-8/?feed_id=14469&_unique_id=634e0a48bb354

--

--

ComputingPost

ComputingPost — Linux Howtos, Tutorials, Guides, News, Tips and Tricks.