Appendix A. Configuring a Local Repository for Offline Red Hat Virtualization Manager Installation

To install Red Hat Virtualization Manager on a system that does not have a direct connection to the Content Delivery Network, download the required packages on a system that has internet access, then create a repository that can be shared with the offline Manager machine. The system hosting the repository must be connected to the same network as the client systems where the packages are to be installed.

Prerequisites

  • A Red Hat Enterprise Linux 8 Server installed on a system that has access to the Content Delivery Network. This system downloads all the required packages, and distributes them to your offline systems.
  • A large amount of free disk space available. This procedure downloads a large number of packages, and requires up to 50GB of free disk space.

Begin by enabling the Red Hat Virtualization Manager repositories on the online system:

Enabling the Red Hat Virtualization Manager Repositories

You need to log in and register the online machine with Red Hat Subscription Manager, attach the Red Hat Virtualization Manager subscription, and enable the 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:

    # dnf repolist
  4. Configure the repositories:

    # subscription-manager repos \
        --disable='*' \
        --enable=rhel-8-for-x86_64-baseos-eus-rpms \
        --enable=rhel-8-for-x86_64-appstream-eus-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=rhel-8-for-x86_64-appstream-tus-rpms \
        --enable=rhel-8-for-x86_64-baseos-tus-rpms
  5. Set the RHEL version to 8.6:

    # subscription-manager release --set=8.6
  6. Enable the pki-deps module.

    # dnf module -y enable pki-deps
  7. Enable version 12 of the postgresql module.

    # dnf module -y enable postgresql:12
  8. Enable version 14 of the nodejs module:

    # dnf module -y enable nodejs:14
  9. Synchronize installed packages to update them to the latest available versions.

    # dnf distro-sync --nobest

Additional resources

For information on modules and module streams, see the following sections in Installing, managing, and removing user-space components

Configuring the Offline Repository

  1. Servers that are not connected to the Internet can access software repositories on other systems using File Transfer Protocol (FTP). To create the FTP repository, install and configure vsftpd on the intended Manager machine:

    1. Install the vsftpd package:

      # dnf install vsftpd
    2. Enable ftp access for an anonymous user to have access to rpm files from the intended Manager machine, and to keep it secure, disable write on ftp server. Edit the /etc/vsftpd/vsftpd.conf file and change the values for anonymous_enable and write_enable as follows:

      anonymous_enable=YES
      write_enable=NO
    3. Start the vsftpd service, and ensure the service starts on boot:

      # systemctl start vsftpd.service
      # systemctl enable vsftpd.service
    4. Create a firewall rule to allow FTP service and reload the firewalld service to apply changes:

      # firewall-cmd --permanent --add-service=ftp
      # firewall-cmd --reload
    5. Red Hat Enterprise Linux 8 enforces SELinux by default, so configure SELinux to allow FTP access:

      # setsebool -P allow_ftpd_full_access=1
    6. Create a sub-directory inside the /var/ftp/pub/ directory, where the downloaded packages are made available:

      # mkdir /var/ftp/pub/rhvrepo
  2. Download packages from all configured software repositories to the rhvrepo directory. This includes repositories for all Content Delivery Network subscription pools attached to the system, and any locally configured repositories:

    # reposync -p /var/ftp/pub/rhvrepo --download-metadata

    This command downloads a large number of packages and their metadata, and takes a long time to complete.

  3. Create a repository file, and copy it to the /etc/yum.repos.d/ directory on the intended Manager machine.

    You can create the configuration file manually or with a script. Run the script below on the machine hosting the repository, replacing ADDRESS in the baseurl with the IP address or FQDN of the machine hosting the repository:

    #!/bin/sh
    
    REPOFILE="/etc/yum.repos.d/rhev.repo"
    echo -e " " > $REPOFILE
    
    for DIR in $(find /var/ftp/pub/rhvrepo -maxdepth 1 -mindepth 1 -type d);
    do
        echo -e "[$(basename $DIR)]"	>> $REPOFILE
        echo -e "name=$(basename $DIR)" >> $REPOFILE
        echo -e "baseurl=ftp://__ADDRESS__/pub/rhvrepo/`basename $DIR`" >> $REPOFILE
        echo -e "enabled=1" >> $REPOFILE
        echo -e "gpgcheck=0" >> $REPOFILE
        echo -e "\n" >> $REPOFILE
    done

Return to Configuring the Manager. Packages are installed from the local repository, instead of from the Content Delivery Network.

Troubleshooting

When running reposync, the following error message appears
No available modular metadata for modular package "package_name_from_module" it cannot be installed on the system
Solution
Ensure you have yum-utils-4.0.8-3.el8.noarch or higher installed so reposync correctly downloads all the packages. For more information, see Create a local repo with Red Hat Enterprise Linux 8.