Skip to content

Instantly share code, notes, and snippets.

@myst3k
Last active October 9, 2024 10:28
Show Gist options
  • Save myst3k/e2fc62bd7dceb933f54ddc17680cd12f to your computer and use it in GitHub Desktop.
Save myst3k/e2fc62bd7dceb933f54ddc17680cd12f to your computer and use it in GitHub Desktop.

Prerequsite, migrate, pause, or stop all running guests on system

1. check current version

esxcli system version get

2. put host in maintenance mode

vim-cmd /hostsvc/maintenance_mode_enter

3. enable http client

esxcli network firewall ruleset set -e true -r httpClient

4. find the latest vib to update

esxcli software sources profile list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml | grep -e "ESXi-6.5.0-.*[^s(4564106)]-standard" | sort -n | tail -1

5. Upgrade System ( Use profile which you received from previous command ),

5.1 (Option 1) run this if you want to install and update all vmware vibs while removing any 3rd party vibs
esxcli software profile install --ok-to-remove -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p ESXi-6.5.0-4564106-standard
5.2 (Option 2) run this if you want to update all vmware vibs while leavind 3rd party vibs alone
esxcli software profile update -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p ESXi-6.5.0-4564106-standard

6. (Optional) View progress through another console window

tail -f /var/log/esxupdate.log

7. (Optional) validate upgrade (use the same vib profile from the previous upgrade steps)

esxcli software profile validate -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p ESXi-6.5.0-4564106-standard

8. disable httpclient

esxcli network firewall ruleset set -e false -r httpClient

9. reboot server

reboot

10. exit maintenance mode

vim-cmd /hostsvc/maintenance_mode_exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment