Wilco van Bragt - LinkeIn Wilco van Bragt - Twitter rssa 

How To: Build a Citrix VMHosted Apps environment

One of the new features in XenApp 5 Feature Pack is VMhosted Apps. This feature makes it possible to add applications to your XenApp infrastructure which cannot run on the Terminal Server platform.  Citrix accomplish this by publishing this application seamless from a workstation version operating system like Windows XP, Vista or 7. In this article I will describe the steps for creating a VMhosted apps environment.


VMhosted Apps is actually not the best name for this feature. It implies that the application must be running on virtual machine, but this is actually not true. While it has benefits to use a virtual machine it is not necessary. You can also real hardware based machines (like BladPC's), so you can also benefit from this feature if you need much hardware resources for the application.

VMHosted Apps is actually using XenDesktop (based on the upcoming version 4) to provide the application as Published Application. So it's actually running beside your XenApp servers with a separate Data Collector (named Desktop Delivery Controller), database and his own MMC. So if you have experience with XenDesktop most parts will be very familiar.


As already stated VMHosted Apps is based on Citrix XenDesktop. Because of that the installation is also similar to the XenDesktop. Therefore you need to setup at least one (more are possible for load balancing and fault tolerance) Desktop Delivery Controller. The Desktop Delivery Controller can be seen as the counter part of the Data Collector role in Citrix XenApp. However the Data Collector role in XenApp can also host applications the Desktop Delivery Controller (DDC) will only enumerate the VMHosted Apps and refer the user to the right workstation (dependent of the configuration described later on in this article).

The Desktop Delivery Controller has a quite big list of required supporting programs, but Citrix did a nice job creating the DDC installation in such way those prerequisites are automatically installed.


The DDC need to be installed on a Windows 2003 server, Windows 2008 is not yet supported. The server should have Terminal Services, IIS, .Net Framework 2.5, Visual J# 2 and if you install the console on the same server  also Java Runtime Environment Version 1.5. Update 15 and Microsoft Windows Installer 3.1. Just like XenApp (actually as XenDesktop) VMHostedApps also needs a database, which can be hosted locally or on a separate MS SQL server. The installation is really easy because the installation also arranges that almost all prerequisites are installed automatically.

The Citrix Web Interface is installed automatically with the DDC, but it is not problem to add the configuration to another Web Interface (what you probably would do if you already have a Web Interface running for your XenApp infrastructure).


During the installation the server needs to be rebooted several times, but normally the installation will automatically continue when you have logged in again.

Secondly on the workstations, which will be hosted the VMhosted App the Citrix Virtual Desktop Agent need to be installed. Although this is not the best way to did it's pretty cool that the full source CD detects that the operating system is only suitable for running the Virtual Desktop Agent and so the "autorun" program shows only that installation option, Really User Friendly.  The installation is also wizard driven with a few questions like the communication port (8080 by default), automatic configuration of the Windows Firewall (opening ports 1494, 8080 and an exception for CitrixCGPServer executable), adding to agent to the VMHosted App farm (this is done using Active Directory, more about this in the configuration paragraph). After the installation a restart is required. Logically you also need to arrange that the application which will be hosted on the workstations is installed in some way. Remember that the workstations need to be member of a (trusted) domain.



After the installation of the required components the configuration can be started. The first step is to run Active Directory Wizard. This creates on OU and registers the controller in AD (so client automatically can detect the VMhosted App Farm).


The VMhosted App configuration console (called Delivery Service Console) is comparable with the Access Management Console of Citrix XenApp. At the initial configuration you need to specify at least one DDC for communication. Just like the XenApp configuration settings can be configured at Farm and/or Server level like the icon color depth, HDX features (Flash/Browser acceleration) and the license server.

The actual configuration is done at the Desktop Group part. Here you create a new Desktop Group which will host the VMHosted App. The most important step is the Assingment Type window. Here you choose who the VMHosted App is offered to the end user. There are two types available: Pooled or Assigned. When Pooled is choosen a set of workstations is available and a user is directed to one of them on the first come first served basis. So when the user quits the application the workstation is available again for another user. The option can be used if the application does not have any personal settings (or you develop a solution to save/store these settings). Secondly you can choose Assigned. As the name already implies a workstation is assigned to a specific user (so the workstation can only be used by one user). During the wizard you can choose that VMHosted Apps assigns the workstation (when the user setup the first connection a workstation is assigned) or the administrator specifies during the wizard yourself which workstation will be assigned to each user. Notice the checkbox which need to be configured for using VMhosted Apps.


When the workstation or hosted on a virtual platform (like XenServer or VMware ESX/vSphere) you can specify this platform. This has the advantage that you can use some components of the platform, for example automatically reboot the workstation when the user ends the session.


Logically you need to add the workstations (and when chosen for assigned you can select which user should connect to which workstation) and specify a name (This is the name displayed to the end user so normally you will label the configuration with the name of the application hosted by this desktop group), an icon and if necessary some advanced components (like above displayed figure).

Just like XenApp Published Application the application can be accessed using the Web Interface of the Citrix Receiver (formerly known as the PN Agent). Therefore you need to add the VMhosted App farm to the Web Interface configuration, just add the Farm to your Web Interface configuration as a XenApp Farm. In this way both the VMhosted Apps as the XenApp Published Applications are displayed from one interface to the end user.


At last but not least the workstation need to be configured for hosting the VMhosted App. This is done by adding the shortcut of the application to the folder "C:\Program Files\Citrix\ICAService\SeamlessInitialProgram". VMHosted Apps can only handle one application per workstation, so you should never add more than one shortcut in this folder. You can use a simple script (batch file) that starts programs if you really want to. The restriction is just in the placement of shortcuts than the amount of applications that can be started on the workstation. This shortcut is used to seamless start the application. So if you need to publish more applications, you should create separate Desktop Groups with other workstations as member hosting the other application(s).

Using the VMhosted App

When the user chooses the VMhosted App out of the Web Interface the connection to (one of the) workstation(s) is started. When the connection (or workstation) is a bit slow you can see the logon process of the workstation. Further it just works as Published Applications including client mappings.



VMhosted apps fulfill a (little) gap in pure Server Based Computing infrastructures for application that does not run on Terminal Servers/XenApp farms, but can be run on Windows XP, Vista or 7 or is using all available resources.  Because ICA is being used it is (not yet) suitable for heavy graphical applications. So it really depends on your situation if this feature can help you solving some of your issues. Nevertheless it is a nice addition to the product, which will be a great addition for several situations.

The implementation has some limitations. You need several new infrastructure components to get it up and running and again there is a separated management console necessary. It's also a pity that only one application per workstation can be used and offered to the end user. The installation is however pretty easy especially that all required components are installed automatically. I really hope that Citrix will combine the infrastructure components and makes it possible to add more applications per workstation in an upcoming release. Also the HDX enhancements being made currently can help adopting this new feature.

Citrix XenApp FR2