Skip to content

Instantly share code, notes, and snippets.

@n8felton
Created May 21, 2014 19:52
Show Gist options
  • Save n8felton/73a498289340bb494900 to your computer and use it in GitHub Desktop.
Save n8felton/73a498289340bb494900 to your computer and use it in GitHub Desktop.
ESXi SSH Upgrade
# Enable SSH
# Configuration > Security Profile > Services > Properties > SSH > Options... > Start
esxcli system maintenanceMode set --enable true
esxcli system maintenanceMode get
esxcli network firewall ruleset set -e true -r httpClient
export PROFILE=$(esxcli software sources profile list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml | grep "standard" | sort | tail -n 1 | cut -d' ' -f 1)
esxcli software profile update -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p $PROFILE
esxcli network firewall ruleset set -e false -r httpClient
esxcli system shutdown reboot --reason "Updating to $PROFILE"
esxcli system maintenanceMode set --enable false
esxcli system maintenanceMode get
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment