@Shiraira6 月前

06/19
19:55
技术杂谈

不需要镜像,ESXi在线升级更新

之前找网上的教程,都是手动把补丁放到datastore里然后打命令升级,十分不便
前两天偶然发现 VMware ESXi Patch Tracker 这个网站,点击相应的 Imageprofile 的名字,例如 ESXi-8.0U2c-23825572-standard ,会弹出一个小窗口,上面写着类似以下文字的内容。

# Cut and paste these commands into an ESXi shell to update your host with this Imageprofile
# See the Help page for more instructions
#
esxcli network firewall ruleset set -e true -r httpClient
esxcli software profile update -p ESXi-8.0U2c-23825572-standard \
-d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml
esxcli network firewall ruleset set -e false -r httpClient
#
# Reboot to complete the upgrade

想必聪明的各位已经知道怎么使用了
唯一的问题是直接访问 hostupdate.vmware.com 的速度很慢,需要自己想办法解决

注意:有时升级会报告[MemoryError] Please refer to the log file for more details.错误,增大python脚本的内存限制即可

esxcli system settings advanced set -o /VisorFS/VisorFSPristineTardisk -i 0
cp /usr/lib/vmware/esxcli-software /usr/lib/vmware/esxcli-software.bak
sed -i 's/mem=300/mem=500/g' /usr/lib/vmware/esxcli-software.bak
mv /usr/lib/vmware/esxcli-software.bak /usr/lib/vmware/esxcli-software -f
esxcli system settings advanced set -o /VisorFS/VisorFSPristineTardisk -i 1

(方案来源:Quick Tip – Using ESXCLI to upgrade ESXi 8.x throws MemoryError or Got no data from process

不需要镜像,ESXi在线升级更新