This repository has been archived by the owner on Aug 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #55 from empovit/update-esxi
add ESXi upgrade option
- Loading branch information
Showing
4 changed files
with
124 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/sh | ||
# There is no bash on ESXi, only sh (but not a real sh, just busybox). | ||
# Determine the latest ESXi update here: | ||
# https://esxi-patches.v-front.de/ | ||
|
||
# SSH and Shell are enabled by default on Equinix Metal ESXi servers | ||
|
||
echo "Enabling swap" | ||
# Swap must be enabled on the datastore. Otherwise, the upgrade may fail with a "no space left" error. | ||
esxcli sched swap system set --datastore-enabled true | ||
esxcli sched swap system set --datastore-name datastore1 | ||
|
||
# Update to your specified version of ESXi in the variables.tf file | ||
vim-cmd /hostsvc/maintenance_mode_enter | ||
|
||
esxcli network firewall ruleset set -e true -r httpClient | ||
|
||
echo "Getting update file and updating" | ||
# The variable esxi_update_filename is in the variables.tf file | ||
esxcli software profile update -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p ${esxi_update_filename} | ||
|
||
esxcli network firewall ruleset set -e false -r httpClient | ||
|
||
vim-cmd /hostsvc/maintenance_mode_exit | ||
|
||
reboot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters