Virtually upgraded

I’ve been doing a fair bit of VMware stuff at work lately and thought it was about time I upgraded my lab to ESXi 5.5. My reasons for holding off was because the 8168 driver was removed from the released iso and they’re the only nic’s I have in my machines. Fortunately adding the driver in turned out to be very easy.

First up I had to upgrade vcenter. I use the appliance for simplicity however I’m considering moving to the windows version running on a 2012R2 machine to reduce overheads (yes the appliance uses too much ram). All I did for this was deploy a new appliance on a new IP and connect all my hosts to it. I had to recreate datacenter/cluster level stuff but there’s not much configured there so that’s fairly easy. Also realise as this is a management level connection the running vm’s all keep running without issue.

Then to update ESXi I simply followed instructions found online and slightly modified to use the latest release available.

Using VMware PowerCLI create a custom image with the extra driver package which fortunately is still in the online repo. Note I said PowerCLI, not PowerShell. If you run PowerShell instead you’ll need to “Add-PSSnapin VMware.ImageBuilder” first.

Get-EsxImageProfile -Name "*5.5*" | Format-Table -Wrap -AutoSize
#from the output of that select the newest profile name and use that below, in this case ESXi-5.5.0-20131204001-standard
New-EsxImageProfile -CloneProfile "ESXi-5.5.0-20131204001-standard" -name "ESXi-5.5.0-20131204001-DS61" -Vendor ""
Add-EsxSoftwarePackage -ImageProfile "ESXi-5.5.0-20131204001-DS61" -SoftwarePackage "net-r8168"
Export-ESXImageProfile -ImageProfile "ESXi-5.5.0-20131204001-DS61" -ExportToISO -filepath C:\Temp\ESXi-5.5.0-20131204001-DS61.iso

Then I realised that’s fine for manual upgrades done from the console but I wanted to try updating remotely (sadly I don’t have out of band access to all my boxes). Fortunately that’s easy too.

Before attempting an upgrade though, it’s always wise to backup your configuration. I recently used this to rebuild a host when it’s boot media died. Again, from PowerCLI:

Connect-VIServer -Server vcenter -User root
#obviously use your vcenter hostname if it's not vcenter
Get-VMHostFirmware -VMHost -BackupConfiguration -DestinationPath c:\temp

Then to perform the in-place upgrade, from the ESX shell (ssh into the hosts) run the following. This opens the firewall to allow outbound http requests, and then downloads and applies the update. Note the same profile name as in the above iso creation. Also note the update command not install command. Update keeps vibs that aren’t present in the image, install does not. So in my case install would throw out the network driver I need as it’s not in the new image profile.

esxcli network firewall ruleset set -e true -r httpClient
esxcli software profile update -d -p ESXi-5.5.0-20131204001-standard

After running that it tells you a reboot is needed, so reboot it and hope for the best. So far all of my physical hosts have come up fine (one left to reboot) and 4 out of 5 virtual esx hosts did. The one that failed pink screened on me and then recovered to the previous version partition. I’m yet to figure out quite why, so I might just reinstall it (all 5 of these hosts were built from the same template and have identical configuration).

Anyway that’s enough for now.

Powered by hampsters on a wheel.
Built with Hugo
Theme Stack designed by Jimmy