How to Upgrade ESXi 6.0 to 6.5 via CLI
Update your VCSA(vCenter Server Appliance) before your ESXi
# esxcli network firewall ruleset set -e true -r httpClient
# esxcli software sources profile list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot
-index.xml | grep -i ESXi-6
# esxcli software profile update -p ESXi-6.5.0-20170404001-standard -d https://hostupdate.vmware.com/software/
VUM/PRODUCTION/main/vmw-depot-index.xml
# esxcli network firewall ruleset set -e false -r httpClient
# reboot
after reboot, your ESXi is upgraded.
# vmware -vl
VMware ESXi 6.5.0 build-5310538
VMware ESXi 6.5.0 GA