VCP 4 Prep objective 1.2 – Upgrade VMware ESX/ESXi

-Objective 1.2 – Upgrade VMware ESX/ESXi

–Plan a VMware vSphere upgrade

When planning to upgrade the your ESX/ESXi hosts consider the following:

  • vCenter has been upgraded first (if vCenter is installed in the environment)?
  • Does the current hardware specification meet the minimum requirements for ESX/ESXi 4.1?
  • The ESX/ESXi host has a static IP address during the upgrade process
  • Release support i.e. is your current ESX/ESXi installation upgradable to ESX/ESXi 4.1?
  • What tools are available for the upgrade?
  • What component configuration will not be preserved?
  • How will you backup the ESX/ESXi configuration?
  • How will you rollback should the upgrade fail?

–Backup and restore ESX/ESXi host configuration


When you upgrade ESX the following: /etc/sfcb/sfcb.cfg and /etc/vmware/firewall/services.xml isn’t preserved so it is advisable to take a backup, when backing up the service console also consider backing up these configuration files:

  • /etc/passwd
  • /etc/shadow
  • /etc/vmware – excluding /etc/vmware/patchdb and /etc/vmware/ssl
  • /root
  • /home
  • custom scripts
  • .vmx files
  • local image templates
  • exported virtual machines.

To restore your ESX installation:

  1. Reinstall the ESX version to the correct patch release
  2. Run esxcfg-dumppart -l (this command will list the HBA target ID), make a note of this info it is needed in a later step.
  3. Next get the current CosCorefile info by running this command cat /etc/vmware/esx.conf | grep CosCorefile, again make a note of this information.
  4. Restore /etc/vmware/ from backup
  5. Update the core dump partition esxcfg-dumppart -s vmhbaX:X:X:X – this information was captured in step 2.
  6. Update /etc/vmware/esx.conf with the information captured in step 3
  7. Get the UUID for the root partition – run the following command cat /boot/grub/menu.lst | grep UUID, capture the root=UUID=xxxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx.
  8. Update the boot configuration – run the following command esxcfg-boot -d “UUID=xxxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx”
  9. Reboot


When you upgrade ESXi the following: /etc/sfcb/sfcb.cfg, inetd.conf, motd, issue, inittab and chkconfig.db isn’t preserved so it is advisable to take a backup, when backing up ESXi use the vSphere CLI and this command:

vicfg-cfgbackup –server {server IP} –portnumber {port} –protocol {TCP?} –username {username} –password {password} -s {backup-filename}

To restore your ESXi installation:

  1. Reinstall the ESXi installation using the CD or recover the embedded version using the recovery CD
  2. Install the vSphere CLI (if not already)
  3. run vicfg-cfgbackup -l {path to host configuration backup}

 –Understand virtual machine backup options

Service console level backup (really not a recommended production backup strategy)

The backup agent within the service console would need to backup the .vmx, .vmdk, .NVRAM, vmware.log, etc.

VMware consolidated backup

  • virtual machine quiesced before snapshot
  • file and image level backups supported
  • full and incremental backup methods supported

Backup agent installed within the guest

  • This is the traditional way to backup a physical computer

3rd party software (Veeam) or VMware Data Recovery

  • depending on the depends on the features e.g. Veeam offers reverse incrementals and application consistancy support.

–Determine if existing hardware meets upgrade requirements

The minimum requirements for ESX/ESXi 4 are defined in objective 1.1 – identify minimum hardware requirements –

–Understand ESX/ESXi upgrade scenarios

The general guidelines are:

  • Upgrade vCenter
  • Update the vSphere client
  • Update the associated plugins (convertor, guided consolidation, update manager)
  • Update the hosts
  • Update VMware tools
  • Update the virtual machine hardware

Upgrading ESX to ESX 4.1 or ESXi 4.1 requires prior planning; so if ESX is installed and you want to upgrade to ESXi then you’ll need to perform a migration upgrade.

Migration upgrades:

Migration upgrades basically require another piece of kit i.e. another server. When the new installation of ESX 4.1 is online you can join that installation to vCenter 4.1 and use vMotion to migrate the virtual machines to the new host, alternatively if vMotion is not available you would need to power down the virtual machine and migrate them manually.

Supported migration paths

If ESX is installed and you want to upgrade to ESX 4.1 and the installation you’re upgrading from is earlier than ESX 3.5.x then there is no upgrade support, if the installation is 3.5.x is later then you can use the vCenter Update Manager, if the installation is ESX 4.0 or later then you can use the vCenter Update Manager, vihostupdate or esxupdate. ESXi follows a similar upgrade path with the obvious exclusion of installations earlier than 3.5.x.

Note: In ESX 4.x the service console is now a virtual machine on the local VMFS.

Note: Any custom partitioning is not replicated during the upgrade from ESX 3.x to ESX 4.x

–Perform upgrade to ESX/ESXi 4.1

—Upgrade ESX/ESXi

Host Update Utility

UI utility for upgrading standalone ESXi hosts; supports upgrading ESXi 3.5 to ESXi 4.x and ESXi 4.x. to ESXi 4.x.

vCenter Update Manager

The vCenter Update Manager can be used to update a data center, cluster, individual hosts or virtual machines. The built-in best practices of the Update Managers wizard-driven workflows ensure you cannot upgrade a virtual machine before its respective host has been updated.

The vCenter Update Manager will update the VMKernel, Service Console (if applicable), virtual machine hardware, VMware Tools and any guest operating system service packs and patch releases.

To perform the upgrade run vCenter Update Manager; this method will place the host in maintenance mode (and move / vMotion the virtual machines if configuration and licensing allows)  then upgrade the host.


The vihostupdate tool only supports upgrading from ESX/ESXi 4.x to ESX/ESXi 4.x e.g. ESX 4.0 to ESX 4.1

The vihostupdate tool supports https, http, ftp and file

The vihostupdate tool prerequisites are:

  • 2GB host RAM (3GB RAM for ESXi)
  • /root must have 1.8GB free
  • /boot must have 24MB free
  • ESXi must have a scratch partition configured (the scratch partition is only requred for vm-support output).

To perform the upgrade download the applicable upgrade releases to a location on the computer which is accessible from the vsphere CLI client, logon to the host via the client as root and place the host into maintenance mode. You may wish to migrate the running virtual machine onto another host.

Next configure the firewall to allow all incoming and outgoing traffic: esxcfg-firewall –allowIncoming –allowOutgoing

To install the upgrade package run: vihostupdate -i –server host name or IP address –username root –password password -b location of esx update zip

reboot the host and then close the firewall: esxcfg-firewall –blockIncoming –blockOutgoing


The esxupdate tool only supports upgrading from ESX 4.x to ESX 4.x e.g. ESX 4.0 to ESX 4.1

The esxupdate tool prerequisites are:

  • /root partition must have 1.8GB free
  • /boot partition must have 24MB free

To perform the upgrade download the applicable upgrade releases to a location which is accessible by the host. You may wish to migrate any running virtual machines to another host.

Next configure the firewall to allow all incoming and outgoing traffic: esxcfg-firewall –allowIncoming –allowOutgoing

To install the upgrade package run: vihostupdate -i –server host name or IP address –username root –password password -b location of esx update zip

reboot the host and then close the firewall: esxcfg-firewall –blockIncoming –blockOutgoing

Which ever way you upgrade to ESX/ESXi 4.1 you must configure LUN masking to use claim rules.

—Upgrade virtual machine hardware

ESX 3.x virtual machine hardware is version 4; ESX 4.x virtual machine hardware is version 7. Version 4 hardware is compatible across both ESX 3.x and 4.x, it is worth noting that version 4 hardware which uses paravirtualisation (VMI) or an vmxnet network card cannot be vMotioned between different host ESX versions; version 7 is only compatible with ESX 4.x. NOTE: if for some reason you are upgrading a virtual machine from version 3 (ESX 2.x) then the upgrade is irreversisble.

If you use vCenter Update Manager; the update manager workflows will upgrade the virtual machines after the hosts have been upgraded. vCenter Update Manager ensures that VMware tools are installed before the virtual machine hardware is upgraded. To upgrade the virtual machine hardware interactively, power off the virtual machine, right click the virtual machine and select ‘Upgrade Virtual hardware’.

—Upgrade VMware tools

To upgrade VMware tools either mount the VMware tools ISO or select the appropriate option from the vSphere client UI. The upgrade will uninstall the previous version then install the new version; Microsoft Windows operating systems will require a reboot. It is recommended that you snapshot the virtual machine before preceeding with the VMware tools upgrade.

–Verify success of upgrade

To verify success of an upgrade you should consider:

  • upgrade verification
  • host management
  • configuration
  • licensing

To check whether the upgrade was successful or not, you can run the following commands:

  • vmware -l
  • vmware -v
  • esxupdate query
  • vihostupdate –server {host name or IP address} –query

You should also check the upgrade logs for ESXi:

  • /locker/db/esxupdate.log

for ESX:

  • /var/log/vmware/esxupdate.log

To check whether host management is available; if the host is managed via vCenter, reconnect to the host. If the host is standalone connect via the console, SSH or the vSphere client.

When the upgrade is complete you may need to make some configuration changes. The configuration changes to consider are:

Host hard disks; during the upgrade host SCSI or SATA hard disks may get renumbered; if this is the case you may need to adjust any scripts, etc.

LUN masking; must be configured to use the claim rule format. It is worth noting that if no LUNs have been masked out at host level then this command is unnecessary?

3rd party agents; any previously installed agents will need to be reinstalled.

Restore Web Access; if ESX 3.5 has been upgraded to ESX 4.x then you’ll need to restore web access, this is because in ESX 4.x the web service doesn’t run by default. It is worth noting this doesn’t apply to upgrades from ESX 4.0 to ESX 4.1 and ESXi.

Clean the boot loader; once you’re happy ESX 4.x is stable you can remove the ESX 3.5 boot option from the boot loader. The ESX 3.5 roll back files can be found at /esx3-installation; make sure you have copied any custom scripts / configuration before rolling back.

–Understand upgrade roll back options

Roll backs of ESX 3.5 from ESX 4.0 are only supported if the initial upgrade is carried out using vCenter Update Manager. Also consider that if the virtual machine hardware has been upgraded then those virtual machines cannot run on a host which has been rolled back; it is recommended that virtual machine snapshots are taken before upgrading.

ESXi roll backs can only go back one level; this is because the upgraded build is saved as the standby build; the upgrade / update becomes the boot build.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.