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:
<font style="background-color: #cccccc">Msiexec /i "<var>path</var>\MSI\IBM WebSphere MQ.msi" <font style="background-color: #ffff00">/l*v c:\install.log</font> /m <var>mif_file</var>
TRANSFORMS="1033.mst" AGREETOLICENSE="yes" ADDLOCAL="Server"</font>
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.
Here are a few additional resources related to Microsoft virtualization and private cloud you may find interesting.
- 4 Hyper-V performance testing tips for the private cloud
- Great info on Hyper-V Dynamic Memory and Virtualizing SQL Workloads
- Hyper-V Network Optimizations and Best Practices [Private Cloud]
- A look into Servicing Windows in Virtual Machine Manager 2012 (via PowerShell)
- Configuring PRO integration between OpsMgr 2012 and VMM 2012
- [Private Cloud]: Configuring anti-affinity between VMs on Hyper-V 2008 R2 SP1 and VMM 2012
- Implementing rapid scale-out of a machine tier in VMM 2012 via PowerShell
- Cloud: A quick note on accurately measuring Hyper-V host performance and utilization
- What’s new in the Cloud Services Process Pack (CSPP) Release Candidate for System Center 2012?
- Private Cloud in the real world: 5 lessons from the private cloud fabric
- How to prepare for Orchestrator? Learn Opalis in a month of Friday afternoons! (free online resources)
- PowerShell Scripts for System Center (Master Collection)