Red Hat Virtualization Manager Setup | ArkIT

Red Hat Virtualization Manager provides a graphical user interface and a REST API to manage the resources in the environment. The Manager is installed on a physical or virtual machine running Red Hat Enterprise Linux.

Prerequisites

  • Need to have Active Red Hat subscription
  • Minimum RAM 4GB, 25GB HDD, 2 CPU Cores and Internet enabled network connection
  • Install RHEL 7 or RHEL 8 with minimal installation
  • Enable required repositories from Red Hat content delivery network

Enable Repositories

# subscription-manager repos \
--disable='*' \
--enable=rhel-8-for-x86_64-baseos-rpms \
--enable=rhel-8-for-x86_64-appstream-rpms \
--enable=rhv-4.4-manager-for-rhel-8-x86_64-rpms \
--enable=fast-datapath-for-rhel-8-x86_64-rpms \
--enable=jb-eap-7.4-for-rhel-8-x86_64-rpms \
--enable=openstack-16.2-cinderlib-for-rhel-8-x86_64-rpms \
--enable=rhceph-4-tools-for-rhel-8-x86_64-rpms

Enable pki-deps module

# dnf module -y enable pki-deps

postgresql 12 module enable we need database service

# dnf module -y enable postgresql:12

Synchronize installed packages to update them to the latest versions

# dnf distro-sync --nobest
Total download size: 926 M
Is this ok [y/N]: y
Downloading Packages:

--------------------------------------------------------------
Total 6.7 MB/s | 926 MB 02:18 
warning: /var/cache/dnf/rhel-8-for-x86_64-baseos-rpms-51b3b78d5698246b/packages/python3-cloud-what-1.28.21-3.el8.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs) [=== ] --- B/s | 0 B --:-- ETA
Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs) 4.9 MB/s | 5.0 kB 00:00 
Importing GPG key 0xFD431D51:
Userid : "Red Hat, Inc. (release key 2) <security@redhat.com>"
Fingerprint: 567E 347A D004 4ADE 55BA 8A5F 199E 2F91 FD43 1D51
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
Is this ok [y/N]: y
Key imported successfully
Importing GPG key 0xD4082792:
Userid : "Red Hat, Inc. (auxiliary key) <security@redhat.com>"
Fingerprint: 6A6A A7C9 7C88 90AE C6AE BFE2 F76F 66C3 D408 2792
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
Is this ok [y/N]: y
Key imported successfully

Installed:
grub2-tools-efi-1:2.02-106.el8.x86_64 kernel-4.18.0-348.12.2.el8_5.x86_64 kernel-core-4.18.0-348.12.2.el8_5.x86_64 kernel-devel-4.18.0-348.12.2.el8_5.x86_64 
kernel-modules-4.18.0-348.12.2.el8_5.x86_64 libbpf-0.4.0-1.el8.x86_64 lttng-ust-2.8.1-11.el8.x86_64 python3-cloud-what-1.28.21-3.el8.x86_64

Complete!

Before configuring the Red Hat Virtualization Manager, you must manually configure the Manager database on the remote server. You can also use this procedure to manually configure the Data Warehouse database if you do not want the Data Warehouse setup script to configure it automatically.

[root@rhevm ~]# subscription-manager repos \
> --enable=rhel-8-for-x86_64-baseos-rpms \
> --enable=rhel-8-for-x86_64-appstream-rpms \
> --enable=rhv-4.4-manager-for-rhel-8-x86_64-rpms

Install and configure PostgreSQL database

# dnf install postgresql-server postgresql-contrib -y

Updating Subscription Management repositories.
Last metadata expiration check: 0:23:11 ago on Fri 21 Jan 2022 08:35:54 AM PST.
Dependencies resolved.
Install 5 Packages

Total download size: 8.2 M
Installed size: 31 M

Running scriptlet: postgresql-server-12.9-1.module+el8.5.0+13373+4554acc4.x86_64 5/5 
[/usr/lib/tmpfiles.d/postgresql.conf:1] Line references path below legacy directory /var/run/, updating /var/run/postgresql → /run/postgresql; please update the tmpfiles.d/ drop-in file accordingly.

Installed products updated.

Installed:
libpq-13.3-1.el8_4.x86_64 postgresql-12.9-1.module+el8.5.0+13373+4554acc4.x86_64 
postgresql-contrib-12.9-1.module+el8.5.0+13373+4554acc4.x86_64 postgresql-server-12.9-1.module+el8.5.0+13373+4554acc4.x86_64 
uuid-1.6.2-43.el8.x86_64

Complete!

Initialize the database

[root@rhevm ~]# postgresql-setup --initdb
* Initializing database in '/var/lib/pgsql/data'
* Initialized, logs are in /var/lib/pgsql/initdb_postgresql.log

[root@rhevm ~]# systemctl enable postgresql
Created symlink /etc/systemd/system/multi-user.target.wants/postgresql.service → /usr/lib/systemd/system/postgresql.service.

[root@rhevm ~]# systemctl start postgresql
[root@rhevm ~]# su - postgres -c psql
psql (12.9)
Type "help" for help.

postgres=# create role rhevm with login encrypted password 'rhevm';
CREATE ROLE
postgres=# create database rhevm owner rhevm template template0encoding 'UTF8' lc_collate 'en_US.UTF-8' lc_ctype 'en_US.UTF-8';
CREATE DATABASE
postgres=# \c rhevm
You are now connected to database "rhevm" as user "postgres".
rhevm=# CREATE EXTENSION "uuid-ossp";
CREATE EXTENSION
rhevm=# CREATE LANGUAGE plpgsql;
ERROR: language "plpgsql" already exists
rhevm=# \q

Edit the /var/lib/pgsql/data/pg_hba.conf file to enable md5 client authentication, so that the engine can access the database remotely. Add the following line immediately below the line that starts with local at the bottom of the file. Replace X.X.X.X with the IP address of the Manager or Data Warehouse machine, and replace 0-32 or 0-128 with the CIDR mask length

If configure anything wrong in the configuration file you would see below error message

[root@rhevm ~]# systemctl restart postgresql
Job for postgresql.service failed because the control process exited with error code.
See "systemctl status postgresql.service" and "journalctl -xe" for details.

Edit config file

[root@rhevm ~]# vi /var/lib/pgsql/data/pg_hba.conf

host rhevm rhevm 192.168.182.130/24 md5

Allow TCP/IP connections to the database. Edit the /var/lib/pgsql/data/postgresql.conf file
and add the following line, replace IP address with your server address.

listen_addresses='192.168.182.130'

autovacuum_vacuum_scale_factor=0.01
autovacuum_analyze_scale_factor=0.075
autovacuum_max_workers=6
maintenance_work_mem=65536
max_connections=150
work_mem=8192

Red Hat Virtualization Manager Setup

Enable port communication with client

# firewall-cmd --zone=public --add-service=postgresql
# firewall-cmd --permanent --zone=public --add-service=postgresql

Restart the DB service

[root@rhevm ~]# systemctl restart postgresql

Install the package and dependencies for the Red Hat Virtualization Manager, and configure it using the engine-setup command. The script asks you a series of questions and, after you provide the required values for all questions, applies that configuration and starts the ovirt-engine service.

# dnf install rhvm -y
[root@rhevm ~]# engine-setup
[ INFO ]Stage: Initializing
[ INFO ]Stage: Environment setup
Configuration files: /etc/ovirt-engine-setup.conf.d/10-packaging-wsp.conf, /etc/ovirt-engine-setup.conf.d/10-packaging.conf
Log file: /var/log/ovirt-engine/setup/ovirt-engine-setup-20220121092518-k4igxp.log
Version: otopi-1.9.6 (otopi-1.9.6-2.el8ev)
[ INFO ]Stage: Environment packages setup
[ INFO ]Stage: Programs detection
[ INFO ]Stage: Environment setup (late)
[ INFO ]Stage: Environment customization

--== PRODUCT OPTIONS ==--

Configure Cinderlib integration (Currently in tech preview) (Yes, No) [No]: 
Configure Engine on this host (Yes, No) [Yes]: 

Configuring ovirt-provider-ovn also sets the Default cluster's default network provider to ovirt-provider-ovn.
Non-Default clusters may be configured with an OVN after installation.
Configure ovirt-provider-ovn (Yes, No) [Yes]: 
Configure WebSocket Proxy on this host (Yes, No) [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]: 
Configure VM Console Proxy on this host (Yes, No) [Yes]: 
Configure Grafana on this host (Yes, No) [Yes]: 

--== PACKAGES ==--

[ INFO ]Checking for product updates...
[ INFO ]DNF Package grafana-postgres available, but not installed.
[ INFO ]No product updates found

--== NETWORK CONFIGURATION ==--

Host fully qualified DNS name of this server [rhevm.anysys.local]: 
[WARNING]Failed to resolve rhevm.anysys.local using DNS, it can be resolved only locally

--== DATABASE CONFIGURATION ==--

Where is the DWH database located? (Local, Remote) [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]: 
Where is the Engine database located? (Local, Remote) [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]: 

--== OVIRT ENGINE CONFIGURATION ==--

Engine admin password: 
Confirm engine admin password: 
[WARNING]Password is weak: The password is shorter than 8 characters
Use weak password? (Yes, No) [No]: yes
Application mode (Virt, Gluster, Both) [Both]: 
Use default credentials (admin@internal) for ovirt-provider-ovn (Yes, No) [Yes]: 

--== STORAGE CONFIGURATION ==--

Default SAN wipe after delete (Yes, No) [No]: 

--== PKI CONFIGURATION ==--

Organization name for certificate [anysys.local]: 

--== 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]: 

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]: 

--== SYSTEM CONFIGURATION ==--


--== MISC CONFIGURATION ==--

Please choose Data Warehouse sampling scale:
(1) Basic
(2) Full
(1, 2)[1]: 
Use Engine admin password as initial Grafana admin password (Yes, No) [Yes]: 

--== END OF CONFIGURATION ==--

[ INFO ]Stage: Setup validation

--== CONFIGURATION PREVIEW ==--

Application mode : both
Default SAN wipe after delete : False
Host FQDN : rhevm.anysys.local
Update Firewall : False
Set up Cinderlib integration : False
Configure local Engine database : True
Set application as default page : True
Configure Apache SSL : True
Engine database host : localhost
Engine database port : 5432
Engine database secured connection : False
Engine database host name validation : False
Engine database name : engine
Engine database user name : engine
Engine installation : True
PKI organization : anysys.local
Set up ovirt-provider-ovn : True
Grafana integration : True
Grafana database user name : ovirt_engine_history_grafana
Configure WebSocket Proxy : True
DWH installation : True
DWH database host : localhost
DWH database port : 5432
DWH database secured connection : False
DWH database host name validation : False
DWH database name : ovirt_engine_history
Configure local DWH database : True
Configure VMConsole Proxy : True

Please confirm installation settings (OK, Cancel) [OK]: 
[ INFO ]Stage: Transaction setup
[ INFO ]Stopping engine service
[ INFO ]Stopping ovirt-fence-kdump-listener service
[ INFO ]Stopping dwh service
[ INFO ]Stopping vmconsole-proxy service
[ INFO ]Stopping websocket-proxy service
[ INFO ]Stage: Misc configuration (early)
[ INFO ]Stage: Package installation
[ INFO ]Stage: Misc configuration
[ INFO ]Upgrading CA
[ INFO ]Creating PostgreSQL 'engine' database
[ INFO ]Configuring PostgreSQL
[ INFO ]Creating PostgreSQL 'ovirt_engine_history' database
[ INFO ]Configuring PostgreSQL
[ INFO ]Creating CA: /etc/pki/ovirt-engine/ca.pem
[ INFO ]Creating CA: /etc/pki/ovirt-engine/qemu-ca.pem
[ INFO ]Updating OVN SSL configuration
[ INFO ]Updating OVN timeout configuration
[ INFO ]Creating/refreshing DWH database schema
[ 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 database schema
[ INFO ]Creating a user for Grafana
[ INFO ]Creating/refreshing Engine 'internal' domain database schema
[ INFO ]Creating default mac pool range
[ INFO ]Adding default OVN provider to database
[ INFO ]Adding OVN provider secret to database
[ INFO ]Setting a password for internal user admin
[ INFO ]Install selinux module /usr/share/ovirt-engine/selinux/ansible-runner-service.cil
[ 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 ]Starting Grafana 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 ovn-central-firewall-service
firewall-cmd --permanent --add-service ovirt-provider-ovn
firewall-cmd --permanent --add-service ovirt-http
firewall-cmd --permanent --add-service ovirt-https
firewall-cmd --permanent --add-service ovirt-vmconsole-proxy
firewall-cmd --permanent --add-service ovirt-websocket-proxy
firewall-cmd --permanent --add-service ovirt-fence-kdump-listener
firewall-cmd --permanent --add-service ovirt-imageio-proxy
firewall-cmd --permanent --add-service ovirt-postgres
firewall-cmd --reload
The following network ports should be opened:
tcp:2222
tcp:35357
tcp:443
tcp:5432
tcp:54323
tcp:6100
tcp:6641
tcp:6642
tcp:80
tcp:9696
udp:7410
Please use the user 'admin@internal' and password specified in order to login
Web access is enabled at:
http://rhevm.anysys.local:80/ovirt-engine
https://rhevm.anysys.local:443/ovirt-engine
Internal CA F6:89:59:87:04:D8:7B:2B:C6:F7:64:35:25:0E:07:5A:FA:A8:34:9C
SSH fingerprint: SHA256:RCvkUuitcMMycJXCWfgNxoGp2btArxiG5eR6iy9qTSA
Web access for grafana is enabled at:
https://rhevm.anysys.local/ovirt-engine-grafana/
Please run the following command on the engine machine rhevm.anysys.local, for SSO to work:
systemctl restart ovirt-engine

--== END OF SUMMARY ==--

[ INFO ]Stage: Clean up
Log file is located at /var/log/ovirt-engine/setup/ovirt-engine-setup-20220121092518-k4igxp.log
[ INFO ]Generating answer file '/var/lib/ovirt-engine/setup/answers/20220121093542-setup.conf'
[ INFO ]Stage: Pre-termination
[ INFO ]Stage: Termination
[ INFO ]Execution of setup completed successfully

That’s it now you can access the Virtual Manager console using URL

Related Topics

Installing RHEVM

Installing RHEV Hypervisor

RHEVH VMWare Workstation

Thanks for your wonderful Support and Encouragement

ARK

My Name is ARK. Expert in grasping any new technology, Interested in Sharing the knowledge. Learn more & Earn More

Leave a Reply

Your email address will not be published.