Quantcast
Channel: VMware Japan Blog
Viewing all articles
Browse latest Browse all 972

ESXi 5.1 コマンドラインによるパッチ適用

$
0
0

2012 年 9 月 10 日にリリースされた VMware ESXi 5.1 (ESXi 5.1) ですが、既にいくつかのパッチがリリースされています。ESXi 5.1 に対するパッチの適用方法は VMware vSphere Update Manager を利用する等、いくつか方法がありますが、今回は esxcli コマンドによるパッチの適用についてご紹介させて頂きます。

1. パッチの入手

ESXi 5.1 のパッチは Product Patches のサイトからダウンロード可能で、2013/06/12 時点の ESXi 5.1 最新パッチは ESXi510-201305001 となります。ESXi のパッチはパッチリリース時点における ESXi が動作するのに必要な VIB ファイルを全て含める形(これをオフラインバンドルと呼びます)で配布されており、ESXi 5.1 GA 版(ESXi 5.1 最初のリリース、Build# 799733) に対して最新のパッチを適用した状態にするには、これまでにリリースされたパッチを順に適用する必要は無く、一番直近にリリースされたパッチを適用するだけで十分です。

2. パッチの適用

ESXi の起動イメージは、イメージプロファイルで管理されています。パッチには ESXi が起動するのに必要な VIB ファイルやイメージプロファイルが含まれていますので、パッチ適用はこのイメージプロファイルを指定して行ないます。

2-1. パッチ適用前の ESXi Version の確認


  ~ # esxcli system version get

  Product: VMware ESXi

  Version: 5.1.0

  Build: Releasebuild-799733

  Update: 0

2-2. ESXi5.1 GA 版の Profile 情報の確認

  ~ # esxcli software profile get

  ESXi-5.1.0-799733-standard

  Name: ESXi-5.1.0-799733-standard

  Vendor: VMware, Inc.

  Creation Time: 2013-03-18T18:49:38

  Modification Time: 2013-03-18T19:26:58

  Stateless Ready: True

  Description:

  The general availability release of VMware ESXi Server 5.1.0

  brings whole new levels of virtualization performance to

  datacenters and enterprises.

  VIBs: ata-pata-amd 0.3.10-3vmw.510.0.0.799733, ata-pata-atiixp 0.4.6-4vmw.510.0.0.799733,
  ata-pata-cmd64x 0.2.5-3vmw.510.0.0.799733, ata-pata-hpt3x2n 0.3.4-3vmw.510.0.0.799733,
  ata-pata-pdc2027x 1.0-3vmw.510.0.0.799733,…途中省略…, uhci-usb-uhci 1.0-3vmw.510.0.0.799733

2-3. パッチに登録されているプロファイルの確認

  ~ # esxcli software sources profile list -d /var/tmp/ESXi510-201305001.zip
  Name Vendor Acceptance Level
  ——————————- ———— —————-
  ESXi-5.1.0-20130504001-standard VMware, Inc. PartnerSupported
  ESXi-5.1.0-20130504001-no-tools VMware, Inc. PartnerSupported

  ここで、2 つあるプロファイルのうち、ESXi-5.1.0-20130504001-standard を使用します。
参考までに ESXi-5.1.0-20130304001-no-tools は、VMware Tools (tools-light vib) が含まれないプロファイルとなり、これを Auto Deploy 等の起動イメージ等で利用するとシステムの起動時間を短くできるといった利点があります。

2-4. パッチ適用のための事前検証

 esxcli コマンドの profile オプションには –dry-run オプションがあり、これで追加される VIB、削除される VIB、変更されない VIB、再起動の有無ができます。

  ~ # esxcli software profile update –dry-run -d /var/tmp/ESXi510-201305001.zip -p ESXi-5.1.0-20130504001-standard
  Update Result
  Message: Dryrun only, host not changed. The following installers will be applied: [BootBankInstaller, LockerInstaller]
  Reboot Required: true
  VIBs Installed: VMware_bootbank_esx-base_5.1.0-1.13.1117900, VMware_bootbank_esx-xserver_5.1.0-0.11.1063671,
  VMware_bootbank_ipmi-ipmi-si-drv_39.1-4vmw.510.1.12.1065491,…途中省略…, VMware_bootbank_uhci-usb-uhci_1.0-3vmw.510.0.0.799733

2-5. パッチの適用

  プロファイルの情報を使ってパッチを適用します。

  ~ # esxcli software profile update -d /var/tmp/ESXi510-201305001.zip -p ESXi-5.1.0-20130504001-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: VMware_bootbank_esx-base_5.1.0-1.13.1117900, VMware_bootbank_esx-xserver_5.1.0-0.11.1063671,
  VMware_bootbank_ipmi-ipmi-si-drv_39.1-4vmw.510.1.12.1065491,…途中省略…, VMware_bootbank_uhci-usb-uhci_1.0-3vmw.510.0.0.799733

  上記コマンド終了後、ESXi ホストの再起動を行うことでパッチ適用作業が完了します。

2-4. パッチ適用後の ESXi Version の確認

  ~ # esxcli system version get
  Product: VMware ESXi
  Version: 5.1.0
  Build: Releasebuild-1021289
  Update: 0

  ~ # esxcli system version get
   Product: VMware ESXi
   Version: 5.1.0
   Build: Releasebuild-1117900
   Update: 1

2-5. パッチ適用後のプロファイルの確認



  ~ # esxcli software profile get
  (Updated) ESXi-5.1.0-799733-standard
   Name: (Updated) ESXi-5.1.0-799733-standard
   Vendor: esxi
   Creation Time: 2013-06-12T06:58:50
   Modification Time: 2013-06-12T07:24:52
   Stateless Ready: True
   Description:

   2013-06-12T06:58:49.976056+00:00: The following VIBs are
   installed:
   scsi-megaraid-sas 5.34-4vmw.510.1.12.1065491
   ipmi-ipmi-si-drv 39.1-4vmw.510.1.12.1065491
   net-e1000e 1.1.2-3vmw.510.1.12.1065491
   esx-base 5.1.0-1.13.1117900
   net-bnx2x 1.61.15.v50.3-1vmw.510.0.11.1063671
   net-igb 2.1.11.1-3vmw.510.1.12.1065491
   net-ixgbe 3.7.13.6iov-10vmw.510.1.12.1065491
   misc-drivers 5.1.0-1.12.1065491
   net-tg3 3.123b.v50.1-1vmw.510.1.12.1065491
   esx-xserver 5.1.0-0.11.1063671
   tools-light 5.1.0-1.12.1065491
   net-bnx2 2.0.15g.v50.11-7vmw.510.1.12.1065491
   ———-
   The general availability release of VMware ESXi Server 5.1.0
   brings whole new levels of virtualization performance to
   datacenters and enterprises.

   VIBs: ata-pata-amd 0.3.10-3vmw.510.0.0.799733, ata-pata-atiixp 0.4.6-4vmw.510.0.0.799733,
    ata-pata-cmd64x 0.2.5-3vmw.510.0.0.799733,…途中省略…, uhci-usb-uhci 1.0-3vmw.510.0.0.799733

以上でパッチ適用作業は終了です。

3. まとめ

今回は、esxcli コマンドを使ったパッチ適用方法についてご紹介しました。パッチ適用時に、主に単独のドライバ VIB インストールに利用する install オプションを使い、下記のようにコマンドを実行すると、インストール後のイメージが予期せぬ VIB を含む(または削除された)物になる場合があります。

  ~ # esxcli software vib install / update -d /var/tmp/ESXi510-201305001.zip

特に個別にドライバをインストールしている環境や OEM 版 ESXi イメージがインストールされている環境に対して、install オプションを使用して作業を行うと、システムイメージが、パッチに含まれる VIB パッケージに入れ換わってしまいますので、標準のパッケージに含まれないドライバを必要とする NIC やストレージで構成されているシステムでは、パッチ適用後にネットワークやデータストアにアクセスできなくなるといった事態に陥ってしまいますのでご注意ください。

なお、esxcli コマンドを使ったホストのアップグレードについては、マニュアル、KB 等もご参照下さい。

参考マニュアル
vSphere のアップグレード
esxcli コマンドを使用した、ホストのアップグレード

vSphere Command-Line Interface Reference
esxcli software command

参考 KB
VMware Security Patching Guidelines for ESXi and ESX (2020972)
Image Profiles of ESXi 5.0 Hosts (2009231)
Correlating vCenter Server and ESXi/ESX host build numbers to update levels
 (1014508)


Viewing all articles
Browse latest Browse all 972

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>