Jaybanuan's Blog

どうせまた調べるハメになることをメモしていくブログ

ESXi 6.7のパッチの適用手順

はじめに

ESXi 6.7にパッチを適用した際の作業記録を記しておく。 前提となるESXiホストの環境は以下とする。

項目 状態
バージョン 6.7 (パッチ未適用)
IPアドレス 192.168.8.20
ssh接続 enabled

ESXiはVMそのものは安定しているが、周辺ツールにバグが多い印象があり、パッチは適用しておきたい。 しかし、VMWare固有のモジュール管理の仕組みを理解する必要があり、少々ハードルが高い。

用語

VMWareのモジュール管理で利用される用語を理解しておく必要がある。

  • VIB (VMware Infrastructure Bundle)

  • プロファイル

    • 特定の構成のESXiであり、必要なVIBをグループ化したもの。 例えば、「標準のESXi」や「VMWare toolsを含まないESXi」など
  • デポ

    • ひとつ又は複数のプロファイルをまとめてzipファイルにしたもの。 いわゆる「パッチ」はこのzipファイルのこと。

より正確な定義については、以下を参照。

パッチのダウンロード

以下のWebサイトからパッチをダウンロード。

製品は「ESXi (Embedded and Installable)」で、バージョンは「6.7.0」で検索。 執筆時点の最新版はESXi670-201811001で、ESXi670-201811001.zipというファイル名でダウンロードされる。 ちなみに、ハードウェアベンダがプリインストールするものがEmbedded、ユーザがダウンロードしてインストールするものがInstallableらしい。

パッチをデータストアに転送

ここでは以下のようにscpで転送する。

$ scp ESXi670-201811001.zip root@192.168.8.20:/vmfs/volumes/datastore1

データストアブラウザを利用して転送してもよい。

ESXiホストにsshで接続

$ ssh root@192.168.8.20

現在のプロファイルの確認

$ esxcli software profile get
ESXi-6.7.0-8169922-standard
   Name: ESXi-6.7.0-8169922-standard
   Vendor: VMware, Inc.
   Creation Time: 2018-12-15T11:38:01
   Modification Time: 2018-12-15T11:38:31
   Stateless Ready: True
   Description: 
      
      The general availability release of VMware ESXi Server 6.7.0
      brings whole new levels of virtualization performance to
      datacenters and enterprises.

   VIBs: ata-libata-92 3.00.9.2-16vmw.670.0.0.8169922, (以下略)

ここでは、現在のプロファイルが「ESXi-6.7.0-8169922-standard」であることが分かる。

パッチの内容の確認

まずはパッチ(デポ)に含まれるプロファイルのリストを取得する。

$ esxcli software sources profile list -d /vmfs/volumes/datastore1/ESXi670-201811001.zip 
Name                             Vendor        Acceptance Level  Creation Time        Modification Time
-------------------------------  ------------  ----------------  -------------------  -------------------
ESXi-6.7.0-20181104001-no-tools  VMware, Inc.  PartnerSupported  2018-11-08T08:39:27  2018-11-08T08:39:27
ESXi-6.7.0-20181104001-standard  VMware, Inc.  PartnerSupported  2018-11-08T08:39:27  2018-11-08T08:39:27

名前がstandardで終わっているものが標準構成、no-toolsで終わっているものがVMWare tools (のISOイメージ?)を含まない構成。 プロファイルの命名規則などについては以下を参照。

今回は標準構成のESXi-6.7.0-20181104001-standardを適用することにする。 ESXi-6.7.0-20181104001-standardの詳細な内容は、以下のようにコマンドを実行することで確認できる。

$ esxcli software sources profile get -p ESXi-6.7.0-20181104001-standard -d /vmfs/volumes/datastore1/ESXi
670-201811001.zip
ESXi-6.7.0-20181104001-standard
   Acceptance Level: PartnerSupported
   Name: ESXi-6.7.0-20181104001-standard
   Vendor: VMware, Inc.
   Creation Time: 2018-11-08T08:39:27
   Modification Time: 2018-11-08T08:39:27
   Stateless Ready: True
   Description: 
      
      Updates ESXi 6.7 Image Profile-ESXi-6-7-0-20181104001-standard

   VIBs: ata-libata-92 3.00.9.2-16vmw.670.0.0.8169922, (以下略)

パッチの適用

まずは、メンテナンスモードに移行する。

$ vim-cmd hostsvc/maintenance_mode_enter

そして、プロファイルESXi-6.7.0-20181104001-standardを適用する。

$ esxcli software profile update -d /vmfs/volumes/datastore1/ESXi670-201811001.zip -p ESXi-6.7.0-20181104001-standard
Update Result
   Message: The update completed successfully, but the system needs to be rebooted for the changes to be effective.
   Reboot Required: true
   VIBs Installed: VMW_bootbank_bnxtroce_20.6.101.0-20vmw.670.1.28.10302608, (以下略)
   VIBs Removed: VMW_bootbank_brcmfcoe_11.4.1078.0-8vmw.670.0.0.8169922, (以下略)
   VIBs Skipped: VMW_bootbank_ata-libata-92_3.00.9.2-16vmw.670.0.0.8169922, (以下略)

ここで、出力結果で「Reboot Required: true」となっているので、リブートを実行する。

$ reboot

再度sshでESXiのホストに接続し、メンテナンスモードを解除する。

$ vim-cmd hostsvc/maintenance_mode_exit

確認

現在のプロファイルを表示して、アップデートされていることを確認する。

$ esxcli software profile get
(Updated) ESXi-6.7.0-20181104001-standard
   Name: (Updated) ESXi-6.7.0-20181104001-standard
   Vendor: VMware, Inc.
   Creation Time: 2018-12-16T17:42:02
   Modification Time: 2018-12-16T17:42:18
   Stateless Ready: True
   Description: 
      
      2018-12-16T17:42:01.737859+00:00: The following VIBs are
      installed:
        vmkusb        0.1-1vmw.670.1.28.10302608
        vsan  6.7.0-1.31.10720746
        (略)
        lsi-mr3       7.702.13.00-5vmw.670.1.28.10302608
        esx-ui        1.30.0-9946814
      ----------
      The general availability release of VMware ESXi Server 6.7.0
      brings whole new levels of virtualization performance to
      datacenters and enterprises.

   VIBs: ata-libata-92 3.00.9.2-16vmw.670.0.0.8169922, (以下略)

参考