Now that vSphere ESXi 4.1 is out and available for download here, I wanted to upgrade my home lab with the latest release. Whilst ISO’s got downloaded, I searched VMware KB for any tips on how to perform the upgrade and I found KB1022140: Upgrading ESX 4.0 to ESX 4.1
The KB article comes with a table which outlines what version of ESX/ESXi you can upgrade from, what upgrade package is necessary, and which utility can be used to perform the upgrade. Apparently from the table you cannot use the ESXUPDATE tool to upgrade from 4.0 to 4.1 doh!
I wasn’t convinced and wanted to try that out myself and surprisingly it works like a charm. So VMware please update your table as follow:)
Here is a video I created showing you all the steps to perform such upgrade.
There are three requirements prior the upgrade:
- First you have to download the ESXi 4.1 (upgrade ZIP from ESXi4.0) package from VMware,
- Secondly, you need to copy that zip package either to a shared storage accessible by your target ESX host, for example an NFS share, or either to the local /tmp folder of the target ESX host but I haven’t tested that option.
- And finally, you need to be allowed SSH in your target ESX host.
N.B. Personally I would recommend a shared datastore.
Now a summary of the steps:
- If you have a cluster and DRS is turned on, you just put your target ESX host in maintenance Mode: vim-cmd hostsvc/maintenance_mode_enter to evacuate (vMotion) the VMs on other cluster members.
- If you don’t run a cluster, you need to:
- Get a list of all registered VMs on that target ESX host: vim-cmd vmsvc/getallvms
- Then for each VM, get the power status: vim-cmd vmsvc/power.getstate
- Then for each powered-on VM, shut it down: vim-cmd vmsvc/power.shutdown
- And finally, issue the vim-cmd hostsvc/maintenance_mode_enter
- Once the target ESX host is in Maintenance Mode, you can deploy the upgrade:
- First check the packages: esxupdate –bundle=/vmfs/volumes/ < your datastoire here > /upgrade-from-ESXi4.0-to-4.1.0-0.0.260247-release.zip check
- Then run the update: esxupdate –bundle=/vmfs/volumes/ < your datastore here > /upgrade-from-ESXi4.0-to-4.1.0-0.0.260247-release.zip update
- Once the update is completed and before rebooting the host, you can exit the Maintenance Mode: vim-cmd hostsvc/maintenance_mode_exit
N.B. I would not recommend you exit the MM untill you validate the upgrade in vCenter for instance.
Most of the steps here are inspired from vm-help.com. You can accomplish many of the steps here by using the vCenter Client connected directly to the target ESX host but still the ESXUPDATE utility is CLI only!
To learn more about ESXUPDATE utility I would recommend you to read the ESX 4 Patch Management Guide.