Friday, 7 September 2012

XenDesktop 5.6 Express–Licensing

I’ve just spent a frustrating hour trying to license the XenDesktop express proof of concept farm I built a couple of weeks ago.  The problem was truly strange and appears to be a bug on the Citrix site at the moment. 

After installing XenDesktop Express with the Licensing component, it went into a trial period.  So I went about getting a proper license…

In the Desktop Studio, under Configuration > Licensing you will see you are still in a trial mode. 


To sort this out, I tried to go here in my local Chromium browser:

After entering details you get the chance to download the biggest license ever – nearly 1gb!


Luckily its a typo.  Mine was 11kb.  This saved itself in my Downloads folder as a file called “XenDesktop_Express_Edition_License.lic”. 

I put this in the folder C:\Program Files (x86)\Citrix\Licensing\MyFiles on my XenDesktop service and restarted the license service. 

Back in Desktop Studio I selected Add License:


Bang.  The “Citrix License Server currently unavailable” bit sounds bad.  I check services.msc and the service has indeed fallen over - in the event log you get this helpful message:

Faulting application name: lmadmin.exe, version:, time stamp: 0x4f02e435
Faulting module name: MSVCP80.dll, version: 8.0.50727.6195, time stamp: 0x4dcddc6c
Exception code: 0xc0000005
Fault offset: 0x000038db
Faulting process id: 0xb78
Faulting application start time: 0x01cd8ce15b8b4c3d
Faulting application path: C:\Program Files (x86)\Citrix\Licensing\LS\lmadmin.exe
Faulting module path: C:\Windows\WinSxS\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.6195_none_d09154e044272b9a\MSVCP80.dll
Report Id: 9aa66add-f8d4-11e1-a99d-02faf2a05cc2

Then this post on the Citrix forums suggested I check my .lic file’s contents, and indeed it is an HTML file!  The download page for the file I actually want in fact. I remove it from MyFiles and the Citrix Licensing service will start at least. So I move and rename my .lic file to .html and open it in the browser I just used and hey presto!


I click “Download your file manually” and it downloads another file called XenDesktop_Express_Edition_License.lic, which this time is the actual file.  Madness.  Saved this in the MyFiles folder on the XenDesktop server again, restart the Licensing service again and refresh the Configuration > Licensing part of the Desktop Studio, and its all working fine:


I think something needs fixing on Citrix’s website! 

One more issue in my case was the licenses were now in the wrong mode.  I could see the Concurrent licenses but also had the message “Can’t find a valid license – no suitable licenses are available”


To fix this, I selected “Edit Product Version” in the actions tab…


Then changed the model to Concurrent rather than User/Device Licensing.  No idea how this ended up on the wrong mode…


Finally!  All licensed.


Friday, 24 August 2012

Installing XenDesktop 5.6 Express

This is a basic implementation of XenDesktop Express 5.6, intended as a proof of concept.  This is the edocs link for XenDesktop 5.6 by the way:

XenDesktop 5.6 Express is essentially the trial version of XenDesktop and is limited to 10 VDI machines.  This is a comparison of all the editions:

Download XenDesktop Express from your My Citrix account – this is the direct link at the moment…

Click Try It Free and download the zip.  This contains three ISOs, including XenServer.  Extract the XenDesktop56.iso using 7zip or another program.

I’m installing the core components of XenDesktop on a XenServer virtual running on a fairly powerful server.  The XenDesktop controller VM has got 2 vCPUs and 2gb RAM, running Windows Server 2008 R2.  On the same XenServer farm, install a Windows 7 VM as well.  This will later become your master VM.

When your XenDesktop server is installed, run AutoSelect from the root of the extracted XenDesktop56 folder, then when this menu eventually comes up, select Install XenDesktop….


Accept the EULA…


You then have a comprehensive list of options.  You might well just click Next to install everything, but lets have a think about things first…


For a proof of concept, this might well all be best on the same server, but this is going to be a quite heavy set of applications, and there might be parts of this you don’t need.  If you have a shared SQL Server machine, you can save quite a lot of load on the box by not installing SQL Server Express for instance – but you have extra steps to set up the database elsewhere.  The license server part could well be existing elsewhere if you are running XenApp, though be aware that it needs to be v11.10, the version which shipped with XenApp 6.5, not the XenApp 6.0 version or earlier.  On a production system the other roles might well be split over multiple systems as well.  For this simple implementation, I’ve left everything ticked.

The next screen lets you know that the windows firewall is going to be set up to allow the license server ports…


You then proceed to installation of the Windows features and XenDesktop components.  This takes a while.  Meanwhile in the background I connected to a shared SQL Server 2008 R2 machine, created a database manually and set up a SQL logon on it, with a really hard password.  In User Mappings I gave this login db_owner access to the new database.

image and later… image

Click Close to configure XenDesktop.  This took a full three minutes to come up…


Note that if you chose to not have the SQL Server Express R2 instance on this server, the whole Quick Deploy option is greyed out.  Assuming it is enabled, click it.

Incidentally, this is the information on Quick Deploy:

As it states, these are the pre-requisites for completing Quick Deploy:

  • A host with enough storage, CPU and RAM
  • An admin account which can create new machines on the XenServer host
  • Access to the AD domain containing the accounts of users
  • An account on that AD domain with the right to create computer accounts
  • A Master VM running the Virtual Desktop Agent
  • The XenDesktop server you just installed, including all components.

You installed that Windows 7 VM earlier, right?  The one that will be the Master VM.  If not, get installing! 

The first step of Quick Deploy is Site.  Give your site a name and click next on the Wizard.


The next step is Connection.  This is the connection to the virtualisation platform – either VMware, Hyper-V, or (more likely) XenServer.  Fill in the details for your environment.  In this case, I’m connecting to XenServer, so I put in http://[servername] and the root username and password.  It won’t let you proceed unless these details are correct.  After this you will see the Host screen, where you pick the Network your VMs should use (assuming multiple networks are defined) and the Storage screen where you pick where all the VMs you create will appear.


If you have not done this already, get your Windows 7 Master VM ready.  Install the tools for whatever VM host you are on (so, the XenServer tools in my case)…


Join it to the AD domain and install any applications you want on all the machines.  Then get the Virtual Desktop Agent installed.  You can get to this by running the AutoSelect utility on the XenDesktop56 disk and clicking Install Virtual Desktop Agent…


Select Quick Deploy and agree to everything.


Back to the Quick Deploy wizard on the server, select the Master VM, the location to store the newly created VMs and allow it to create a couple of VMs, giving it a default location


The next step is to allow users or groups to request VMs which do not have a specific user.  Create an AD group and put a test user in it.  Once you have tested this is working, this group will contain all your XenDesktop users.


This churns away for about 10 minutes…

image and eventually… image

You should now see most of the configuration options in the Desktop Studio…


And should also notice its created extra virtual machines in XenServer which can be logged onto via the web interface, which you can now make secure in IIS if you see fit.


Then I decided to check it was licensed okay, and the fun really began.  This is the post about that little issue: