VM Hosted Apps – and Why You Should Care

I’ve found that one of the least-understood features of XenApp is “VM hosted apps.” So, gentle reader, I thought it was time to try to bring some clarity to what is actually a very cool piece of technology, and may actually be the solution for how to continue to deliver IE6 for the Web apps that require it, even after you upgrade to Win7. (As you probably know, Microsoft has, so far, taken the position that packaging, streaming, or otherwise delivering IE6 by itself is a violation of their license – much to the consternation of users who have applications that depend on it.)

Why it exists
Anyone who has been around the block a few times with XenApp knows that there are some applications that just don’t play nicely in a multi-user environment. I can tell you that our own engineering team has become quite talented at making applications run in a XenApp environment even when the application vendors themselves said it couldn’t be done. And as the older DOS-based and 16-bit Windows applications gradually die of old age, things in general are getting better. Tools like application isolation and application streaming can help as well. But every now and then, you’ll run into an application that either just won’t run in a Remote Desktop Services (formerly Terminal Services) environment, or won’t play nicely with other applications, or misbehaves when more than one person at at time tries to run it.

We also occasionally run into applications that require some kind of hardware “dongle” as a license enforcement mechanism. Other applications have license mechanisms that are dependent on IP or MAC addresses, and/or save user-specific information that will require the application user to go back to the same system each time s/he wants to run the application. Finally, there may be users who need a very high-performance graphics processing unit, e.g., to run a graphics-intensive CAD program.

To help you deal with this, Citrix included a little bit of XenDesktop technology in XenApp, beginning with XenApp 5 Feature Pack 2. It’s only fair, after all, since XenApp functionality is now included in XenDesktop Enterprise and Platinum Editions, but while XenDesktop 4 (and now XenDesktop 5) includes all the functionality of XenApp for delivering applications to your XenDesktop users, XenApp’s VM hosted apps feature contains just enough XenDesktop functionality to create virtual – or physical – desktop systems specifically to run individual applications. In fact, that’s all those systems do. You can’t deliver multiple VM hosted apps from a single PC Operating System (well, not very easily anyway).

How it works
First of all, you have to build out the basic components of a XenDesktop farm. Yes, it can share some components with the rest of your infrastructure, but you’re going to need to build a Desktop Delivery Controller, you’re going to need a XenDesktop farm database, you’re going to need either a virtualization host (if you’re going to use virtual PC instances) or some physical PCs or blades, and you’re going to need an Operating System image with the target application installed into it. You may also deploy Provisioning Services if you want to stream the OS image either to your virtual infrastructure or to your blade PCs. In short, you go through the same process that you would go through if you were putting together a XenDesktop infrastructure to deliver a virtual desktop…but in this case, we’re delivering an application, not a desktop.

Here’s a high-level overview of the process:

  • Create an OS image.
  • Install the XenDesktop Virtual Desktop Agent into the image.
  • Install the desired application. If the application needs “helper apps” (e.g., an accounting app may require Microsoft Excel to display reports), you can install them too. You can even install the Citrix Online Plugin, Offline Plugin, Single Sign-On Plugin, etc., if you want to launch those helper apps on a XenApp server or have XenApp stream them down to the desktop image for local execution.
  • Create a shortcut for your desired application. If you really need to launch multiple applications, or launch something like the Citrix Online Plugin, create a script or batch file to launch the applications you want to launch, then create a shortcut to that script or batch file instead.
  • Place that shortcut into the C:Program FilesCitrixICA ServiceSeamlessInitialProgram folder of your desktop image. NOTE: If you try to put more than one shortcut in that folder, you will get an error!
  • Using the Citrix XenDesktop tools, convert your image into a VHD if you’re going to be streaming it via Provisioning Services or deploying it in a virtual environment. Like any other XenDesktop image, it can be a private image that is either preassigned to a specific user or assigned on first logon, or it can be a public image that you use with Provisioning Services to boot and run multiple instances.
  • Publish that application. It can be displayed via the Citrix Web Interface right alongside other applications that are being delivered via XenApp.

When the user clicks the icon, the application will be launched within the desktop OS, but will run as a “seamless app,” meaning that it looks and feels to the user as though it was running locally (just as applications published from the XenApp farm do). The user will never know, or care, which apps are running on XenApp servers and which are running on desktop OS instances.

Just as you would with any other XenDesktop deployment, you can configure, via the Desktop Delivery Controller, how many OS instances you want running in an idle state at any given point in time during the day – this eliminates the need for the user to wait for the PC/OS to boot before launching the app. Remember, though, that a desktop OS is not multiuser…meaning that if you have ten people who may need to run that application at the same time, you have to provide resources for ten virtual PC instances (or ten blades, as the case may be). And if you have two different applications that need to be deployed this way, you’re probably going to need to provide separate resources for each application. (Yes, I suppose you could create a script that launched both apps – but do you really want your users to click on a single icon and launch two completely different apps? Never mind the fact that the users who need one of the apps may have no overlap with the users who need the other one.)

Here are a couple more things to remember:

  • Your users are going to be remotely interacting with a Microsoft Desktop OS. That means you’re going to have to comply with Microsoft’s VDI licensing requirements. We’ve beat that horse to death elsewhere in this blog, so we won’t go into it again here.
  • Citrix never expected that VM hosted apps would be used for more than one or two percent of all the applications you may need to deploy in a XenApp environment. But sometimes that one or two percent represent business-critical apps, even if they’re only business-critical to a handful of your users.
  • You do not need XenDesktop licenses to do this. Users who launch a VM hosted app will consume a concurrent-use license from your XenApp license server. Users who launch multiple apps, e.g., a VM hosted app and several other apps delivered via XenApp, will still consume a single license.
  • You could also use VM hosted apps to quickly deploy an application while you’re figuring out how to make that application run on XenApp. Once you’ve figured that out, just re-publish the application. The users will never know – they’ll go to the same Web Interface and click on the same icon, and the app will launch.

So – back where we started this: If you’re one of those who are struggling to figure out how you’re going to continue to support IE6 in your environment while still migrating your users off of Windows XP, this is one potential answer for you. Deploy IE6 on Windows XP using VM hosted apps. Your users will never see the XP desktop, so they’ll never know.

A very cool tool to have in your toolbox, in our opinion.

If you want to know more about VM hosted apps, here are a couple of videos from Citrix TV. The first is from the XenApp Expert Series, with our old buddy Vinny Sosa (on the left) and Modesto Tabares talking about various use cases for the feature. This one will take you about 25 minutes if you watch the whole thing:

…and here’s a more technical video from the Learning Lap series that actually takes you through the installation and configuration of VM hosted apps. This one is about 20 minutes long:

6 replies
  1. Tom
    Tom says:

    Thanks for the article. Does this still work using xenapp 6.5 and xendesktop 7.0? From what I can tell do I just install the desktop controller from the xendesktop package and connect that to the xen app controller?

    Thanks

    Reply
    • Sid Herron
      Sid Herron says:

      Tom,

      It certainly still works in XenApp v6.5. I haven’t drilled down into the XenDesktop v7 documentation, so I’m not 100% sure on that. However, given the additional licensing complexity that it introduces (at least for users who were primarily deploying XenApp and really didn’t want to build a XenDesktop delivery infrastructure), the “Reverse Seamless” functionality in XenDesktop 7 might be a better choice. “Reverse Seamless,” (a.k.a. HDX Local Seamless Apps) refers to running an application on the CLIENT PC, and pulling the user interface seamlessly into the XenApp desktop so the user isn’t confused by having to switch back and forth between a local desktop and a remote desktop.

      Also, now that WinXP is at end-of-life, it’s pretty tough to recommend ANY solution that involves having users attach to a WinXP desktop. If you’ve got apps that require WinXP to run, it’s time to bite the bullet and get rid of (or upgrade) those apps.

      Reply
    • Sid Herron
      Sid Herron says:

      John,
      Thank you for your comment. Unfortunately, I see a couple of problems with what you’re suggesting. First, the future for 16-bit applications is limited no matter what you do…but I’m sure you know that. The other problem is with Microsoft licensing for virtual desktop access. A private company that wanted to run your application could certainly leverage the “VM Hosted Apps” feature to launch 32-bit instances of Windows XP (or Windows 7, assuming your app will run on 32-bit Windows 7) to support it. But there is no way that I know of for you to legally market it as an on-line service using VM Hosted Apps, because Microsoft does not include Windows 7 (or Windows XP) in their Service Provider License Agreement (SPLA). There is currently no way that I, as a service provider, can legally provide you with remote access to a virtual instance of Windows XP or Windows 7 running on my cloud infrastructure and charge you by the month for it. That’s why all of the companies – or at least all of the companies that are doing it legally – that are providing “Desktop as a Service,” ourselves included, use Windows Server 2008 R2 with Citrix XenApp v6.5 to deliver cloud-based desktops. (There is a set of policies that we can apply to a Windows 2008 R2 server that makes the desktop look and feel like a Win7 desktop.)

      You might be able to deliver your app using a 32-bit version of Windows Server 2003 or 2008 (not R2) with XenApp v5.0, but you’d have to thoroughly test the app on your chosen platform first. Moreover, those products are already nearing end-of-life. Frankly, before you put a lot of effort into trying to market your app this way, I’d suggest you first put some effort into re-writing it as a 64-bit-compatible app that conforms to all the Windows programming conventions so you can run it under Remote Desktop Services on a 64-bit Windows Server.

      Reply
  2. Moose Administrator
    Moose Administrator says:

    Good question, Saadallah. We’ll look into this. Remember, though, we’re not talking here about deploying general-purpose VDI. We’re talking about deploying application-specific instances of a virtual desktop to handle applications that won’t play nicely on XenApp.

    Reply
  3. Saadallah Chebaro
    Saadallah Chebaro says:

    Hello,

    Very interesting article. Just a question though , will this work with MCS pooled VM`s instead of using a private or PVS delivered image ?

    Thanks.

    Reply

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.