VMware Mirage

Using ThinApp Virtual Applications in VMware Mirage App Layers

As you all know, VMware ThinApp has been the leading application virtualization solution since 2008. ThinApp is great for application virtualization, for application isolation (enabling multiple versions of the same application on one desktop), and for supporting older applications (legacy apps). Packaging an application with ThinApp is straightforward, and VMware has published many articles on this topic. You can find information through the VMware knowledge base article Best practices for capturing an application for VMware ThinApp 4.x/5.x (KB 1030290), and you can also find many good how-to articles on the ThinApp community forum. This article does not focus on the packaging of applications, but instead focuses on application deployment of ThinApp packages through VMware Mirage application layers (app layers). We expect that you are already familiar with creating and deploying Mirage application layers.

Using Mirage Dynamic Collections

Mirage app layer technology is an application distribution mechanism for physical PCs and virtual machines. You can assign an app layer to a machine or a group of machines based on multiple criteria, making the assignment very flexible. In addition, you can create a Dynamic Collection of similar PCs, and any subsequent PCs fitting the defined criteria will be assigned immediately to that collection. For example, the following screenshot shows a Dynamic Collection of HP desktops running Windows 7.

VMware_Mirage_Dynamic_Collection

Let us take a closer look at the main advantage of grouping your PCs into Dynamic Collections. You will see how this can be a very powerful tool when using Mirage app layers with ThinApp.

Assigning app layers to Mirage endpoints could be a tedious and repetitive task. As a Mirage administrator, consider the grouping you can do with Dynamic Collections to save on the total number of steps required to deploy applications to multiple desktops. You can group by Active Directory attributes such as a specific organizational unit (OU), or a group of computer accounts that have similar names such as Desktop1, Desktop2, and DesktopX, based on specific vendor or manufacturer information. Creating Dynamic Collections is a critical planning step in a Mirage deployment and should definitely be used for efficient implementation. Deployments that do not use the Mirage Dynamic Collection feature include many unnecessary manual steps to deploy applications to desktops. In addition to eliminating extra steps, the other main benefit of grouping desktops is that any new Mirage desktop coming online in the future which matches one of these Dynamic Collections will receive the assigned applications as soon as it synchronizes with the Mirage server.

Preparing ThinApp Packages for Mirage

When preparing a ThinApp package for use with Mirage app layers, you need to create an MSI file when you package the application with ThinApp. During the ThinApp capture and packaging process, two variables should be changed in the Package.ini file. By default, the capture process comments out the MSIFileName and MSIDefaultInstallAllUsers parameters. You need to uncomment these two parameters if you want to deploy the package with Mirage. The first parameter is to enable the creation of the MSI file. The second parameter is to make sure the application is available for all the users of the desktop. In the ThinApp Setup Capture wizard, there is an option to create an MSI package on one of the wizard pages (the Package Settings page). But there is no option in that same wizard to set the “all users” option. That is why it is important to go into the Package.ini file during the packaging process and check that these two lines are set properly. Your Package.ini file should look something like the following screenshot.

VMware_Mirage_ThinApp_Package

If you have existing ThinApp packages that you want to use in Mirage app layers, you can navigate to the ThinApp project folders, change the Package.ini files, and run the build.bat utility to recompile those packages with the proper parameters so that they are configured for Mirage.

Placing ThinApp Packages on the Mirage App Layer

Now, let us look at the simple process of making ThinApp packages available in Mirage app layers. First, you need to create an app layer in Mirage on an app layer provisioning machine. For more information on the steps required to capture an app layer in Mirage, see Capturing App Layers in the VMware Mirage Administrator’s Guide, or see the VMware Mirage community.

At a particular point in the Mirage app layer creation process, you install the applications. With ThinApp packages, you only need to place the ThinApp MSI files on the app layer machine in your preferred directory. Then, test the ThinApp packages by launching them, one by one (if you are placing multiple ThinApp applications in one Mirage app layer). You can also ensure that the applications were properly placed by navigating on the app layer provisioning virtual machine to the Control Panel and then to Programs and Features and checking that the ThinApp packages are listed there. You are now ready to continue the app layer creation process. Go back to your Mirage Console, right-click the app layer provisioning virtual machine, and select Finalize App Layer Capture, as shown in the following screenshot.

VMware_Mirage_Finalize_App_Layer_Capture

Updating ThinApp Packages on Mirage App Layers

How do you update ThinApp packages that are on a Mirage app layer? You can

  • Place an updated ThinApp package on the Mirage app layer
  • Redeploy the whole ThinApp package in a new app layer (not recommended)
  • Use a ThinApp feature called AppSync

I would not recommend the second method because it requires additional unnecessary steps. The first and third choices are the recommended, more efficient approaches; the approach you choose depends on your organization’s deployment and application life cycle management. If you choose the first method (placing an updated ThinApp package on the Mirage app layer), proceed with the following steps (almost identical to the steps for placing the original ThinApp package on the app layer):

  1. Select the app layer provisioning VM from Pending Devices section of the Mirage Console (remember that the VM must be in the Pending Devices list).
  2. Right-click the VM and select Create a new Reference CVD. Two choices will be presented to you.
  3. Select Create Reference CVD for App Layer capture.
  4. Go through the wizard and click Finish.

After this, the VM automatically goes into App Layer Capture mode.

  1. Follow the on-screen messages displayed in the VM, such as the following one. These messages tell you when it is time to install the application.

VMware_Mirage_Initializing_App_Layer_Recording

  1. Place the updated ThinApp MSI package on the app layer when you see the prompt. This step requires that the original MSI package be left on the app layer when you place the updated MSI package there. For more information on updating a ThinApp MSI package, see Upgrade a deployed ThinApp package with the help of MSI and A Guide to Updating a ThinApp.

VMware_Mirage_Recording_App_Layer

  1. After you have completed the placement of the application update, go back to the Mirage Console, choose the app layer capture VM, right-click it, and select Finalize App Layer Capture.

VMware_Mirage_Finalize_Capture

  1. So far, you have been performing the same steps as for a new application capture in a Mirage app layer. The important difference here is that now you make a different choice in the wizard when offered the choice to create a new layer or to update an existing layer. Select Update an existing layer.
  2. If it is a small update, for example, minor patches or bug fixes, select a minor version. If it is a major version update, select a major version. Your choice depends on the application and the number of times you have updated this application already. The result of your choice is that the version number assigned to the app layer is incremented by a small or large amount.

VMware_ThinApp_Package_Minor_Update

There are many benefits of using this method to update ThinApp packages on Mirage app layers. The main benefit is that the ThinApp packages are easy to maintain in this way: You only have to copy the updated ThinApp MSI package to the app layer capture VM and launch the MSI, and you are done with the update.

We have covered how to distribute updated ThinApp packages with Mirage app layer updates. Now, let us explain the other recommended method, which is to use the AppSync feature of ThinApp. When the ThinApp AppSync feature is enabled and properly set up with an AppSync Web server, end users can receive their ThinApp package updates without having to come into the office or even remotely log in. The ThinApp virtual application package independently checks the AppSync Web server for updates.

AppSync_Web_Server

AppSync is a very cool technology that has been part of ThinApp for a while. For more background information, see the blog post AppSync and thinreg integration, written by Peter Bjork, and AppSync Notes and Tips, by Dean Flaming. Setting the frequency of how often the ThinApp package looks for an update is crucial. You do not want to have the frequency set at a very small interval that might overburden the AppSync Web server with desktop requests, but you also do not want to have too long an interval (over a month) that might lead to applications in the field falling out of sync with the current version.

ThinApp AppSync works well with Mirage app layer technology. The ThinApp virtual application package can reach out and check the AppSync Web server for updates, independently of Mirage.

In summary, by taking advantage of the easy distribution and update features of Mirage app layers, combined with Dynamic Collections of Mirage-managed desktops, you can very efficiently distribute ThinApp packages and updates throughout your Mirage deployment and make sure that any new desktops coming online will receive their assigned applications very quickly.