目录
1、使用 ESXCLI 安装更新
1)在 VMware vSphere Infrastructure with vCenter 环境中,推荐使用 VMware Update Manager 或 VMware Lifecycle Manager 升级 ESXi Host。
2)确认 ESXi Host 版本:

或使用命令:
vmware -v
3)登录 VMWare 更新下载网站: VMWare Patch Download
https://my.vmware.com/group/vmware/patch
4)选择 ESXi (Embedded and Installable),和相应的 ESXi Build,单击 Search。下载最新的更新文件(以下图示为 ESXi670-202207001.zip)。

5)使用 Datastore Browser 复制更新文件到 ESXi Host 可访问的 Datastore 中。
6)使用 SSH 连接到 ESXi Host,将主机切换到维护模式下:
esxcli system maintenanceMode set --enable=true
7)安装更新:
esxcli software vib update --depot /vmfs/volumes/datastore1/update/ESXi670-202207001.zip
相应 PowerCLI 命令:
Install-VMHostPatch -HostPath /vmfs/volumes/datastore1/update/ESXi670-202207001.zip
8)重启主机:
reboot -f
9)使用 SSH 连接到 ESXi Host,将主机退出维护模式:
esxcli system maintenanceMode set --enable=false
10)确认 ESXi Host 版本:
vmware -v
2、使用 ESXCLI 升级 ESXi 版本
1)事前准备:
- 充分理解 VMware Compatibility Guide 和 VMware Product Interoperability Matrix 内容。
- 先升级 VCSA,再升级 ESXi。
方法一:离线升级
2)打开 VMWare 产品下载网站:
3)在 Custom ISOs 中,下载与服务器类型一致的镜像文件:

4)选择 HPE Custom Image for ESXi 7.0 U3 Offline Bundle,单击 Download Now(以下图示为 VMware-ESXi-7.0.3-20036589-HPE-703.0.0.10.9.1.5-Jul2022-depot.zip):

4)使用 Datastore Browser 复制镜像文件到 ESXi Host 可访问的 Datastore 中。
5)显示镜像文件中可用的 Profiles:
esxcli software sources profile list -d /vmfs/volumes/datastore1/update/VMware-ESXi-7.0.3-20036589-HPE-703.0.0.10.9.1.5-Jul2022-depot.zip
以上显示为:HPE-Custom-AddOn_703.0.0.10.9.1-5
6)连接到 ESXi Host,将主机切换到维护模式下:
esxcli system maintenanceMode set --enable=true
7)升级 ESXi 版本:
esxcli software profile update -d /vmfs/volumes/datastore1/update/VMware-ESXi-7.0.3-20036589-HPE-703.0.0.10.9.1.5-Jul2022-depot.zip -p HPE-Custom-AddOn_703.0.0.10.9.1-5 --no-hardware-warning
8)重启主机:
reboot -f
9)使用 SSH 连接到 ESXi Host,将主机退出维护模式:
esxcli system maintenanceMode set --enable=false
10)确认 ESXi Host 版本:
vmware -v
11)安装 vSphere License,配置 Inactivity Timeout 等。
方法二:在线升级
2)设置 ESXi Firewall:
esxcli network firewall ruleset set -e true -r httpClient
3)获取可用的 ESXi 7.0 Profiles 列表:
esxcli software sources profile list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml | grep -i ESXi-7.0
4)升级 ESXi 版本:
esxcli software profile update -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p HPE-Custom-AddOn_703.0.0.10.9.1-5 --no-hardware-warning
5)设置 ESXi Firewall:
esxcli network firewall ruleset set -e false -r httpClient
本文介绍了如何通过命令行工具ESXCLI在VMWare环境中更新和升级ESXi主机。首先,详细阐述了使用ESXCLI进行安装更新的步骤,包括检查当前版本、下载更新文件、进入维护模式、安装更新和重启主机。其次,讨论了升级ESXi版本的方法,包括离线和在线两种方式,并详细列举了每个步骤,涉及下载镜像、切换维护模式、升级操作及验证版本。



2421

被折叠的 条评论
为什么被折叠?



