Appendix B. Installing RHV hypervisors from a local repository


If your system uses a private Red Hat Virtualization (RHV) environment, but without Red Hat Satellite, you might need to install RHV hypervisors (RHV-H) from a repository hosted on a local RHEL system instead of the Red Hat hosted Content Delivery Network (CDN).

Procedure

  1. On the system hosting the offline repository, create a file named /etc/yum.repos.d/rhvh-mirror.repo with contents similar to the lines that follow:

    [rhvh-4-for-rhel-8-x86_64-rpms]
    name = Red Hat Virtualization Host for RHEL 8 x86_64 (RPMs)
    baseurl = https://cdn.redhat.com/content/dist/layered/rhel8/x86_64/rhvh/4/os
    enabled = 0
    gpgcheck = 1
    gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
    sslverify = 1
    sslcacert = /etc/rhsm/ca/redhat-uep.pem
    metadata_expire = 86400
    enabled_metadata = 1
    sslclientcert =
    sslclientkey =

    You must populate the sslclientcert and sslclientkey fields with full path names to the correct files containing the appropriate certificate and key. The /etc/pki/entitlement directory contains one or more pairs of certificate and key files, but only one pair contains the RHV-H entitlement you need.

  2. To find the certificate file:

    1. List all files in the /etc/pki/entitlement directory:

      # ls -al /etc/pki/entitlement/

      Output similar to the following is displayed:

      total 836
      drwxr-xr-x.  2 root root    202 May 28 15:18 .
      drwxr-xr-x. 15 root root    208 Apr 23  2020 ..
      -rw-r—​r--.  1 root root   3243 May 28 15:18 4522783034260408538-key.pem
      -rw-r—​r--.  1 root root 152622 May 28 15:18 4522783034260408538.pem
      -rw-r—​r--.  1 root root   3243 May 28 15:18 5659494963772844103-key.pem
      -rw-r—​r--.  1 root root 343394 May 28 15:19 5659494963772844103.pem
      -rw-r—​r--.  1 root root   3243 May 23 13:19 645832581386032208-key.pem
      -rw-r—​r--.  1 root root 343389 May 23 13:19 645832581386032208.pem
      #
    2. Use the rct cat-cert command on each certificate in order to find the one that contains the RHV-H entitlement:

      # cd /etc/pki/entitlement/
      # rct cat-cert 5659494963772844103.pem | grep rhvh/4/ | grep URL

      Output similar to the following is displayed:

              URL: /content/beta/rhel/server/7/$basearch/rhvh/4/os
              URL: /content/dist/rhel/server/7/7Server/$basearch/rhvh/4/os
              URL: /content/beta/layered/rhel8/x86_64/rhvh/4/os
              URL: /content/dist/layered/rhel8/x86_64/rhvh/4/os
  3. Identify the correct certificate and fill in the sslclientcert and sslclientkey values in the previously mentioned .repo file:

    sslclientcert = /etc/pki/entitlement/5659494963772844103.pem
    sslclientkey = /etc/pki/entitlement/5659494963772844103-key.pem
  4. Run the reposync command in the appropriate directory:

    1. Use the 'pwd' command to determine the correct path:

      # pwd

      Output similar to the following is displayed:

      /home/test/rhvh-reposync
    2. Run the reposync command:

      # reposync --repo rhvh-4-for-rhel-8-x86_64-rpms

      Output similar to the following is displayed:

      Updating Subscription Management repositories.
      Red Hat Virtualization Host for RHEL 8 x86_64 (RPMs)                             11 kB/s | 4.0 kB     00:00
      Red Hat Virtualization Host for RHEL 8 x86_64 (RPMs)                            272 kB/s | 291 kB     00:01
      .
      .
      .
      (193/194): redhat-virtualization-host-image-update-4.4.5-20210330.0.el8_3.noarc 5.4 MB/s | 822 MB     02:30
      (194/194): rhvm-appliance-4.4-20210310.0.el8ev.x86_64.rpm                       5.6 MB/s | 1.5 GB     04:34
  5. Check the certificate and key file pairs each time you run the reposync command because the Subscription Manager subsystem periodically regenerates them.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.