Tuesday 28 June 2011

Installing XenApp 6 Hotfixes

Until Citrix release a proper service pack for XenApp 6 (I’ve heard this might still be months off), having your Citrix hotfixes up to date is really important.  Frankly, there are some killer bugs in the initial release of XenApp 6 – luckily the patching system works well.

Download the Hotfixes from here:

http://support.citrix.com/product/xa/v6.0_2008r2/hotfix/general/public

I build my servers using Altiris, but I have found that using Altiris can be an unreliable way of installing Citrix hotfixes.  Instead I now have a file share with the hotfixes in, together with a batch file that installs them all in one go and then reboots once at the end.  Rebooting after every hotfix is not necessary, although the order they are installed in can be important. 

The script I use is adapted from one written by Paul Johnson which I got from the forum below, so all credit to Paul for sharing this:
http://forums.citrix.com/thread.jspa?threadID=282008

Note that the script I use does not install every hotfix Citrix have released – some fix issues I have not come across yet, others are for other versions or languages only.  Therefore, this might not be a complete script for you – its worth looking at the other hotfixes on the Citrix site.

Anyway, this is the current script!

@echo off
setlocal
Change user /install

echo Installing XenApp6 Hotfix XA600W2K8R2X64002 (CTX126123)...
START /wait msiexec /p \\filesvr01\xenapp$\XenApp6Hotfixes\002-XA600W2K8R2X64002.msp /passive /norestart /Liewa c:\logs\XA600W2K8R2X64002.log
timeout /t 10 /NOBREAK

echo Installing XenApp6 Hotfix XA600W2K8R2X64010 (CTX126490)...
START /wait msiexec /p \\filesvr01\xenapp$\XenApp6Hotfixes\010-XA600W2K8R2X64010.msp /passive /norestart /Liewa c:\logs\XA600W2K8R2X64010.log
timeout /t 10 /NOBREAK

echo Installing XenApp6 Hotfix XA600W2K8R2X64017 (CTX126958)...
START /wait msiexec /p \\filesvr01\xenapp$\XenApp6Hotfixes\017-XA600W2K8R2X64017.msp /passive /norestart /Liewa c:\logs\XA600W2K8R2X64017.log
timeout /t 10 /NOBREAK

echo Installing XenApp6 Hotfix XA600W2K8R2X64029 (CTX127405)...
START /wait msiexec /p \\filesvr01\xenapp$\XenApp6Hotfixes\029-XA600W2K8R2X64029.msp /passive /norestart /Liewa c:\logs\XA600W2K8R2X64029.log
timeout /t 10 /NOBREAK

echo Installing XenApp6 Hotfix XAE600W2K8R2X64020 (CTX127025)...
START /wait msiexec /p \\filesvr01\xenapp$\XenApp6Hotfixes\020-XAE600W2K8R2X64020.msp /passive /norestart /Liewa c:\logs\XAE600W2K8R2X64020.log
timeout /t 10 /NOBREAK

echo Installing XenApp6 Hotfix XA600W2K8R2X64021 (CTX127036)...
START /wait msiexec /p \\filesvr01\xenapp$\XenApp6Hotfixes\021-XA600W2K8R2X64021.msp /passive /norestart /Liewa c:\logs\XA600W2K8R2X64021.log
timeout /t 10 /NOBREAK

echo Installing XenApp6 Hotfix XAE600W2K8R2X64018 (CTX127023)...
START /wait msiexec /p \\filesvr01\xenapp$\XenApp6Hotfixes\018-XAE600W2K8R2X64018.msp /passive /norestart /Liewa c:\logs\XAE600W2K8R2X64018.log
timeout /t 10 /NOBREAK

echo Installing XenApp6 Hotfix XA600W2K8R2X64012 (CTX126679)...
START /wait msiexec /p \\filesvr01\xenapp$\XenApp6Hotfixes\012-XA600W2K8R2X64012.msp /passive /norestart /Liewa c:\logs\XA600W2K8R2X64012.log
timeout /t 10 /NOBREAK

echo Installing XenApp6 Hotfix XA600W2K8R2X64040 (CTX127523)...
START /wait msiexec /p \\filesvr01\xenapp$\XenApp6Hotfixes\040-XA600W2K8R2X64040.msp /passive /norestart /Liewa c:\logs\XA600W2K8R2X64040.log
timeout /t 10 /NOBREAK

echo Installing XenApp6 Hotfix XA600W2K8R2X64056 (CTX128945)...
START /wait msiexec /p \\filesvr01\xenapp$\XenApp6Hotfixes\056-XA600W2K8R2X64056.msp /passive /norestart /Liewa c:\logs\XA600W2K8R2X64056.log
timeout /t 10 /NOBREAK

endlocal
shutdown -r -t 0

I save the script in the same folder as the hotfixes called “installall.bat”.  On a single server I build I’d just run this manually from the console, with a lot of servers to build I would use Citrix’s new Installation Manager (which is basic, but it does work…) to create a new schedule – for instance:

deleteme

Obviously if a single new update comes out I can then create another batch file to just install that one and reboot, then set Installation Manager to do the whole farm out of hours.

Note that you can then use the Delivery Services Console to find servers which are lacking hotfixes.  To see the servers at a glance…

  • Launch the Citrix Services Delivery Console (installed on manually built servers by default)
  • Set your farm connection up if needed
  • Click your farm name under the XenApp link on the left
  • Select the Hotfix Summary tab
  • You should now see all your servers, along with a useful count of hotfixes installed

image

If you then find a server which is missing hotfixes in the Servers section and click its Hotfix Details tab, you should see a list of the installed hotfixes.  So for the server above with only two hotfixes installed, I can go to it and see this is very out of date!

image

Note if you want to search for a server missing a specific hotfix, Open the DSC, click Search, and select Servers without hotfix:

image

3 comments:

Tord Bergset said...

Your script is nice but "hard" to maintain...
I use the following script to install Citrix Hotfixes:

@Echo off
cls
Echo.
Echo Installing Citrix hotfixes\updates...
Echo ---------------------------------------------------------
cd %~dp0

REM Installing all hotfixes in the current directory...sorted\ordered by name
for /f %%i in ('dir /b /on *.msp') do CALL :INSTALL %%i
Echo.
Echo.
Echo ---------------------------------------------------------
echo All hotfixes installed !
Echo.
If "%HOTFIXINSTALLED%"=="YES" Echo Restarting system...
Echo.
If "%HOTFIXINSTALLED%"=="YES" Echo Run "shutdown -a" to abort
Echo ---------------------------------------------------------
Echo.
If "%HOTFIXINSTALLED%"=="YES" shutdown -r -t 60
Goto :EXIT

:INSTALL
@echo ...installing...%1
If exist c:\Logs\citrixInstall_%1.log Echo ...ALREADY INSTALLED
If exist c:\Logs\citrixInstall_%1.log Goto :END
start /wait %1 /quiet /norestart /l* c:\Logs\citrixInstall_%1.log >nul
Set HotfixInstalled=YES
Goto :END

:EXIT
pause

:END

Anonymous said...

Do you have any problems with installation manager not rebooting the server?

Labmouse said...

The command "shutdown -r -t 0" at the end usually does work. You could try psshutdown from Sysinternals, but I've found the standard shutdown command works okay.

Post a Comment