oVirt is an open-source and free virtualization management platform designed to manage virtual machines, networks, compute, entire enterprise infrastructure, and storage resources. oVirt offers the live migration of virtual machines and disks between storage and hosts. Also, oVirt uses the Kernel-based Virtual Machine (KVM) and is built upon Gluster, PattenFly, libvirt, and Ansible as some community projects.
oVirt is under GPLV2 License. The oVirt engine frontend is developed with the GWT web toolkit, and the backend is written in Java. oVirt consists of two basic components, oVirt node, and oVirt engine. The process of oVirt installation on Ubuntu is really easier.
The oVirt Guest Agent provides the information, actions, and notifications between the oVirt web interfaces and the guest. The oVirt Guest agent provides Machine Name, IP Addresses, Operating System, Network, Installed Applications, and RAM usage to the web interface. oVirt also provides Single-On, so an authenticated user to the web interface does not need to authenticate over and over again when connected to a virtual machine. In this tutorial, we will learn the steps to set up the Ubuntu server and install and configure oVirt guest agent on Ubuntu 20.04.
Initial Server Set up on Ubuntu 20.04
In order to set up Ubuntu 20.04 server, follow the below steps:
Step 1: Update and Upgrade the System
First, log in to the Ubuntu 20.04 system via SSH or console. Now, update the apt-cache and upgrade all packages on the system by executing the following commands:
$ sudo apt update $ sudo apt upgrade
Step 2: Create a User Account on the System
It is not recommended to use the root user to run on Ubuntu 20.04 servers. To create a user account for system administration and enable sudo access by executing the following command:
$ sudo adduser newuser
Now, add the newly created user to the sudo group in order to get all the sudo privileges by executing the following command:
$ sudo usermod -aG sudo newuser
Then, replace the newuser with the name of the user wants to create. Now, change and create a new password for this user with the following command:
$ sudo passwd newuser
After entering the above command, Ubuntu asks the user for a password and confirms the password. It is recommended to use a complex password and use numbers, alphabetic characters, and signs, such as @, !, $, #, %, &, ^, *, (, ), etc.
Step 3: Secure SSH Server
It is recommended to change the default SSH port, and it helps the user secure the system from hack and bot attempts. In order to change the default port, edit the OpenSSH configuration file /etc/ssh/sshd_config and make the following changes. For that, execute the following command:
$ nano /etc/ssh/sshd_config
In the configuration file, change the Default Port settings. Recommended changing the default SSH port as the default ports are constantly on attack.
#port 22 to: port 2245
After changing the default SSH port details in the file, disable the root SSH Login by adding or editing the following line:
After the edits, press Ctrl + x and press the Enter key twice to save and exit the file.
Step 4: Configure Firewall with FirewallD
The next step in the Initial setup on Ubuntu 20.04 server is to configure the firewall. The default Ubuntu 20.04 server edition does not have firewalld installed on it. Users can execute the following command to install the required packages from default repositories.
$ sudo apt install firewalld
After the installation, start the firewall service and enable it to auto-start on the system boot by executing the following commands:
$ sudo systemctl start firewalld $ sudo systemctl enable firewalld
By default, the firewall allows SSH access to remote users. But the users need to add their favourite port to firewalld. Also, they may need to allow other services through the firewall to remote users. Now, add the ssh new port by executing the following command:
$ firewall-cmd --permanent --add-port=2245/tcp
Then, users can directly provide a service name like HTTPS or HTTP to allow. The firewalld uses the /etc/services file to determine the corresponding port of the service. For that, execute the following commands:
$ firewall-cmd --permanent --add-service=https $ firewall-cmd --permanent --add-service=http
If any of the service names are not defined in the /etc/services file. Users can also add firewall rules using the port number directly. For example, to allow TCP port 2080 to the firewall, execute the following command:
$ firewall-cmd --permanent --add-port=2080/tcp
After making the changes to the firewall, ensure to reload the changes by executing the following command:
$ firewall-cmd --reload
In order to view all the allowed services and ports in the firewall, execute the following command:
$ firewall-cmd --permanent --list-all
Output: public target: default icmp-block-inversion: no interfaces: sources:
services: cockpit dhcpv6-client http https ssh ports: 2080/tcp 2245/tcp protocols: masquerade: no forward-ports: source-ports: icmp-blocks: rich rules:
Install and Configure oVirt Guest Agent on Ubuntu 20.04
In order to install and configure oVirt guest agent on Ubuntu 20.04 server, follow the below steps:
1. First, update the Ubuntu system by executing the following command:
$ sudo apt -y update
2. Then, install oVirt guest agent type by executing the following command in the terminal:
$ sudo apt-get install -y ovirt-guest-agent
3. After the installation, the oVirt guest agent service will automatically get configured to start on the boot on Ubuntu 20.04 server.
Uninstall oVirt Guest Agent
In order to uninstall just the ovirt-guest-agent package, execute the following command:
$ sudo apt-get remove ovirt-guest-agent
Execute the following command to uninstall ovirt-guest-agent and its dependencies:
$ sudo apt-get remove --auto-remove ovirt-guest-agent
In order to delete the local/config files for ovirt-guest-agent, execute the following command:
$ sudo apt-get purge ovirt-guest-agent Or $ sudo apt-get purge --auto-remove ovirt-guest-agent
>> Note: Users can not restore the purged local/config files by reinstalling the ovirt-guest-agent package.
This tutorial presents the steps to set up the Ubuntu server and install and configure oVirt on Ubuntu 20.04 server. Hope this tutorial was helpful, and do reach out to us if you have any queries or suggestions.