Thursday, December 13, 2012

ESXi 3.5 build 207095 to 5.0 current build steps

A client has the free version of ESXi 3.5 using local storage and wanted to move up to a current version of ESXi. I wasn't able to find a one-stop shop that said how to get from A -> E and for a while there I thought I could at least skip 4.0...nope. If you're not using local storage, please do yourself a favor and just do a fresh install.

It's possible that there's a slightly more efficient way to do this, but this was the way I was guaranteed not to loose the local datastore data. was giving me some grief when I was trying to finish this post so I don't have links up to some of the packages. You should be able to search around and find them.

Things you'll need:
- vMA (current version is fine)
- vSphere Client 4.0 with Host Update Utility (here VMware-viclient-all-4.0.0-208111.exe)
- vSphere 4.0 update 1 upgrade package (here
- vSphere 4.0 to 4.1 upgrade package (here
- vSphere 5.0 iso (standard one here VMware-VMvisor-Installer-5.0.0.update02-914586.x86_64.iso)
- vSphere 5.0 current build (here) if needed

Things you might want:
- vSphere 4.0 upgrade guide (here)
- vSphere 4.1 upgrade guide (here)

- SCP the 4.1 patch to your vMA
- SCP the 5.0 patch to the ESXi datastore * 
- Login to vMA
- Make a backup copy of your host config via vMA
vicfg-cfgbackup --server <ESXi-host-ip> --portnumber <port_number> --protocol
<protocol_type> --username username --password <password> -s <backup-filename>
- Check that there's a scratch partition setup on your host via vMA
vicfg-advcfg --server <ESXi-host-ip> --username root -g ScratchConfig.ConfiguredScratchLocation
if not found:
vifs --server <ESXi-host-ip> --username root --mkdir "[datastore1] .locker-esxtest"
vicfg-advcfg --server <> --username root -s /vmfs/volumes/datastore1/.locker-esxtest ScratchConfig.ConfiguredScratchLocation
- Shutdown VMs and put into maintenance mode
vicfg-hostops --server <ESXi-host-ip> --operation enter
- Start up the Host Update Utility, add your host and patch with the 4.0u1 upgrade package.
-- Yeah. 4.0u1. Not current version of 4.0, that gave back an error that it wasn't compatible.
- Wait a bit. I'm not sure what files are created when, but there was a directory called /vmupgrade that was created and then deleted while the HUU stayed at 3%
- One or two reboots. My test ESXi system rebooted at 3% and 34%, prod ESXi only did the reboot at 34%.
- ESXi reboots to 4.0, HUU eventually will say that the upgrade failed when installing packages after the initial base reboot. Do not fret...keep moving.
- You can login via the vSphere Client & test that everything still looks good.
- Log into vMA and run vihostupdate with the 4.1 upgrade against the host.
 vihostupdate --server <ESXi-host-ip> -i -b <zip bundle>
- Reboot again.
- Test again after starting up into 4.1.
- Reboot system and boot to the 5.0 CD.
- The installer will see your current install and happily upgrade.
- And another reboot. I hope your server doesn't have too much memory that it's set to check upon each reboot..
- Back to vMA and run the esxcli command to patch
esxcli software profile update -d <depot url or offline bundle zip file> -p <profile_name>
- Reboot
- Yes, you are done. Luckily, ESXi patches are cumulative so once you're at a major revision you only need to grab the most recent patch.

* If, like me, you've drawn a blank on how to get ssh enabled on ESXi 3.5:
From console: 
- Alt-F1 unsupported
- enter root pw
- vi /etc/inetd.conf -> unhash #ssh
- ps | grep inetd
- kill -HUP <processID>

No comments:

Post a Comment