Azure VMで作ったRed Hat Enterprise Linux release 8.2 のyumが失敗する

yum updateしたらエラーが出た

```bash
# yum update
Failed to set locale, defaulting to C.UTF-8
Red Hat Enterprise Linux 8 for x86_64 - BaseOS - Extended Update Support from RHUI (RPMs)                                                          0.0  B/s |   0  B     00:02
Errors during downloading metadata for repository 'rhel-8-for-x86_64-baseos-eus-rhui-rpms':
  - Curl error (56): Failure when receiving data from the peer for https://rhui-3.microsoft.com/pulp/repos/content/eus/rhel8/rhui/8.2/x86_64/baseos/os/repodata/repomd.xml [OpenSSL                                                           SSL_read: error:14094415:SSL routines:ssl3_read_bytes:sslv3 alert certificate expired, errno 0]
  - Curl error (56): Failure when receiving data from the peer for https://rhui-2.microsoft.com/pulp/repos/content/eus/rhel8/rhui/8.2/x86_64/baseos/os/repodata/repomd.xml [OpenSSL                                                           SSL_read: error:14094415:SSL routines:ssl3_read_bytes:sslv3 alert certificate expired, errno 0]
  - Curl error (56): Failure when receiving data from the peer for https://rhui-1.microsoft.com/pulp/repos/content/eus/rhel8/rhui/8.2/x86_64/baseos/os/repodata/repomd.xml [OpenSSL                                                           SSL_read: error:14094415:SSL routines:ssl3_read_bytes:sslv3 alert certificate expired, errno 0]
Error: Failed to download metadata for repo 'rhel-8-for-x86_64-baseos-eus-rhui-rpms': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
```

こちらを参照

https://jpaztech.github.io/blog/vm/rhui-yum-update/#%E3%82%A8%E3%83%A9%E3%83%BC%E3%81%AE%E5%8E%9F%E5%9B%A0%E3%81%9D%E3%81%AE-3-%E3%82%AF%E3%83%A9%E3%82%A4%E3%82%A2%E3%83%B3%E3%83%88%E8%A8%BC%E6%98%8E%E6%9B%B8%E3%81%AE%E6%9C%9F%E9%99%90%E5%88%87%E3%82%8C

> 古い RHEL VM イメージを利用している際には、 TLS/SSL クライアント証明書の期限が切れているために、Azure RHUI に接続できない問題が発生することがあります。

なるほど証明書。
記事にあるコマンドを入力してみます。


```bash
# yum update -y --disablerepo='*' --enablerepo='*microsoft*'
Failed to set locale, defaulting to C.UTF-8
Microsoft Azure RPMs for RHEL8 Extended Update Support                                                                                                                                                       2.3 kB/s | 2.5 kB     00:01
Dependencies resolved.
=============================================================================================================================================================================================================================================
 Package                                                        Architecture                                     Version                                           Repository                                                           Size
=============================================================================================================================================================================================================================================
Upgrading:
 rhui-azure-rhel8-eus                                           noarch                                           2.2-485                                           microsoft-azure-rhel8-eus                                            14 k

Transaction Summary
=============================================================================================================================================================================================================================================
Upgrade  1 Package

Total download size: 14 k
Downloading Packages:
rhui-azure-rhel8-eus-2.2-485.noarch.rpm                                                                                                                                                                       42 kB/s |  14 kB     00:00
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                                         42 kB/s |  14 kB     00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                                                                                     1/1
  Upgrading        : rhui-azure-rhel8-eus-2.2-485.noarch                                                                                                                                                                                 1/2
  Running scriptlet: rhui-azure-rhel8-eus-2.2-485.noarch                                                                                                                                                                                 1/2
  Cleanup          : rhui-azure-rhel8-eus-2.2-198.noarch                                                                                                                                                                                 2/2
  Verifying        : rhui-azure-rhel8-eus-2.2-485.noarch                                                                                                                                                                                 1/2
  Verifying        : rhui-azure-rhel8-eus-2.2-198.noarch                                                                                                                                                                                 2/2
Installed products updated.

Upgraded:
  rhui-azure-rhel8-eus-2.2-485.noarch

Complete!
```

いけそう

```bash
# yum update
Failed to set locale, defaulting to C.UTF-8
Red Hat Enterprise Linux 8 for x86_64 - BaseOS - Extended Update Support from RHUI (RPMs)                                                                                                                     16 MB/s |  41 MB     00:02
Red Hat Enterprise Linux 8 for x86_64 - AppStream - Extended Update Support from RHUI (RPMs)                                                                                                                 8.9 MB/s |  23 MB     00:02
Last metadata expiration check: 0:00:05 ago on Mon May  1 11:39:55 2023.
Dependencies resolved.
Nothing to do.
Complete!
```

いけました。