I know – you must be thinking why would anyone want to upgrade a vSphere 4.0 environment to 4.1 when version 5.0 is out now. Well, I can think of a couple of reasons why one might think of doing that. One is the fact that many organisations are still not ready to move to version 5.0 as that forces them to replace their “classic” ESX hosts with their ESXi replacements. That, in most cases, means some tweaking of the way one monitors the hosts and possibly also of their scripted management processes – which could mean quite a lot of work for some organisations. Secondly, due to licensing changes, moving to version 5.0 currently might not be an option for some and upgrading to version 4.1, buys such organisations some time before they have to move to 5.0.
So, in case there is somebody out there, not quite ready to upgrade to 5.0 yet, I thought I should post the process I developed for my organisation to upgrade the entire infrastructure to 4.1 Update 1. The process is quite smooth and mostly automated (as it relies on VMware Update Manager for upgrading). It’s also transparent to the user – until you want to upgrade VMware Tools. With this introduction out-of-the-way, here is the entire process:
Scenario:
The organisation has a healthy vCenter/ESX 4.0 environment with one or more clusters. VMware Update Manager 4.0 is also installed and functioning normally, preferably on the vCenter server. Last night’s backups of vCenter and Update Manager servers ran OK and are secured. The process will do an “in-place” upgrade of the vCenter server. The vCenter Server 4.1 Update 1 ISO file (VMware-VIMSetup-all-4.1.0-345042.iso) and ESX 4.1 Upgrade ZIP file (upgrade-from-esx4.0-to-4.1-update01-348481.zip) have already been downloaded. Please note: This process should also work with 4.1 Update 2 for both products (released a couple of days ago on October 27th, 2011), although I haven’t tested it and the files required will be their updated counterparts.
vCenter Upgrade:
- Close any running instances of VI Client in the environment and make sure everyone is aware of the upgrade so that no one tries to manage the environment while the upgrade is in progress.
- Log into the vCenter as an administrator using the VI Client.
- Upload vCenter Server 4.1 Update 1 ISO to a datastore.
- Attach the vCenter Server 4.1 Update 1 ISO to the vCenter server.
- RDP into the vCenter server and log in as an administrator
- Copy the SSL folder (located in C:ProgramDataVMwareVMware VirtualCenter) to some secure place off the vCenter machine.
- Ensure that the nightly backup for vCenter server ran correctly and is secure.
- Go to the CDROM drive, double-click and on the splash screen, run the “Agent Preupgrade Check” tool. The tool checks for an updated database of checks before coming up with the Welcome screen. Click “Next” to continue.
- Under “DSN”, select “(32-bit) VMware vCenter” (or something similar) from the drop down list. Select “Use Windows Credentials” and click “Next”
- Select “Standard Mode” (default) on the next screen.
- Click “Run precheck” to run the test. Hopefully, it will come up with no errors. Click “View Report” to see the full report. If there are errors, please correct them manually and rerun the checker until all errors are removed.
- Click “Next” and then “Finish” to complete the test.
- On the splash screen, click “vCenter Server”.
- On the “Choose Setup Language”, keep the default “English (United States)” (if that’s the preferred language, otherwise change accordingly) and click “OK”
- The Welcome page informs you that an earlier version of vCenter Server is on the computer and will be upgraded to vCenter Server 4.1. Click “Next” to continue.
- Click “Next” on the EULA screen.
- On the license agreement page, select “I agree to the terms in the license agreement” and click “Next”.
- On “Database Options”, ensure that DSN mentions the vCenter instance (e.g. VMware vCenter) and click “Next”
- On “Database Upgrade Warning”, select “Upgrade existing vCenter Server database”. That will enable the tick box that should be selected, confirming that backups of databases and SSL folders have been taken.
- On the “vCenter Agent Upgrade” screen, keep the default “Automatic” and click “Next”
- On the “vCenter Server Service” screen, enter and confirm the password for the administrative account and click “Next”
- On the “Configure Ports” screen, accept the defaults and click “Next”
- On the “vCenter Server JVM Memory” screen, select the most suitable environment size and click “Next”
- Click “Install” to start the upgrade. The upgrade will take some time as the process upgrades the database, removes old files and install new files to complete the upgrade of vCenter. Click “Finish” when the process is completed.
- Run the vSphere Client. After login, it should detect that a newer client is available and will offer to “Run the installer”. Select that option and follow instructions (defaults) to upgrade the client. Repeat for all instances of client deployed in the environment.
- Login to the vCenter environment to check if the environment looks healthy. Click on the server name at the top of the tree and in the right-hand pane, it should say “ VMware vCenter Server, 4.1.0, 345043.
Update Manager Upgrade:
- Return to the installer splash screen and click “vCenter Update Manager”
- On the “Choose Setup Language”, keep the default “English (United States)” (if that’s the preferred language, otherwise change accordingly) and click “OK”
- The dialog box informs you that an earlier version of VMware vCenter Update Manager is already installed on the system and clicking OK will upgrade the system to version 4.1.0.6589. Click “OK” to continue.
- Click “Next” on the welcome screen.
- Click “Next” on the EULA screen.
- On the license agreement page, select “I agree to the terms in the license agreement” and click “Next”.
- On “vCenter Server Information”, check that FQDN of the server is in the “IP Address/Name” box. Enter the password for the administrative account and click “Next”
- On “Database Information”, make sure that the Upgrade Manager DSN is detected (should be VMware vCenterUM or whatever it was named when installed originally). Click “Next” to continue.
- On “Database Upgrade” screen, select “Yes, I want to upgrade my Update Manager database”. Tick the box that says “I have taken a backup of the existing Update Manager database” and click “Next”
- On the “VMware vCenter Update Manager Port Settings” screen, select the FQDN from the drop-down box if not selected. Accept the default port numbers and click “Next”
- On the “Ready to Install the Program” screen, click “Install”
- Click “OK” to the message about rebooting the server after the install is complete.
- Click “Finish” when complete.
- Close the splash screen and any other applications that might be open and reboot the server.
- Once the server is back, log in to it as the administrator and run the client that previously had the Update Manager plug-in installed.
- Click “Plug-ins”. In “Manage Plug-ins…” VMware vCenter Upgrade Manager plug-in should say version 4.1.0.6589. Click “Download and Install…” to upgrade the plug-in. Follow instructions (defaults) to complete the install.
ESX Server Upgrades:
- Map a network drive to the location where ESX 4.1 Upgrade ZIP file (upgrade-from-esx4.0-to-4.1-update01-348481.zip) is stored.
- Go to Home. Under “Solutions and Applications” select “Update Manager”
- Select “Host Upgrade Releases” and click “Import Upgrade Release…”.
- On “Select Upgrade Files”, click on “Browse” and browse to the location where ESX 4.1 Upgrade ZIP file (upgrade-from-esx4.0-to-4.1-update01-348481.zip) is stored and double-click it to select the file. Click “Next” to upload the file.
- This will take some time. Once uploaded successfully, click “Finish” to finish the upload process. Ensure that ESX 4.0.x column in the “VMware ESX/ESXi release 4.1.0 Update 1” row is ticked.
- At this point, it is recommended to have DRS enabled (Fully Aggressive) on the cluster (even if it is for the duration of the upgrade). This will allow for a fully automated upgrade process.
- Click on “Create Baseline…” in the “Baseline containing VMware ESX/ESXi release 4.1.0 Update 1 Upgrade Release” section.
- Give the baseline a descriptive name e.g. “Upgrade of ESX 4.0 Update 1 hosts to ESX 4.1 Update 1”. Optionally, give it a description as well. Click “Next” to continue.
- On “Upgrade Version”, “VMware ESX / ESXi release 4.1.0 Update 1” should already be there and selected. Click “Next” to continue.
- On “ESX Upgrade – COS VMDK Location”, click “Next” to continue.
- On “ESX Upgrade – Post-Upgrade Options”, click “Next” to continue.
- Click “Finish” to complete defining the baseline.
- Click on “Home” –> Inventory –> Hosts and Clusters
- Click on the ESX cluster that needs upgrading and find the “Update Manager” tab in the right-hand pane (scroll to the right if necessary) and click on it.
- Click “Attach…” and tick the baseline just created from the “Upgrade Baselines” section. Click “Attach”.
- The hosts falling under the scope of the upgrade baseline should appear in the “All Groups and Independent Baselines –> All –>All Applicable hosts. If correct, click the “Remediate…” button.
- On “Remediate Selection” screen, make sure all hosts are ticked and click “Next”
- On “End User License Agreement”, tick “I accept the terms and license agreement” and click “Next”
- On “ESX 4.x Upgrade”, click “Next”
- On “Host Remediation Options”, change “Retry delay” to 10 minutes, tick “Disable any removable media devices connected to the virtual machines on the host” and click “Next”
- On “Cluster Remediation Options”, tick “Disable High Availability admission control if it is enabled for any of the selected clusters” and click “Next”
- On “Ready to Complete”, click “Finish” to start the remediation process. Please be aware that following this, the baseline will find all servers in the cluster non-compliant and will start fixing it i.e. start the process of moving machines off (for DRS-enabled clusters), switching them to maintenance mode and upgrading the host before moving on to the next. Please make sure that you have enough resource available within the cluster to allow this activity to run seamlessly.
- The process should start moving the VMs around to free up ESX servers (for DRS-enabled clusters), switch them to maintenance mode and installing the new version on them. Under “Tasks” you should see Install, Check, Reboot Host etc. If the process doesn’t seem to start, check if removable media is attached to VM and detach in case there is any (sometimes the automated process doesn’t work). Also, for clusters without DRS, VMs will have to be moved manually to get the process working.
- During the upgrade process, the target host will look offline (grayed out) but after a while, it should come back to its usual self. Once that happens, you can click on the host name in the VI client and it should say “ VMware ESX, 4.1.0, 348481”. If health of the server looks OK, then bring it out of maintenance mode (if not already out of it). You may have to restart VI Client to see the refreshed state of remediation as sometimes it doesn’t refresh properly.
- Once an upgraded host is back, the process should start moving VMs to it. Once the move completes, the upgrade process repeats for the next host. The whole thing continues until all hosts in the cluster have been upgraded.
Post-Upgrade Considerations:
- Check if all VMs are on the hosts they are supposed to be on. If not, migrate them to their rightful locations.
- Put the HA/DRS option back to normal (if they were changed for the upgrade).
- Upgrade VI Client on all client machines.
- Plan and upgrade VMware Tools on all VMs running on upgraded ESX servers in the usual fashion. Please bear in mind that upgrade of VMware tools will require a reboot so some scheduling might be required.
- Repeat the process for other clusters as required with the same considerations in mind.
Well, this completes the process of upgrading a vCenter/ESX 4.0 environment to vCenter/ESX 4.1 using a process which is easy, “mostly automated and transparent” to the user. So, if you need to remain on version 4.x for a while, it’s highly recommended to upgrade, until the time is right to go version 5.0.
Hope this helps!
Leave A Comment