2.4. Installing the Red Hat Enterprise Virtualization Manager

2.4.1. Installing the Red Hat Enterprise Virtualization Manager Packages

Summary
Before you can configure and use the Red Hat Enterprise Virtualization Manager, you must install the rhevm package and dependencies.

Procedure 2.2. Installing the Red Hat Enterprise Virtualization Manager Packages

  1. To ensure all packages are up to date, run the following command on the machine where you are installing the Red Hat Enterprise Virtualization Manager:
    # yum update
  2. Run the following command to install the rhevm package and dependencies.
    # yum install rhevm

    Note

    The rhevm-doc package is installed as a dependency of the rhevm package, and provides a local copy of the Red Hat Enterprise Virtualization documentation suite. This documentation is also used to provide context sensitive help links from the Administration and User Portals. You can run the following command to search for translated versions of the documentation:
    # yum search rhevm-doc
Result
You have installed the rhevm package and dependencies.

2.4.2. Preparing a Remote PostgreSQL Database for Use with the Red Hat Enterprise Virtualization Manager

Optionally configure a PostgreSQL database on a remote Red Hat Enterprise Linux 6.6 machine to use as the Manager database. By default, the Red Hat Enterprise Virtualization Manager's configuration script, engine-setup, creates and configures the Manager database locally on the Manager machine. For automatic database configuration, see Section 2.4.4, “Configuring the Red Hat Enterprise Virtualization Manager”. To set up the Manager database with custom values on the Manager machine, see Section 2.4.3, “Preparing a Local Manually-Configured PostgreSQL Database for Use with the Red Hat Enterprise Virtualization Manager”.
Use this procedure to configure the database on a machine that is separate from the machine where the Manager is installed. Set up this database before you configure the Manager; you must supply the database credentials during engine-setup.

Important

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

Procedure 2.3. Preparing a Remote PostgreSQL Database for use with the Red Hat Enterprise Virtualization Manager

  1. Install the PostgreSQL server package:
    # yum install postgresql-server
  2. Initialize the PostgreSQL database, start the postgresql service, and ensure that this service starts on boot:
    # service postgresql initdb
    # service postgresql start
    # chkconfig postgresql on
  3. Connect to the psql command line interface as the postgres user:
    # su - postgres
    $ psql
  4. Create a user for the Manager to use when it writes to and reads from the database. The default user name on the Manager is engine:
    postgres=# create role user_name with login encrypted password 'password';
  5. Create a database in which to store data about the Red Hat Enterprise Virtualization environment. The default database name on the Manager is engine:
    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 and add the plpgsql language:
    postgres=# \c database_name
    database_name=# CREATE LANGUAGE plpgsql;
  7. Ensure the database can be accessed remotely by enabling md5 client authentication. Edit the /var/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:
    host    database_name    user_name    X.X.X.X/32   md5
  8. Allow TCP/IP connections to the database. Edit the /var/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.
  9. Open the default port used for PostgreSQL database connections, and save the updated firewall rules:
    # iptables -I INPUT 5 -p tcp --dport 5432 -j ACCEPT
    # service iptables save
  10. Restart the postgresql service:
    # service postgresql restart
Optionally, set up SSL to secure database connections using the instructions at http://www.postgresql.org/docs/8.4/static/ssl-tcp.html#SSL-FILE-USAGE.

2.4.3. Preparing a Local Manually-Configured PostgreSQL Database for Use with the Red Hat Enterprise Virtualization Manager

Optionally configure a local PostgreSQL database on the Manager machine to use as the Manager database. By default, the Red Hat Enterprise Virtualization Manager's configuration script, engine-setup, creates and configures the Manager database locally on the Manager machine. For automatic database configuration, see Section 2.4.4, “Configuring the Red Hat Enterprise Virtualization Manager”. To configure the Manager database on a machine that is separate from the machine where the Manager is installed, see Section 2.4.2, “Preparing a Remote PostgreSQL Database for Use with the Red Hat Enterprise Virtualization Manager”.
Use this procedure to set up the Manager database with custom values. Set up this database before you configure the Manager; you must supply the database credentials during engine-setup. To set up the database, you must first install the rhevm package on the Manager machine; the postgresql-server package is installed as a dependency.

Important

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

Procedure 2.4. Preparing a Local Manually-Configured PostgreSQL Database for use with the Red Hat Enterprise Virtualization Manager

  1. Initialize the PostgreSQL database, start the postgresql service, and ensure that this service starts on boot:
    # service postgresql initdb
    # service postgresql start
    # chkconfig postgresql on
  2. Connect to the psql command line interface as the postgres user:
    # su - postgres
    $ psql
  3. Create a user for the Manager to use when it writes to and reads from the database. The default user name on the Manager is engine:
    postgres=# create role user_name with login encrypted password 'password';
  4. Create a database in which to store data about the Red Hat Enterprise Virtualization environment. The default database name on the Manager is engine:
    postgres=# create database database_name owner user_name template template0 encoding 'UTF8' lc_collate 'en_US.UTF-8' lc_ctype 'en_US.UTF-8';
    
  5. Connect to the new database and add the plpgsql language:
    postgres=# \c database_name
    database_name=# CREATE LANGUAGE plpgsql;
  6. Ensure the database can be accessed remotely by enabling md5 client authentication. Edit the /var/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:
    host    [database name]    [user name]    0.0.0.0/0  md5
    host    [database name]    [user name]    ::0/0      md5
  7. Restart the postgresql service:
    # service postgresql restart
Optionally, set up SSL to secure database connections using the instructions at http://www.postgresql.org/docs/8.4/static/ssl-tcp.html#SSL-FILE-USAGE.

2.4.4. Configuring the Red Hat Enterprise Virtualization Manager

After you have installed the rhevm package and dependencies, you must configure the Red Hat Enterprise Virtualization Manager using the engine-setup command. This command 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.
By default, engine-setup creates and configures the Manager database locally on the Manager machine. Alternatively, you can configure the Manager to use a remote database or a manually-configured local database; however, you must set up that database before running engine-setup. To set up a remote database see Section 2.4.2, “Preparing a Remote PostgreSQL Database for Use with the Red Hat Enterprise Virtualization Manager”. To set up a manually-configured local database, see Section 2.4.3, “Preparing a Local Manually-Configured PostgreSQL Database for Use with the Red Hat Enterprise Virtualization Manager”.

Note

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.

Procedure 2.5. Configuring the Red Hat Enterprise Virtualization Manager

  1. Run the engine-setup command to begin configuration of the Red Hat Enterprise Virtualization Manager:
    # engine-setup
  2. Press Enter to configure the Manager:
    Configure Engine on this host (Yes, No) [Yes]:
  3. Optionally allow engine-setup to configure a websocket proxy server for allowing users to connect to virtual machines via the noVNC or HTML 5 consoles:
    Configure WebSocket Proxy on this machine? (Yes, No) [Yes]:
  4. The engine-setup command checks your firewall configuration and offers to modify that configuration to open the ports used by the Manager for external communication such as TCP ports 80 and 443. If you do not allow engine-setup to modify your firewall configuration, then you must manually open the ports used by the Manager.
    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.
  5. Press Enter to accept the automatically detected hostname, or enter an alternative hostname and press Enter. Note that the automatically detected hostname may be incorrect if you are using virtual hosts:
    Host fully qualified DNS name of this server [autodetected host name]:
  6. Choose to use either a local or remote PostgreSQL database as the Manager database:
    Where is the Engine database located? (Local, Remote) [Local]:
    • If you select Local, the engine-setup command 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 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]:
      1. If you select Automatic by pressing Enter, no further action is required here.
      2. If you select Manual, input the following values for the manually-configured local database:
        Database secured connection (Yes, No) [No]: 
        Database name [engine]: 
        Database user [engine]: 
        Database password:
    • If you select Remote, input the following values for the preconfigured remote database host:
      Database host [localhost]:
      Database port [5432]:
      Database secured connection (Yes, No) [No]: 
      Database name [engine]: 
      Database user [engine]: 
      Database password:
  7. Set a password for the automatically created administrative user of the Red Hat Enterprise Virtualization Manager:
    Engine admin password:
    Confirm engine admin password:
  8. Select Gluster, Virt, or Both:
    Application mode (Both, Virt, Gluster) [Both]:
    Both offers the greatest flexibility.
  9. 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]:
  10. 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]:
  11. 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]:
  12. Optionally create an NFS share on the Manager to use as an ISO storage domain. The local ISO domain provides a selection of images that can be used in the initial setup of virtual machines:
    1. Configure an NFS share on this server to be used as an ISO Domain? (Yes, No) [Yes]:
    2. Specify the path for the ISO domain:
      Local ISO domain path [/var/lib/exports/iso]:
    3. Specify the networks or hosts that require access to the ISO domain:
      Local ISO domain ACL - note that the default will restrict access to localhost only, for security reasons [localhost(rw)]: 10.1.2.0/255.255.255.0(rw) host01.example.com(rw) host02.example.com(rw)
      The example above allows access to a single /24 network and two specific hosts. See the exports(5) man page for further formatting options.
    4. Specify a display name for the ISO domain:
      Local ISO domain name [ISO_DOMAIN]:
  13. Optionally, use the engine-setup command to allow a proxy server to broker transactions from the Red Hat Access plug-in:
    Would you like transactions from the Red Hat Access Plugin sent from the RHEV Manager to be brokered through a proxy server? (Yes, No) [No]:
  14. 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, the engine-setup command 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. The engine-setup command 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 Enterprise Virtualization Manager configuration process.
Log in to the Administration Portal as the admin@internal user to continue configuring the Manager.

2.4.5. Connecting to the Administration Portal

Access the Administration Portal using a web browser.

Procedure 2.6. Connecting to the Administration Portal

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

    Important

    The first time that you connect to the Administration Portal, you are prompted to trust the certificate being used to secure communications between your browser and the web server. You must accept this certificate.
  2. Click Administration Portal.
  3. Enter your User Name and Password. If you are logging in for the first time, use the user name admin in conjunction with the password that you specified during installation.
  4. Select the domain against which to authenticate from the Domain list. If you are logging in using the internal admin user name, select the internal domain.
  5. You can view the Administration Portal in multiple languages. The default selection will be chosen based on the locale settings of your web browser. If you would like to view the Administration Portal in a language other than the default, select your preferred language from the list.
  6. Click Login.

2.4.6. Removing the Red Hat Enterprise Virtualization Manager

You can use the engine-cleanup command to remove specific components or all components of the Red Hat Enterprise Virtualization Manager.

Note

A backup of the engine database and a compressed archive of the PKI keys and configuration are always automatically created. These files are saved under /var/lib/ovirt-engine/backups/, and include the date and engine- and engine-pki- in their file names respectively.

Procedure 2.7. Removing the Red Hat Enterprise Virtualization Manager

  1. Run the following command on the machine on which the Red Hat Enterprise Virtualization Manager is installed:
    # engine-cleanup
  2. You are prompted whether to remove all Red Hat Enterprise Virtualization Manager components:
    • Type Yes and press Enter to remove all components:
      Do you want to remove all components? (Yes, No) [Yes]:
    • Type No and press Enter to select the components to remove. You can select whether to retain or remove each component individually:
      Do you want to remove Engine database content? All data will be lost (Yes, No) [No]: 
      Do you want to remove PKI keys? (Yes, No) [No]: 
      Do you want to remove PKI configuration? (Yes, No) [No]: 
      Do you want to remove Apache SSL configuration? (Yes, No) [No]:
  3. You are given another opportunity to change your mind and cancel the removal of the Red Hat Enterprise Virtualization Manager. If you choose to proceed, the ovirt-engine service is stopped, and your environment's configuration is removed in accordance with the options you selected.
    During execution engine service will be stopped (OK, Cancel) [OK]:
    ovirt-engine is about to be removed, data will be lost (OK, Cancel) [Cancel]:OK
  4. Remove the Red Hat Enterprise Virtualization packages:
    # yum remove rhevm* vdsm-bootstrap

2.4.7. Deploying RHEV-M Virtual Appliance with Self-Hosted Engine

With the RHEV-M Virtual Appliance, you can now use this pre-installed and partially pre-configured image of Red Hat Enterprise Virtualization Manager with your self-hosted engine deployment. The image is available for download as an OVA file from the Customer Portal.

Important

While the packages required to initially set up and run the Manager are pre-loaded into the RHEV-M Virtual Appliance, you must subscribe the operating system in the appliance to the Content Delivery Network to receive support and product updates. For information on subscribing to the required channels, see Section 3.2, “Subscribing to the Required Entitlements”.

Table 2.1. Hardware Requirements

Resource Minimum Recommended
Memory 4 GB RAM 16 GB RAM
Disk Space 55 GB writable disk space 100 GB writable disk space

Procedure 2.8.  Deploying RHEV-M Virtual Appliance with Self-Hosted Engine

  1. Log in to the Customer Portal. Open the RHEV-M Virtual Appliance download page at https://access.redhat.com/downloads/content/150/ver=3.5/rhel---6/3.5/x86_64/product-software, and click Download Now next to RHEV-M Appliance (for RHEV-M 3.5).
  2. See Section 3.3, “Installing the Self-Hosted Engine” for the installation entitlements for a self-hosted engine.
  3. See Section 3.4, “Configuring the Self-Hosted Engine” on how to configure a self-hosted engine. In step 4, configuring a virtual machine to be the Red Hat Enterprise Virtualization Manager, specify the option disk and the path to the RHEV-M Virtual Appliance file.
    Please specify the device to boot the VM from (cdrom, disk, pxe) [cdrom]: disk
    Please specify path to OVF archive you would like to use [None]:/path/to/rhevm.ova
    [ INFO  ] Checking OVF archive content (could take a few minutes depending on archive size)
    ...
    
  4. After the Red Hat Enterprise Virtualization Manager virtual machine has booted, you will see the RHEV-M Virtual Appliance setup utility. Set the root password and change the default authentication and keyboard configuration as necessary. You will not be able to complete RHN registration at this stage as there will be no network connection.

    Important

    The root password must be set using the RHEV-M Virtual Appliance setup utility.
  5. Run the following command to complete your Red Hat Enterprise Virtualization Manager setup:
    # engine-setup --offline --config-append=rhevm-setup-answers
You now have a Red Hat Enterprise Virtualization Manager. To finalize the hosted-engine deployment, return to Step 12 "Synchronizing the Host and the Manager" of the procedure in Section 3.4, “Configuring the Self-Hosted Engine”.

Important

SSH is not enabled by default on the RHEV-M Virtual Appliance. You can enable SSH by accessing the Red Hat Enterprise Virtualization Manager virtual machine through the SPICE or VNC console. Edit /etc/ssh/sshd_config and change the following two options to yes:
  • PasswordAuthentication
  • PermitRootLogin