VMware ESXiへのパッチ適用

前提条件


パッチ適用準備

メンテナスモードに入る

# esxcli system maintenanceMode set --enable=true
# esxcli system maintenanceMode get

システムのバージョンを確認する

# esxcli system version get
# esxcli software profile get

ローカルファイルを使ったパッチ適用

パッチのアップロード

パッチを入手して/vmfs/volumes/disk0/patchに置きます。

パッチのプロファイルを確認する

# esxcli software sources profile list -d /vmfs/volumes/disk0/patch/ESXi510-201307001.zip

パッチを適用する

# esxcli software profile install -d /vmfs/volumes/disk0/patch/ESXi510-201307001.zip -p ESXi-5.1.0-20130704001-standard

VMwareから直接パッチ適用

HTTPアクセスを有効にする

# esxcli network firewall ruleset set --ruleset-id=httpClient --enabled=true
# esxcli network firewall ruleset list | grep httpClient

パッチのプロファイルを確認する

# esxcli software sources profile list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml

パッチを適用する

# esxcli software profile install -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p ESXi-5.1.0-20130704001-standard

HTTPアクセスを無効にする

# esxcli network firewall ruleset set --ruleset-id=httpClient --enabled=false
# esxcli network firewall ruleset list | grep httpClient

パッチの有効化

リブートする

# esxcli system shutdown reboot -r "patch update ESXi510-201307001"

システムのバージョンを確認する

# esxcli system version get
# esxcli software profile get

メンテナスモードを終了する

# esxcli system maintenanceMode set --enable=false
# esxcli system maintenanceMode get

ESXi 5.5 Update 3b への適用例

プロファイルの確認

# esxcli software sources profile list -d /vmfs/volumes/disk0/patch/ESXi550-201601001.zip
Name                             Vendor        Acceptance Level
-------------------------------  ------------  ----------------
ESXi-5.5.0-20160104001-no-tools  VMware, Inc.  PartnerSupported
ESXi-5.5.0-20160104001-standard  VMware, Inc.  PartnerSupported

# esxcli software sources profile list -d /vmfs/volumes/disk0/patch/ESXi550-201602001.zip
Name                             Vendor        Acceptance Level
-------------------------------  ------------  ----------------
ESXi-5.5.0-20160204001-no-tools  VMware, Inc.  PartnerSupported
ESXi-5.5.0-20160204001-standard  VMware, Inc.  PartnerSupported

# esxcli software sources profile list -d /vmfs/volumes/disk0/patch/ESXi550-201608001.zip
Name                              Vendor        Acceptance Level
--------------------------------  ------------  ----------------
ESXi-5.5.0-20160804001-no-tools   VMware, Inc.  PartnerSupported
ESXi-5.5.0-20160801001s-no-tools  VMware, Inc.  PartnerSupported
ESXi-5.5.0-20160804001-standard   VMware, Inc.  PartnerSupported
ESXi-5.5.0-20160801001s-standard  VMware, Inc.  PartnerSupported

# esxcli software sources profile list -d /vmfs/volumes/disk0/patch/ESXi550-201609001.zip
Name                              Vendor        Acceptance Level
--------------------------------  ------------  ----------------
ESXi-5.5.0-20160901001s-standard  VMware, Inc.  PartnerSupported
ESXi-5.5.0-20160904001-no-tools   VMware, Inc.  PartnerSupported
ESXi-5.5.0-20160904001-standard   VMware, Inc.  PartnerSupported
ESXi-5.5.0-20160901001s-no-tools  VMware, Inc.  PartnerSupported

# esxcli software sources profile list -d /vmfs/volumes/disk0/patch/ESXi550-201612001.zip
Name                              Vendor        Acceptance Level
--------------------------------  ------------  ----------------
ESXi-5.5.0-20161201001s-standard  VMware, Inc.  PartnerSupported
ESXi-5.5.0-20161204001-no-tools   VMware, Inc.  PartnerSupported
ESXi-5.5.0-20161204001-standard   VMware, Inc.  PartnerSupported
ESXi-5.5.0-20161201001s-no-tools  VMware, Inc.  PartnerSupported

# esxcli software sources profile list -d /vmfs/volumes/disk0/patch/ESXi550-201703001.zip
Name                              Vendor        Acceptance Level
--------------------------------  ------------  ----------------
ESXi-5.5.0-20170304001-standard   VMware, Inc.  PartnerSupported
ESXi-5.5.0-20170304001-no-tools   VMware, Inc.  PartnerSupported

上書きインストール

通常はこちら

# esxcli software profile install -d /vmfs/volumes/disk0/patch/ESXi550-201601001.zip -p ESXi-5.5.0-20160104001-standard
# esxcli software profile install -d /vmfs/volumes/disk0/patch/ESXi550-201602001.zip -p ESXi-5.5.0-20160204001-standard
# esxcli software profile install -d /vmfs/volumes/disk0/patch/ESXi550-201608001.zip -p ESXi-5.5.0-20160804001-standard
# esxcli software profile install -d /vmfs/volumes/disk0/patch/ESXi550-201609001.zip -p ESXi-5.5.0-20160904001-standard
# esxcli software profile install -d /vmfs/volumes/disk0/patch/ESXi550-201612001.zip -p ESXi-5.5.0-20161204001-standard
# esxcli software profile install -d /vmfs/volumes/disk0/patch/ESXi550-201703001.zip -p ESXi-5.5.0-20170304001-standard
# esxcli software profile install -d /vmfs/volumes/disk0/patch/ESXi550-201709001.zip -p ESXi-5.5.0-20170904001-standard
# esxcli software profile install -d /vmfs/volumes/disk0/patch/ESXi550-201801002.zip -p ESXi-5.5.0-20180103001-standard
# esxcli software profile install -d /vmfs/volumes/disk0/patch/ESXi550-201803001.zip -p ESXi-5.5.0-20180304001-standard

アップデートインストール

ESXi Customizerなどでドライバを組み込んでいる場合はこちら

# esxcli software profile update -d /vmfs/volumes/disk0/patch/ESXi550-201601001.zip -p ESXi-5.5.0-20160104001-standard
# esxcli software profile update -d /vmfs/volumes/disk0/patch/ESXi550-201602001.zip -p ESXi-5.5.0-20160204001-standard
# esxcli software profile update -d /vmfs/volumes/disk0/patch/ESXi550-201608001.zip -p ESXi-5.5.0-20160804001-standard
# esxcli software profile update -d /vmfs/volumes/disk0/patch/ESXi550-201609001.zip -p ESXi-5.5.0-20160904001-standard
# esxcli software profile update -d /vmfs/volumes/disk0/patch/ESXi550-201612001.zip -p ESXi-5.5.0-20161204001-standard
# esxcli software profile update -d /vmfs/volumes/disk0/patch/ESXi550-201703001.zip -p ESXi-5.5.0-20170304001-standard
# esxcli software profile update -d /vmfs/volumes/disk0/patch/ESXi550-201709001.zip -p ESXi-5.5.0-20170904001-standard
# esxcli software profile update -d /vmfs/volumes/disk0/patch/ESXi550-201801002.zip -p ESXi-5.5.0-20180103001-standard
# esxcli software profile update -d /vmfs/volumes/disk0/patch/ESXi550-201803001.zip -p ESXi-5.5.0-20180304001-standard

スクリプト

MODE="install"
#MODE="update"
PATCHDIR="/vmfs/volumes/disk0/patch"
INSTALL="esxcli software profile $MODE"

$INSTALL -d $PATCHDIR/ESXi550-201601001.zip -p ESXi-5.5.0-20160104001-standard
$INSTALL -d $PATCHDIR/ESXi550-201602001.zip -p ESXi-5.5.0-20160204001-standard
$INSTALL -d $PATCHDIR/ESXi550-201608001.zip -p ESXi-5.5.0-20160804001-standard
$INSTALL -d $PATCHDIR/ESXi550-201609001.zip -p ESXi-5.5.0-20160904001-standard
$INSTALL -d $PATCHDIR/ESXi550-201612001.zip -p ESXi-5.5.0-20161204001-standard
$INSTALL -d $PATCHDIR/ESXi550-201703001.zip -p ESXi-5.5.0-20170304001-standard
$INSTALL -d $PATCHDIR/ESXi550-201709001.zip -p ESXi-5.5.0-20170904001-standard
$INSTALL -d $PATCHDIR/ESXi550-201801002.zip -p ESXi-5.5.0-20180103001-standard
$INSTALL -d $PATCHDIR/ESXi550-201803001.zip -p ESXi-5.5.0-20180304001-standard