ESXiをZipファイルでアップデートする

目次

いつもコマンドを忘れて調べるけど、なかなか見つけられないので、まとめてメモ

はじめに

  1. WebUIもしくはコンソールからSSHを有効にする。 コンソールの場合は、F2 -> ログイン -> Troubleshooting Options -> Enable SSH

  2. datastoreにzipをアップロード

確認作業

esxcli software sources profile list -d /vmfs/volumes/ds_hgst1t/depot/VMware-ESXi-7.0U1d-17551050-depot.zip

# 実行結果
Name                           Vendor        Acceptance Level  Creation Time        Modification Time
-----------------------------  ------------  ----------------  -------------------  -----------------
ESXi-7.0U1d-17551050-standard  VMware, Inc.  PartnerSupported  2021-02-01T18:29:07  2021-02-01T18:29:07
ESXi-7.0U1d-17551050-no-tools  VMware, Inc.  PartnerSupported  2021-02-01T18:29:08  2021-02-01T18:29:08
esxcli software sources profile get -d /vmfs/volumes/ds_hgst1t/depot/VMware-ESXi-7.0U1d-17551050-depot.zip -p ESXi-7.0U1d-17551050-standard

メンテナンスモードに移行

# 起動しているVM一覧を取得してシャットダウンしていく
esxcli vm process list
esxcli vm process kill -t soft -w <World ID>

# メンテナンスモードに
esxcli system maintenanceMode set --enable true

# なっていることを確認
esxcli system maintenanceMode get
# 結果が Enabled になっていればOK

Zipを適用

esxcli software profile update -d /vmfs/volumes/ds_hgst1t/depot/VMware-ESXi-7.0U1d-17551050-depot.zip -p ESXi-7.0U1d-17551050-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_cpu-microcode_7.0.1-0.30.17551050, VMware_bootbank_crx_7.0.1-0.30.17551050, ..... # たくさん出る

Reboot Required: trueということなのでrebootコマンドで再起動

後始末

メンテナンスモードを解除

esxcli system maintenanceMode set --enable=false
esxcli system maintenanceMode get
# 結果が Disabled になっていればOK