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 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. Find the Red Hat Virtualization Manager subscription 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_id Note 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-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 Set the RHEL version to 8.6: # subscription-manager release --set=8.6 Enable the pki-deps module. # dnf module -y enable pki-deps Enable version 12 of the postgresql module. # dnf module -y enable postgresql:12 Enable version 14 of the nodejs module: # dnf module -y enable nodejs:14 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 Module streams Selecting a stream before installation of packages Resetting module streams Switching to a later stream 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 vsftpd on the intended Manager machine: Install the vsftpd package: # 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.conf file and change the values for anonymous_enable and write_enable as follows: anonymous_enable=YES write_enable=NO 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 firewalld service 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 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. 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 " " > USDREPOFILE for DIR in USD(find /var/ftp/pub/rhvrepo -maxdepth 1 -mindepth 1 -type d); do echo -e "[USD(basename USDDIR)]" >> USDREPOFILE echo -e "name=USD(basename USDDIR)" >> USDREPOFILE echo -e "baseurl=ftp://__ADDRESS__/pub/rhvrepo/`basename USDDIR`" >> USDREPOFILE echo -e "enabled=1" >> USDREPOFILE echo -e "gpgcheck=0" >> USDREPOFILE echo -e "\n" >> USDREPOFILE 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 .

Commands:
subscription-manager register
subscription-manager list --available
subscription-manager attach --pool= pool_id
subscription-manager list --consumed
dnf repolist
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
subscription-manager release --set=8.6
dnf module -y enable pki-deps
dnf module -y enable postgresql:12
dnf module -y enable nodejs:14
dnf distro-sync --nobest
dnf install vsftpd
anonymous_enable=YES write_enable=NO
systemctl start vsftpd.service systemctl enable vsftpd.service
firewall-cmd --permanent --add-service=ftp firewall-cmd --reload
setsebool -P allow_ftpd_full_access=1
mkdir /var/ftp/pub/rhvrepo
reposync -p /var/ftp/pub/rhvrepo --download-metadata
#!/bin/sh REPOFILE="/etc/yum.repos.d/rhev.repo" echo -e " " > USDREPOFILE for DIR in USD(find /var/ftp/pub/rhvrepo -maxdepth 1 -mindepth 1 -type d); do echo -e "[USD(basename USDDIR)]" >> USDREPOFILE echo -e "name=USD(basename USDDIR)" >> USDREPOFILE echo -e "baseurl=ftp://__ADDRESS__/pub/rhvrepo/`basename USDDIR`" >> USDREPOFILE echo -e "enabled=1" >> USDREPOFILE echo -e "gpgcheck=0" >> USDREPOFILE echo -e "\n" >> USDREPOFILE done