Chapter 3. Installing the Red Hat Virtualization Manager

3.1. Installing the Red Hat Virtualization Manager Machine and the Remote Server

  1. The Red Hat Virtualization Manager must run on Red Hat Enterprise Linux 7. For detailed instructions on installing Red Hat Enterprise Linux, see the Red Hat Enterprise Linux 7 Installation Guide.

    This machine must meet the minimum Manager hardware requirements.

  2. Install a second Red Hat Enterprise Linux machine to use for the databases. This machine will be referred to as the remote server.

To install the Red Hat Virtualization Manager on a system that does not have access to the Content Delivery Network, see Appendix A, Configuring a Local Repository for Offline Red Hat Virtualization Manager Installation before configuring the Manager.

3.2. Enabling the Red Hat Virtualization Manager Repositories

Register the system with Red Hat Subscription Manager, attach the Red Hat Virtualization Manager subscription, and enable Manager repositories.

Procedure

  1. Register your system with the Content Delivery Network, entering your Customer Portal user name and password when prompted:

    # subscription-manager register
    Note

    If you are using an IPv6 network, use an IPv6 transition mechanism to access the Content Delivery Network and subscription manager.

  2. Find the Red Hat Virtualization Manager subscription pool and record the pool ID:

    # subscription-manager list --available
  3. Use the pool ID to attach the subscription to the system:

    # subscription-manager attach --pool=pool_id
    Note

    To view currently attached subscriptions:

    # subscription-manager list --consumed

    To list all enabled repositories:

    # yum repolist
  4. Configure the repositories:

    # subscription-manager repos \
        --disable='*' \
        --enable=rhel-7-server-rpms \
        --enable=rhel-7-server-supplementary-rpms \
        --enable=rhel-7-server-rhv-4.3-manager-rpms \
        --enable=rhel-7-server-rhv-4-manager-tools-rpms \
        --enable=rhel-7-server-ansible-2.9-rpms \
        --enable=jb-eap-7.2-for-rhel-7-server-rpms

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.

3.3. Preparing a Remote PostgreSQL Database

Manually configure a database on a machine that is separate from the Manager machine.

Note

The engine-setup and engine-backup --mode=restore commands only support system error messages in the en_US.UTF8 locale, even if the system locale is different.

The locale settings in the postgresql.conf file must be set to en_US.UTF8.

Important

The database name must contain only numbers, underscores, and lowercase letters.

Enabling the Red Hat Virtualization Manager Repositories

Register the system with Red Hat Subscription Manager, attach the Red Hat Virtualization Manager subscription, and enable Manager repositories.

Procedure

  1. Register your system with the Content Delivery Network, entering your Customer Portal user name and password when prompted:

    # subscription-manager register
    Note

    If you are using an IPv6 network, use an IPv6 transition mechanism to access the Content Delivery Network and subscription manager.

  2. Find the Red Hat Virtualization Manager subscription pool and record the pool ID:

    # subscription-manager list --available
  3. Use the pool ID to attach the subscription to the system:

    # subscription-manager attach --pool=pool_id
    Note

    To view currently attached subscriptions:

    # subscription-manager list --consumed

    To list all enabled repositories:

    # yum repolist
  4. Configure the repositories:

    # subscription-manager repos \
        --disable='*' \
        --enable=rhel-7-server-rpms \
        --enable=rhel-7-server-supplementary-rpms \
        --enable=rhel-7-server-rhv-4.3-manager-rpms \
        --enable=rhel-7-server-rhv-4-manager-tools-rpms \
        --enable=rhel-7-server-ansible-2.9-rpms \
        --enable=jb-eap-7.2-for-rhel-7-server-rpms

Initializing the PostgreSQL Database

  1. Install the PostgreSQL server package:

    # yum install rh-postgresql10 rh-postgresql10-postgresql-contrib
  2. Initialize the PostgreSQL database, start the postgresql service, and ensure that this service starts on boot:

    # scl enable rh-postgresql10 -- postgresql-setup --initdb
    # systemctl enable rh-postgresql10-postgresql
    # systemctl start rh-postgresql10-postgresql
  3. Connect to the psql command line interface as the postgres user:

    su - postgres -c 'scl enable rh-postgresql10 -- psql'
  4. Create a default user. The Manager’s default user is engine and Data Warehouse’s default user is ovirt_engine_history:

    postgres=# create role user_name with login encrypted password 'password';
  5. Create a database. The Manager’s default database name is engine and Data Warehouse’s default database name is ovirt_engine_history:

    postgres=# create database database_name owner user_name template template0 encoding 'UTF8' lc_collate 'en_US.UTF-8' lc_ctype 'en_US.UTF-8';
  6. Connect to the new database:

    postgres=# \c database_name
  7. Add the uuid-ossp extension:

    database_name=# CREATE EXTENSION "uuid-ossp";
  8. Add the plpgsql language if it does not exist:

    database_name=# CREATE LANGUAGE plpgsql;
  9. Quit the psql interface:

    database_name=# \q
  10. Ensure the database can be accessed remotely by enabling md5 client authentication. Edit the /var/opt/rh/rh-postgresql10/lib/pgsql/data/pg_hba.conf file, and add the following line immediately underneath the line starting with local at the bottom of the file, replacing X.X.X.X with the IP address of the Manager or the Data Warehouse machine, and 0-32 or 0-128 with the CIDR mask length:

    host    database_name    user_name    X.X.X.X/0-32    md5
    host    database_name    user_name    X.X.X.X::/0-128   md5

    For example:

    # IPv4, 32-bit address:
    host    engine    engine    192.168.12.10/32    md5
    
    # IPv6, 128-bit address:
    host    engine    engine    fe80::7a31:c1ff:0000:0000/96   md5
  11. Allow TCP/IP connections to the database. Edit the /var/opt/rh/rh-postgresql10/lib/pgsql/data/postgresql.conf file and add the following line:

    listen_addresses='*'

    This example configures the postgresql service to listen for connections on all interfaces. You can specify an interface by giving its IP address.

  12. Update the PostgreSQL server’s configuration. In the /var/opt/rh/rh-postgresql10/lib/pgsql/data/postgresql.conf file, add the following lines to the bottom of the file:

    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
  13. Open the default port used for PostgreSQL database connections, and save the updated firewall rules:

    # firewall-cmd --zone=public --add-service=postgresql
    # firewall-cmd --permanent --zone=public --add-service=postgresql
  14. Restart the postgresql service:

    # systemctl restart rh-postgresql10-postgresql
  15. Optionally, set up SSL to secure database connections using the instructions at https://www.postgresql.org/docs/10/ssl-tcp.html#SSL-FILE-USAGE.

3.4. Installing and Configuring the Red Hat Virtualization Manager

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.

Important

The engine-setup command guides you through several distinct configuration stages, each comprising several steps that require user input. Suggested configuration defaults are provided in square brackets; if the suggested value is acceptable for a given step, press Enter to accept that value.

You can run engine-setup --accept-defaults to automatically accept all questions that have default answers. This option should be used with caution and only if you are familiar with engine-setup.

Procedure

  1. Ensure all packages are up to date:

    # yum update
    Note

    Reboot the machine if any kernel-related packages were updated.

  2. Install the rhvm package and dependencies.

    # yum install rhvm
  3. Run the engine-setup command to begin configuring the Red Hat Virtualization Manager:

    # engine-setup
  4. Press Enter to configure the Manager on this machine:

    Configure Engine on this host (Yes, No) [Yes]:
  5. Optionally install Open Virtual Network (OVN). Selecting Yes will install an OVN central server on the Manager machine, and add it to Red Hat Virtualization as an external network provider. The default cluster will use OVN as its default network provider, and hosts added to the default cluster will automatically be configured to communicate with OVN.

    Configure ovirt-provider-ovn (Yes, No) [Yes]:

    For more information on using OVN networks in Red Hat Virtualization, see Adding Open Virtual Network (OVN) as an External Network Provider in the Administration Guide.

  6. Optionally allow engine-setup to configure the Image I/O Proxy (ovirt-imageio-proxy) to allow the Manager to upload virtual disks into storage domains.

    Configure Image I/O Proxy on this host? (Yes, No) [Yes]:
  7. Optionally allow engine-setup to configure a websocket proxy server for allowing users to connect to virtual machines through the noVNC console:

    Configure WebSocket Proxy on this machine? (Yes, No) [Yes]:

    To configure the websocket proxy on a remote server, answer No and see Appendix B, Installing a Websocket Proxy on a Separate Machine after completing the Manager configuration.

    Important

    The websocket proxy and noVNC are Technology Preview features only. Technology Preview features are not supported with Red Hat production service-level agreements (SLAs) and might not be functionally complete, and Red Hat does not recommend using them for production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process. For more information see Red Hat Technology Preview Features Support Scope.

  8. Choose whether to configure Data Warehouse on this machine.

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

    To configure Data Warehouse on a remote server, answer No and see Section 3.5, “Installing and Configuring Data Warehouse on a Separate Machine” after completing the Manager configuration.

  9. Optionally allow access to a virtual machines’s serial console from the command line.

    Configure VM Console Proxy on this host (Yes, No) [Yes]:

    Additional configuration is required on the client machine to use this feature. See Opening a Serial Console to a Virtual Machine in the Virtual Machine Management Guide.

  10. Press Enter to accept the automatically detected host name, or enter an alternative host name and press Enter. Note that the automatically detected host name may be incorrect if you are using virtual hosts.

    Host fully qualified DNS name of this server [autodetected host name]:
  11. The engine-setup command checks your firewall configuration and offers to open the ports used by the Manager for external communication, such as ports 80 and 443. If you do not allow engine-setup to modify your firewall configuration, you must manually open the ports used by the Manager. firewalld is configured as the firewall manager; iptables is deprecated.

    Setup can automatically configure the firewall on this system.
    Note: automatic configuration of the firewall may overwrite current settings.
    NOTICE: iptables is deprecated and will be removed in future releases
    Do you want Setup to configure the firewall? (Yes, No) [Yes]:

    If you choose to automatically configure the firewall, and no firewall managers are active, you are prompted to select your chosen firewall manager from a list of supported options. Type the name of the firewall manager and press Enter. This applies even in cases where only one option is listed.

  12. Specify whether to configure the Manager database on this machine, or on another machine:

    Where is the Engine database located? (Local, Remote) [Local]:
    • If you select Remote, input the following values for the preconfigured remote database server. Replace localhost with the ip address or FQDN of the remote database server:

      Engine database host [localhost]:
      Engine database port [5432]:
      Engine database secured connection (Yes, No) [No]:
      Engine database name [engine]:
      Engine database user [engine]:
      Engine database password:
  13. Set a password for the automatically created administrative user of the Red Hat Virtualization Manager:

    Engine admin password:
    Confirm engine admin password:
  14. Select Gluster, Virt, or Both:

    Application mode (Both, Virt, Gluster) [Both]:

    Both offers the greatest flexibility. In most cases, select Both. Virt allows you to run virtual machines in the environment; Gluster only allows you to manage GlusterFS from the Administration Portal.

  15. If you installed the OVN provider, you can choose to use the default credentials, or specify an alternative.

    Use default credentials (admin@internal) for ovirt-provider-ovn (Yes, No) [Yes]:
    oVirt OVN provider user[admin@internal]:
    oVirt OVN provider password:
  16. Set the default value for the wipe_after_delete flag, which wipes the blocks of a virtual disk when the disk is deleted.

    Default SAN wipe after delete (Yes, No) [No]:
  17. The Manager uses certificates to communicate securely with its hosts. This certificate can also optionally be used to secure HTTPS communications with the Manager. Provide the organization name for the certificate:

    Organization name for certificate [autodetected domain-based name]:
  18. Optionally allow engine-setup to make the landing page of the Manager the default page presented by the Apache web server:

    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 web page of the server? (Yes, No) [Yes]:
  19. By default, external SSL (HTTPS) communication with the Manager is secured with the self-signed certificate created earlier in the configuration to securely communicate with hosts. Alternatively, choose another certificate for external HTTPS connections; this does not affect how the Manager communicates with hosts:

    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]:
  20. Review the installation settings, and press Enter to accept the values and proceed with the installation:

    Please confirm installation settings (OK, Cancel) [OK]:

    When your environment has been configured, engine-setup displays details about how to access your environment. If you chose to manually configure the firewall, engine-setup provides a custom list of ports that need to be opened, based on the options selected during setup. engine-setup also saves your answers to a file that can be used to reconfigure the Manager using the same values, and outputs the location of the log file for the Red Hat Virtualization Manager configuration process.

  21. If you intend to link your Red Hat Virtualization environment with a directory server, configure the date and time to synchronize with the system clock used by the directory server to avoid unexpected account expiry issues. See Synchronizing the System Clock with a Remote Server in the Red Hat Enterprise Linux System Administrator’s Guide for more information.
  22. Install the certificate authority according to the instructions provided by your browser. You can get the certificate authority’s certificate by navigating to http://manager-fqdn/ovirt-engine/services/pki-resource?resource=ca-certificate&format=X509-PEM-CA, replacing manager-fqdn with the FQDN that you provided during the installation.

Install the Data Warehouse service and database on the remote server:

3.5. Installing and Configuring Data Warehouse on a Separate Machine

This section describes installing and configuring the Data Warehouse service on a separate machine from the Red Hat Virtualization Manager. Installing Data Warehouse on a separate machine helps to reduce the load on the Manager machine.

Note

You can install the Data Warehouse database on a machine separate from the Data Warehouse service.

Prerequisites

  • The Red Hat Virtualization Manager is installed on a separate machine.
  • A physical server or virtual machine running Red Hat Enterprise Linux 7.
  • The Manager database password.

Enabling the Red Hat Virtualization Manager Repositories

Register the system with Red Hat Subscription Manager, attach the Red Hat Virtualization Manager subscription, and enable Manager repositories.

Procedure

  1. Register your system with the Content Delivery Network, entering your Customer Portal user name and password when prompted:

    # subscription-manager register
    Note

    If you are using an IPv6 network, use an IPv6 transition mechanism to access the Content Delivery Network and subscription manager.

  2. Find the Red Hat Virtualization Manager subscription pool and record the pool ID:

    # subscription-manager list --available
  3. Use the pool ID to attach the subscription to the system:

    # subscription-manager attach --pool=pool_id
    Note

    To view currently attached subscriptions:

    # subscription-manager list --consumed

    To list all enabled repositories:

    # yum repolist
  4. Configure the repositories:

    # subscription-manager repos \
        --disable='*' \
        --enable=rhel-7-server-rpms \
        --enable=rhel-7-server-supplementary-rpms \
        --enable=rhel-7-server-rhv-4.3-manager-rpms \
        --enable=rhel-7-server-rhv-4-manager-tools-rpms \
        --enable=rhel-7-server-ansible-2.9-rpms \
        --enable=jb-eap-7.2-for-rhel-7-server-rpms

Installing Data Warehouse on a Separate Machine

  1. Log in to the machine where you want to install the database.
  2. Ensure that all packages are up to date:

    # yum update
  3. Install the ovirt-engine-dwh-setup package:

    # yum install ovirt-engine-dwh-setup
  4. Run the engine-setup command to begin the installation:

    # engine-setup
  5. Ensure you answer No when asked whether to install the Manager on this machine:

    Configure Engine on this host (Yes, No) [Yes]: No
  6. Answer Yes to install Data Warehouse on this machine:

    Configure Data Warehouse on this host (Yes, No) [Yes]:
  7. Press Enter to accept the automatically-detected host name, or enter an alternative host name and press Enter:

    Host fully qualified DNS name of this server [autodetected hostname]:
  8. Press Enter to automatically configure the firewall, or type No and press Enter to maintain existing settings:

    Setup can automatically configure the firewall on this system.
    Note: automatic configuration of the firewall may overwrite current settings.
    Do you want Setup to configure the firewall? (Yes, No) [Yes]:

    If you choose to automatically configure the firewall, and no firewall managers are active, you are prompted to select your chosen firewall manager from a list of supported options. Type the name of the firewall manager and press Enter. This applies even in cases where only one option is listed.

  9. Enter the fully qualified domain name of the Manager machine, and then press Enter:

    Host fully qualified DNS name of the engine server []:
  10. Press Enter to allow setup to sign the certificate on the Manager via SSH:

    Setup will need to do some actions on the remote engine server. Either automatically, using ssh as root to access it, or you will be prompted to manually perform each such action.
    Please choose one of the following:
    1 - Access remote engine server using ssh as root
    2 - Perform each action manually, use files to copy content around
    (1, 2) [1]:
  11. Press Enter to accept the default SSH port, or enter an alternative port number and then press Enter:

    ssh port on remote engine server [22]:
  12. Enter the root password for the Manager machine:

    root password on remote engine server manager.example.com:
  13. Specify whether to host the Data Warehouse database on this machine (Local), or on another machine (Remote):

    Where is the DWH database located? (Local, Remote) [Local]:
    • If you select Local, the engine-setup script can configure your database automatically (including adding a user and a database), or it can connect to a preconfigured local database:

      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]:
      • If you select Automatic by pressing Enter, no further action is required here.
      • If you select Manual, input the following values for the manually-configured local database:

        DWH database secured connection (Yes, No) [No]:
        DWH database name [ovirt_engine_history]:
        DWH database user [ovirt_engine_history]:
        DWH database password:
    • If you select Remote, you are prompted to provide details about the remote database host. Input the following values for the preconfigured remote database host:

      DWH database host []: dwh-db-fqdn
      DWH database port [5432]:
      DWH database secured connection (Yes, No) [No]:
      DWH database name [ovirt_engine_history]:
      DWH database user [ovirt_engine_history]:
      DWH database password: password
  14. Enter the fully qualified domain name and password for the Manager database machine. If you are installing the Data Warehouse database on the same machine where the Manager database is installed, use the same FQDN. Press Enter to accept the default values in each other field:

    Engine database host []: engine-db-fqdn
    Engine database port [5432]:
    Engine database secured connection (Yes, No) [No]:
    Engine database name [engine]:
    Engine database user [engine]:
    Engine database password: password
  15. Choose how long Data Warehouse will retain collected data:

    Please choose Data Warehouse sampling scale:
    (1) Basic
    (2) Full
    (1, 2)[1]:

    Full uses the default values for the data storage settings listed in Application Settings for the Data Warehouse service in ovirt-engine-dwhd.conf (recommended when Data Warehouse is installed on a remote host).

    Basic reduces the values of DWH_TABLES_KEEP_HOURLY to 720 and DWH_TABLES_KEEP_DAILY to 0, easing the load on the Manager machine. Use Basic when the Manager and Data Warehouse are installed on the same machine.

  16. Confirm your installation settings:

    Please confirm installation settings (OK, Cancel) [OK]:
  17. After the Data Warehouse configuration is complete, on the Red Hat Virtualization Manager, restart the ovirt-engine service:

    # systemctl restart ovirt-engine
  18. Optionally, set up SSL to secure database connections using the instructions at link: https://www.postgresql.org/docs/10/ssl-tcp.html#SSL-FILE-USAGE.

Log in to the Administration Portal, where you can add hosts and storage to the environment:

3.6. Connecting to the Administration Portal

Access the Administration Portal using a web browser.

  1. In a web browser, navigate to https://manager-fqdn/ovirt-engine, replacing manager-fqdn with the FQDN that you provided during installation.

    Note

    You can access the Administration Portal using alternate host names or IP addresses. To do so, you need to add a configuration file under /etc/ovirt-engine/engine.conf.d/. For example:

    # vi /etc/ovirt-engine/engine.conf.d/99-custom-sso-setup.conf
    SSO_ALTERNATE_ENGINE_FQDNS="alias1.example.com alias2.example.com"

    The list of alternate host names needs to be separated by spaces. You can also add the IP address of the Manager to the list, but using IP addresses instead of DNS-resolvable host names is not recommended.

  2. Click Administration Portal. An SSO login page displays. SSO login enables you to log in to the Administration and VM Portal at the same time.
  3. Enter your User Name and Password. If you are logging in for the first time, use the user name admin along with the password that you specified during installation.
  4. Select the Domain to authenticate against. If you are logging in using the internal admin user name, select the internal domain.
  5. Click Log In.
  6. You can view the Administration Portal in multiple languages. The default selection is chosen based on the locale settings of your web browser. If you want to view the Administration Portal in a language other than the default, select your preferred language from the drop-down list on the welcome page.

To log out of the Red Hat Virtualization Administration Portal, click your user name in the header bar and click Sign Out. You are logged out of all portals and the Manager welcome screen displays.