3 Tips to Streamline Application Configuration, Deployment and Troubleshooting in VMM 2012 service templates (PCITRW)

As part of the  private cloud in the real world (PCITRW), I wanted to quickly share a some tips for building out and testing service templates in Virtual Machine Manager 2012 (VMM) in which you are deploying multiple applications. The application deployment functionality in VMM 2012 service templates is really great, but can be challenging when you are deploying a complex service with multiple applications. Below are three tips I can offer from my experience deploying services with VMM 2012 in the lab and in the field.

VMM 2012 includes three 1st class application deployment technologies, specifically:

  • WebDeploy – For IIS applications
  • Server App-V – To virtualize applications that can be virtualized (similar in many ways to App-V as you know it on the client side)
  • SQLDAC – SQL data tier applications for deployment and configuration of SQL databases.

And for everything else, we can use generic command executions (GCE), which generally come in the form of PowerShell, Windows Installer and batch files.

Here on some thoughts on how to ease the configuration and testing process.

1. Install Apps Manually First to Identify Role and Feature Dependencies

When you install an application for the first time, it’s a great idea to do it manually first just to determine if your VM template has all the prerequisite software components. If there are role and feature dependencies, these can be enabled in the properties of the VM template within the machine tier (see figure 1 below) , but there may be other components you need to install as well. 


figure 1. Enabling automatic installation of roles and features in VMM service template to facilitate application deployment.

2. Configure Logging for Your GCEs

More often than not, a GCE is going to be a PowerShell script, Windows installer package (MSI) or batch file. Enabling logging is really important if you want to get to root cause in the event of a failure.

For example, verbose logging in an Windows installer package looks like this:

And in the UI, if you click on the Advanced button (shown in figure 2), which opens the Advanced Script Command Settings window:


figure 2. Advanced Script Command Settings button

You can configure logging location and exit code match (for success or failure) in the UI (shown in figure 3):


figure 3. Advanced Script Command Settings detail

3. Build and Test Service Templates in Layers

If you are building a multi-tier service template, you may consider testing one tier at a time. For example, build the data tier and make sure your SQL install goes as planned. Then, make a copy of the template and add the application tier, and on a later iteration, the web tier. I like this approach particularly in situations where I am deploying several applications within the tiers of the service template.

Additional Resources

Here are a few additional resources related to Microsoft virtualization and private cloud you may find interesting.

Leave a Reply

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