부록 B. 로컬 리포지토리에서 RHV 하이퍼바이저 설치

시스템에서 프라이빗 RHV(Red Hat Virtualization) 환경을 사용하지만 Red Hat Satellite가 없는 경우 Red Hat 호스팅 CDN(Content Delivery Network) 대신 로컬 RHEL 시스템에서 호스팅되는 리포지토리에서 RHV-H(RHV-H)를 설치해야 할 수 있습니다.

절차

  1. 오프라인 리포지토리를 호스팅하는 시스템에서 다음 행과 유사한 내용이 있는 /etc/yum.repos.d/rhvh-mirror.repo 라는 파일을 만듭니다.

    [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 =

    sslclientcertsslclientkey 필드에 적절한 인증서와 키가 포함된 올바른 파일의 전체 경로 이름으로 채워야 합니다. /etc/pki/entitlement 디렉터리에는 하나 이상의 인증서와 키 파일 쌍이 포함되지만 필요한 RHV-H 인타이틀먼트는 한 쌍만 포함됩니다.

  2. 인증서 파일을 찾으려면 다음을 수행하십시오.

    1. /etc/pki/entitlement 디렉토리에 있는 모든 파일을 나열합니다.

      # ls -al /etc/pki/entitlement/

      다음과 유사한 출력이 표시됩니다.

      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. RHV-H 인타이틀먼트가 포함된 인증서를 찾으려면 각 인증서에 rct cat-cert 명령을 사용합니다.

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

      다음과 유사한 출력이 표시됩니다.

              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. 올바른 인증서를 확인하고 이전에 언급한 .repo 파일에서 sslclientcertsslclientkey 값을 작성합니다.

    sslclientcert = /etc/pki/entitlement/5659494963772844103.pem
    sslclientkey = /etc/pki/entitlement/5659494963772844103-key.pem
  4. 적절한 디렉터리에서 reposync 명령을 실행합니다.

    1. 'pwd' 명령을 사용하여 올바른 경로를 결정합니다.

      # pwd

      다음과 유사한 출력이 표시됩니다.

      /home/test/rhvh-reposync
    2. reposync 명령을 실행합니다.

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

      다음과 유사한 출력이 표시됩니다.

      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. Subscription Manager 하위 시스템에서 주기적으로 다시 생성되므로 reposync 명령을 실행할 때마다 인증서 및 키 파일 쌍을 확인합니다.