While using esxcli commands to upgrade/update a host, one of the following errors may appear: (in this example ESXi 8.0 Update 3j)

Or

William Lam did provide at great post on this years ago:
Quick Tip – Using ESXCLI to upgrade ESXi 8.x throws MemoryError or Got no data from process
But as the updates getting bigger and BIGGER, we need to increase the memory limit further, so this I have tested and it works fine:
cp /usr/lib/vmware/esxcli-software /usr/lib/vmware/esxcli-software.bak
sed -i ‘s/mem=300/mem=900/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
(Reboot not required here)
Here we have configured ESXCLI memory limit from 300MB to 900MB.
Then we run the update again: (Here again update 3j in the example)
esxcli software profile update -p ESXi-8.0U3j-25429389-standard \ -d https://dl.broadcom.com/[Your_Download_Token]/PROD/COMP/ESX_HOST/main/vmw-depot-index.xml
And it completes 🙂




