After upgrading several different environments to Horizon Workspace 1.8, it’s become clear to me that the “offline upgrade” feature is something that should be used whenever possible. Maybe it’s just the environments I’ve worked in, but going from 1.5 to 1.8 takes much much longer than going from 1.0-1.5. This guide is intended to help you accomplish an offline upgrade from 1.5 to 1.8, while having a plan to restore to 1.5 in case of a failure. This is the fastest process I have found to perform the upgrade. Even with these measures, I’d plan on getting a 4-5 hour outage window for a production environment (2 connector, service, gateway, data virtual appliances)
First thing is first – VMware currently only provides the update repo files mentioned in the documentation center if you call and speak to global support services.
- Call VMware GSS and request update repo files for the offline upgrade from horizon workspace 1.5 to 1.8. Ensure that they provide you with the files “configureupdate.hzn”, and “updatelocal.hzn”.
- Copy the “updatelocal.hzn” file to the configurator-va directory: /usr/local/horizon/lib/menu/
- Copy the “configureupdate.hzn” file to every virtual appliance in the directory: /usr/local/horizon/scripts/
- Set the permissions of each script to 700 (chmod 700 /usr/local/horizon/scripts/configureupdate.hzn)
- Add the “configureupdate.hzn” script to the sudoers file on each va. A snippet of the end of the sudoers file will look like this:
- /usr/local/horizon/scripts/setupSshKeys.hzn, \
- /sbin/reboot, \
- Create the following directory structure on a web server that’s accessible by every horizon workspace app. Note, the published documentation says to create the service-va directory “srv”, but the script specifies the directory “svc”.
- Extract each update repo zip file to their respective directories.
- Run the following snippet on the configurator-va to make sure your setup is good to proceed, and configure each VA to use the local update source. If there are no errors appear, you’re good to keep going.
- /usr/local/horizon/lib/menu/updatelocal.hzn checkurl http://yourhost/vapp
- /usr/local/horizon/lib/menu/updatelocal.hzn seturl http://yourhost/vapp
- At this point, you can proceed with your upgrade as normal. Here’s the steps I personally use to prep for the upgrade to ensure that there are no issues.
- Backup your postgres database – On the command line of your vFabric postres server, run this command:
- /opt/vmware/vpostgres/current/bin/pg_dump -U postgres -W –clean -f ~/Before_HWS_1.8.data saas
- The default password is H0rizon!
- Run the script below – requires vmware powercli. Ensure that your postgres server has the default name. If it doesn’t, change the script below.
#Connect to virtualcenter Connect-viserver -Server [your virtualcenter server] -Credential (Get-Credential) #Shut down horizon workspace and vmware vfabric postgres Get-vapp -name "Horizon-Workspace" | stop-vapp get-vm -Name "VMware vFabric Postgres" | shutdown-vmguest #Create snapshot of all of the VMs in Horizon Workspace and vFabric Postgres get-vapp -Name Horizon-Workspace | get-vm | New-Snapshot -Name "Pre_1.8" -Description "Taken before 1.8 Upgrade" get-vm -Name "VMware vFabric Postgres" | New-Snapshot -Name "Pre_1.8" -Description "Taken before 1.8 Upgrade" #Start horizon workspace and postgres VM Get-vm -name "VMware vFabric Postgres" | start-vm Get-vapp -name "Horizon-Workspace" | start-vapp