Kevin Remde's IT Pro Weblog
IT Pro Resources
TechNet EventsMicrosoft Security Response CenterTechNet IT Manager Community HubMicrosoft Virtual AcademyKevin’s Evaluation Download Center
IT Pro Evangelist Blogs
Blain Barton Blain Barton's Blog@BlainBar
Brian LewisMy Thoughts on IT...@BrianLewis_
Dan Stolts IT Pro Guru Blog@ITProGuru
Jennelle Crothers TechBunny@jkc137
Keith MayerIT Pros ROCK!@KeithMayer
Kevin Remde Full of I.T.@KevinRemde
Matt Hester Matthew Hester's WebLog@MatthewHester
Tommy PattersonVirtually Cloud 9@Tommy_Patterson
Yung Chou Yung Chou on Hybrid Cloud@YungChou
Today’s installment of our “Build Your Private Cloud in a Month” series is the third of a 5-part mini-series we’re calling “Deploying Private Cloud Workloads”. This week we (Tommy Patterson, Blain Barton and I) are going to detail and demonstrate some of the key areas in System Center 2012 SP1 Virtual Machine Manager that support the foundational concepts and objects in your Private Cloud arsenal:
To follow along, make sure you have installed a test lab with Windows Server 2012 and the Virtual Machine Manager component of System Center 2012 SP1. (Click the links and download the evaluations, please.)
Today’s topic is Guest OS Profiles in System Center 2012 SP1 Virtual Machine Manager.
What is an Application Profile?
From the TechNet entry on the subject: “An application profile provides instructions for installing Microsoft Server Application Virtualization (Server App-V) applications, Microsoft Web Deploy applications, and Microsoft SQL Server data-tier applications (DACs), and for running scripts when deploying a virtual machine as part of a service.”
So, there are three Application Profile application types, and each will be used (and re-used) when we want to add a deployable Web Application, Server App-V application, and SQL Server DAC to virtual machine templates that are being deployed as a part of a service template.
And that last part – service template – is important. Like some of the properties of the Guest OS Profile we talked about yesterday, Application Profiles will only be deployed when used in a virtual machine is a part of a service deployment.
Why are Application Profiles Useful?
Just like any other template, if we have a way to define and implement something that will be used over-and-over again, there is a benefit of creating it once and then re-using as needed. It saves time, and reduces the opportunity for user-errors. (PEBKAC*, or ID-10-T** errors.)
How do I create an Application Profile?
We’ll find Application Profiles under the same section of the Library as we did the other two profiles we’ve discussed.
Right-Click it, and create a new one.
Give your Application Profile a name and a description…
Notice that under Compatibility you have some choices:
For this example, I’m going to choose General.
Now click on Application Configuration…
…and notice that I’ve already selected “64-bit edition of Windows Server 2008 R2 Enterprise”. You of course will choose the operating system version onto which this application will be installed.
Now click Add…
…and you’ll see that I can add any of our three application types, plus add some scripting. And in fact, because I selected “General” Compatibility earlier, I can add more than one of these to the same application profile.
For the rest of this example, I’m going to open up a pre-built Application Profile to show you how one might be configured for a Web and then an App-V application. Here is one for the web tier of a sample “Stock Trader” application..
You can see that this Application Profile includes two web applications (Trade Web and Config Web), one each of pre-install and post-install scripts for the Trade Web application, and one pre-install script that will run before anything else runs.
NOTE: I have application packages that have been saved in the VMM Library, and clicking on Browse allows me to select the packages or custom resources required. The creation of the applications, packages, and custom resources are beyond the scope of this article.
Settings for an application are surfaced here and variable values can be edited. In some instances, you’ll use placeholders so that, when the service is finally being deployed, you can fill in values that will be used when the applications are finally installed or the scripts are finally run.
Notice what options you have for configuring this script…
I can specify the type of script command it is, from a number of options. I also enter what the executable program will be (in this case just the command engine cmd.exe), command parameters, and a script resource package. I also specify the Run As account – which is the security context that this command should be run in.
Let’s look at an example of an Application Profile that defines the installation of a Server App-V application:
This is an application that was packaged using Server App-V that I pulled from the library. (Click the link for details on Server App-V). Again, this is an application that contains variables that will contain values during the configuration of the application. And we’ve also defined some scripting to configure the server with the application; both pre and post-installation.
How do I USE an Application Profile?
For my example, I’m going to build the Middle Tier VM Template of a four-tier service. And I’m going to include the “ST Order Processing” Application Profile as I build the machine template. (I’ll also use a Hardware Profile and Guest OS Profile that I’ve already created.)
And then when I’m done building the VM Template, I’ll create a new Service Template that includes all four of my VM Templates.
VM Templates are found in Templates, at the very top of the Library section (above Profiles):
I’ll start by creating a brand new VM Template that uses the Windows Server 2008 R2 Enterprise Evaluation as its source .vhd image.
Click Next. in the VM Template Identity form, I’ll name my VM Template “Stock Trader Mid OP Tier”, since it will be the template that builds the machines running the middle-tier Order Processing application in my Stock Trader service.
Click Next. Here’s where the work of the last couple of days pays off. For the description of the hardware, I can use a previously created Hardware Profile. Mine is called “Stock Trader Server HW Profile”. It has everything about the hardware for the VM pre-configured; including the networking configuration.
Click Next. Similarly, I can pull in a pre-created Guest OS Profile that I named “Stock Trader Guest OS Profile”.
You can see that it comes pre-configured with OS, Administrator account, product key and domain membership information already defined. Note that in my desire to keep the Guest OS Profile more generic, I didn’t enter anything unique about the Computer Name in the profile. But now that I’m using the profile for a specific machine type, I can edit it here. I’m going to use “ST5MidOp###”, so that the machines will all be named uniquely but similarly, and will have incrementing 3-digit numbers at the end of their names.
Notice also that I didn’t add any roles or features in its definition. This is fine for this VM Template, but there are others (the Web Tier machine, for example) that I have added things like Application Server and IIS components.
Click Next. Here’s where I can select and use my ST Order Processing Application Profile…
I’ll click Next, click Next again to skip over the addition of a SQL Server application to this template, and then on the Summary page I’ll click Create.
The Jobs window opens, and in short order the “Create Template” job completes successfully. And hen I look back at my list of VM Templates, I now see this:
Now I’m ready to use these in the creation of my Stock Trader Service Template, and then to deploy the Stock Trader Service based on that service template.
See “Creating Service Templates in VMM” for more information on how that’s done.
For More Information
For more details, I recommend the following articles and locations for expanding your knowledge of System Center 2012 SP1, Virtual Machine Manager, and VMM Guest OS Profiles:
Was this useful? I hope so! Let me know in the comments if you have any questions, concerns, clarifications, or cheap shots at me or Microsoft. (Hit me with your best shot! I can take it! )
* “Problem Exists Between Keyboard And Chair”
** Telling the user it’s an “ID 10 T” error is just another way to call them an ID10T.