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.
- 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.
Register your system with the Content Delivery Network, entering your Customer Portal user name and password when prompted:
# subscription-manager registerNote
If you are using an IPv6 network, use an IPv6 transition mechanism to access the Content Delivery Network and subscription manager.
Red Hat Virtualization Managersubscription pool and record the pool ID:
# subscription-manager list --available
Use the pool ID to attach the subscription to the system:
# subscription-manager attach --pool=pool_idNote
To view currently attached subscriptions:
# subscription-manager list --consumed
To list all enabled repositories:
# dnf repolist
Configure the 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.3-for-rhel-8-x86_64-rpms
# dnf module -y enable pki-deps
Enable version 12 of the
# dnf module -y enable postgresql:12
Synchronize installed packages to update them to the latest available versions.
# dnf distro-sync --nobest
For information on modules and module streams, see the following sections in Installing, managing, and removing user-space components
Configuring the Offline Repository
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
vsftpdon the intended Manager machine:
# dnf install vsftpd
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.conffile and change the values for
Start the vsftpd service, and ensure the service starts on boot:
# systemctl start vsftpd.service # systemctl enable vsftpd.service
Create a firewall rule to allow FTP service and reload the
firewalldservice to apply changes:
# firewall-cmd --permanent --add-service=ftp # firewall-cmd --reload
Red Hat Enterprise Linux 8 enforces SELinux by default, so configure SELinux to allow FTP access:
# setsebool -P allow_ftpd_full_access=1
Create a sub-directory inside the
/var/ftp/pub/directory, where the downloaded packages are made available:
# mkdir /var/ftp/pub/rhvrepo
Download packages from all configured software repositories to the
rhvrepodirectory. 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.
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
baseurlwith 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 Section 3.3, “Installing and Configuring the Red Hat Virtualization Manager”. Packages are installed from the local repository, instead of from the Content Delivery Network.
- 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
Ensure you have
yum-utils-4.0.8-3.el8.noarchor higher installed so reposync correctly downloads all the packages. For more information, see Create a local repo with Red Hat Enterprise Linux 8.