Install Windows Server 2008 R2. Nothing else will work for XenApp 6.
Add the relevant Windows Roles/Features. Personally, I’m doing the whole build via a VBScript, but to do this step I’m using PowerShell. To make life easier for myself, I set the PowerShell Execution Policy to Bypass to enable the unsigned ps1 script to run:
powershell.exe set-executionpolicy -scope currentuser bypass
This is the ps1 script:
Param($Param1) $DebugPreference = "SilentlyContinue" $ErrorPreference = "SilentlyContinue" import-module servermanager Add-WindowsFeature $Param1
So you can pass this script a comma separated list of roles, role services or features and it’ll add them. I’m adding:
Note that just because you’ve added the Remote Desktop Session Host Role, the TermService service is conveniently not set to automatic start. So you need to do this (note the space after the equals):
sc config TermService start= auto
Then you have to reboot.
Now you can install XenApp. The process is that you install the product, then configure it afterwards as a separate step. To install XenApp I’m using the command line installer:
"<DVD Path>\XenApp Server Setup\bin\XenAppSetupConsole.exe" /install:XenApp /exclude:XA_Console /Enterprise /logfile:C:\logs\xenappinstall.log
As you can tell, I’m installing the Enterprise edition of the product. You can check the logfile for the phrase Sequence was Completed to check that it worked. You can install other things at this point as well as XenApp itself – I was originally also installing the EdgeSight Agent (just use /install:XenApp,EdgeSightAgentFeature) – however due to problems I’m now installing it separately from an msi file.
EdgeSight replaces the old Resource Manager. You get the basic version of EdgeSight with XenApp Enterprise, and the full version with XenApp Platinum (from the EdgeSight Post Installation Wizard documentation – you’d think it’d be easier to find this info out). Install the EdgeSight Server onto a separate server.
Before you go too much further you’ll need a Citrix Licence Server, mine is running version 11.6.1 build 9019 and seems to be working fine. At the time of writing the latest version is 11.6.1 build 10007. Note that the latest Licence Server has removed licence monitoring, in favour of doing this via EdgeSight instead.
You’ll also need to have created a farm. You cannot use a farm from a previous version of XenApp. You can do this from the command line, but it might be easier to just run the XenApp Server Role Manager utility (on the Start Menu) manually on a temporary server as this is basically a one-off operation. You’ll probably want to have a suitable SQL server ready to hold the XenApp datastore, plus a user account ready for XenApp to use to authenticate to it with. Make sure you add your admin account as a XenApp Administrator (via the Delivery Services Console) or the Delivery Services Console will fail at the “Configure and Run Discovery” process when you run it from a machine logged on as your admin account.
Before running the configuration I’m installing a load of XenApp hotfixes. Hopefully at some point there’ll be a hotfix rollup released. The ones I’m doing at the moment are: XA600W2K8R2X64001, XA600W2K8R2X64012, XA600W2K8R2X64017, XA600W2K8R2X64019, XA600W2K8R2X64021, XA600W2K8R2X64026, XA600W2K8R2X64029, XAE600W2K8R2X64018, XAE600W2K8R2X64020. They’re all Windows Installer patches (msp files).
Now you can configure XenApp. The command line way to do this is as follows:
"%ProgramFiles(x86)%\Citrix\XenApp\ServerConfig\XenAppConfigConsole.exe" /ExecutionMode:Join /FarmName:"RCMTech" /LicenseServerName:xenapp-licence.rcmtech.co.uk /LicenseServerPort:27000 /ZoneName:"Site1" /DsnFile:sql.dsn /OdbcUsername:rcmtech\sql-xenapp /odbcPassword:password /AddAnonymousUsersToRemoteDesktopUserGroup:False /log:C:\logs\xenappconfig.log
The licence server specified can be the name of the server, it’s IP address or a DNS alias (my preferred option). If you installed the EdgeSight Agent using XenAppSetupConsole earlier there are command line options to configure this too. But again, I had issues so am now doing the EdgeSight agent completely separately to XenApp.
After you’ve run XenAppConfigConsole you can either manually start some of the Citrix services (e.g. IMAService) or reboot. Citrix recommends a reboot, but I’ve found that if the configuration works OK then IMAService will start.
The sql.dsn file should look something like this:
[ODBC] DRIVER=SQL Server DATABASE=XenApp6 APP=Citrix IMA UID=rcmtech\sql-xenapp SERVER=sql.rcmtech.co.uk Trusted_Connection=Yes
It looks rather as though XenApp 6 does NOT support SQL mirroring, unlike Presentation Server 4.5 or XenApp 5 (EDIT: Oh yes it does support it, Citrix just took ages updating their documentation: CTX111311). I’ve tried both the SQL 2005 “SQL Native Client” and the SQL Server 2008 R2 “SQL Server Native Client 10.0” on the Driver= line in the dsn file and both cause XenAppConfigConsole.exe to fail. The documentation only mentions SQL Clustering or SQL Replication. I have no idea why they’d drop SQL Mirroring as it’s been working nicely for me and my DBAs for the last few years with XenApp 4.5 and then 5.0. Anyway…
If you’re running with the Windows Firewall enabled (why wouldn’t you be?) then you’ll be pleased to know that XenApp adds exceptions to the inbound rules for itself. Unfortunately adding the Remote Desktop Session Host role does not. So you need to open this up – it’s what listens on port 1494 (ICA – after you’ve installed XenApp) and 3389 (RDP):
netsh advfirewall firewall set rule name="Remote Desktop (TCP-In)" new enable=Yes profile=domain
Finally you need to actually enable Remote Desktop connections, which can be done by setting this DWORD:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server \fDenyTSConnections = 1
That seems to take effect immediately (i.e. no reboot required), which is nice.
Now you’re ready to start installing applications, and then publishing them or a whole desktop.