VMware ESXi 命令行快速升级指导

VMware ESXi 命令行快速升级指导

在没有vCenter的情况下,可以使用系统自带的 esxcli 命令进行快速升级,可以在没有网络的情况下可以下载到离线升级包通过上传到 datastore 然后运行下面的命令进行升级 , 在有网络的情况下可以使用在线的方式进行快速升级,具体请参考下面的命令.

升级过程示例,这里以目标版本升级到 ESXi-7.0U3e-19898904-standard 为例;

在线版,参考以下命令过程;

# 设置防火墙策略,允许HTTP客户端
esxcli network firewall ruleset set -e true -r httpClient
# 查看当前版本
esxcli network firewall ruleset set -e true -r httpClient
# 执行在线升级 (目标版本 ESXi-7.0U3e-19898904-standard )
 esxcli software profile update -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p ESXi-7.0U3e-19898904-standard
# 恢复防火墙策略
esxcli network firewall ruleset set -e false -r httpClient
# 重启ESXi 以完成升级
reboot

开启HTTP客户端防火墙策略

esxcli network firewall ruleset set -e true -r httpClient

获取本机Profile版本

esxcli software profile get

获取Profile版本

提取在线提供的Profile版本

esxcli software sources profile list --depot=https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml | grep -i ESXi-7.0U

获取本地 Profile 版本

esxcli software sources profile list --depot=/vmfs/volumes/datastore1/VMware-ESXi-7.0U3e-19898904-depot.zip

执行升级

执行在线升级

esxcli software profile update -p ESXi-7.0U3e-19898904-standard -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml

执行本地升级

esxcli software profile update --depot=/vmfs/volumes/datastore1/VMware-ESXi-7.0U3e-19898904-depot.zip -profile=ESXi-7.0U3e-19898904-standard

执行强制升级

esxcli software profile update -p ESXi-7.0U3e-19898904-standard -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml --no-hardware-warning

更新的时候,在不受支持的硬件上(常见的是老型号的CPU升级的时候会有报错)添加 --no-hardware-warning 参数即可解决无法升级的问题.

恢复防火墙策略

esxcli network firewall ruleset set -e false -r httpClient

猜你喜欢

转载自blog.csdn.net/weixin_43846408/article/details/125701179