可以使用儲存在軟體存放庫中的映像設定檔升級或更新主機,該軟體存放庫可以透過 URL 或在離線 ZIP 存放庫中存取。
您可以使用 esxcli software profile update 或 esxcli software profile install 命令來升級或更新 ESXi 主機。若要瞭解升級與更新之間的差異,請參閱 vSphere 升級、修補程式、更新及移轉之間的差異。
升級或更新主機時,esxcli software profile update 或 esxcli software profile install 命令會將完整映像設定檔的更高 (主要或次要) 版本套用至該主機。此操作完成並重新開機後,該主機可以加入同一更高版本的 vCenter Server 環境中。
esxcli software profile update 命令會將 ESXi 主機映像的完整內容帶到和使用 ISO 安裝程式對應的升級方式的相同層級。但是,ISO 安裝程式會預先升級檢查是否有潛在問題,而 esxcli 升級方式則不會。ISO 安裝程式會檢查主機,以確保其具有足夠的記憶體用於升級,且未連接不支援的裝置。如需 ISO 安裝程式及其他 ESXi 升級方式的詳細資訊,請參閱 ESXi 主機升級程序概觀。
esxcli software profile update --depot=depot_location --profile=profile_name
。
使用 --server=server_name 指定目標伺服器時,該伺服器將提示您輸入使用者名稱和密碼。支援其他連線選項,如組態檔或工作階段檔案。如需連線選項的清單,請參閱 vSphere Command-Line Interface 入門,或在 vCLI 命令提示字元處執行 esxcli --help。
透過 update 和 install 命令選項,您可以執行試執行,指定特定的 VIB,略過接受程度驗證等。請勿略過對生產系統的驗證。請參閱 vSphere Command-Line Interface 參考。
必要條件
-
安裝 vCLI 或部署 vSphere Management Assistant (vMA) 虛擬機器。請參閱vSphere Command-Line Interface 入門。若要進行疑難排解,請在 ESXi Shell中執行 esxcli 命令。
-
確定更新是否需要將主機置於維護模式或重新開機。如有必要,請將主機置於維護模式。
- 如果更新需要重新開機,並且主機屬於 VMware HA 叢集,請從叢集中移除該主機或在叢集上停用 HA。