VMware ESXi Command Line Quick Upgrade Guide

VMware ESXi Command Line Quick Upgrade Guide

In the absence of vCenter, you can use esxclithe command to perform a quick upgrade. You can download the offline upgrade package when there is no network and upload it to the datastore and then run the following command to upgrade. In the case of a network, you can Use the online method to quickly upgrade, please refer to the following commands for details.

An example of the upgrade process, here the target version is upgraded to ESXi-7.0U3e-19898904-standardas an example ;

Online version, refer to the following command process;

# 设置防火墙策略,允许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

Enable the HTTP client firewall policy

esxcli network firewall ruleset set -e true -r httpClient

Get the local Profile version

esxcli software profile get

Get Profile Version

Extract the Profile version available online

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

Get the local Profile version

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

perform upgrade

Perform an online upgrade

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

Perform a local upgrade

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

Perform a forced upgrade

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

When updating, add the --no-hardware-warning parameter on unsupported hardware (commonly, an error will be reported when the old model CPU is upgraded) to solve the problem of not being able to upgrade.

restore firewall policy

esxcli network firewall ruleset set -e false -r httpClient

Guess you like

Origin blog.csdn.net/weixin_43846408/article/details/125701179