Our development team is, as many of you already know, deeply integrated with Visual Studio & Team Foundation Server (TFS) 2010.  It shouldn’t shock anyone to hear that we are also taking a deep investment on the new Application Lifecycle Management (ALM) functionality exposed as part of Visual Studio 2010.  A couple months back we started working hard at getting Microsoft Test Manager (MTM) and Microsoft Lab Manager (MLM) working for management of our test cases and infrastructures.

Lab Manager is designed to facilitate development teams by offering the following:

  1. Ability to best utilize physical & virtual resources by all members of the development team
  2. Facilitates the deployment of “environments” that can be utilized for testing of new or old builds
  3. Easy Integration with MTM to support automation testing against new builds
  4. Tight integration with TFS 2010 Reporting

Lab Manager has a great number of pre-requisites which often development teams will not have the built-in skill sets to make use of.  For some companies, development teams might utilize resources owned and operated by other parts of the IT organization.  This is the purpose of my post today is to focus on the latter where your software development team decides to utilize resources owned and operated by others in IT.

Cluster this, Cluster that….but don’t you Cluster Microsoft Lab Manager

The first thing to share when seeking out the IT staff who owns and runs your Virtual Machine Manager (VMM) infrastructure is to let them know that Microsoft Lab Manager does not support deployments to clusters.  This is by design though one that will certainly make most VMM administrators frown upon as everyone knows that VMM certainly supports it, though MLM does not.

VMM Admins:  What are you going to need to get Lab Manager working?

The first question, I anticipate, asked by many who run VMM for organizations and have testers and developers asking for access is – what type of access?

The first thing to note is that Microsoft Lab Manager does not require each “user” of there application to have administrator rights to your VMM server.  All work is performed by the

VMM Administrator Checklist 101 for Microsoft Lab Manager

There are a few steps that the VMM administrator (or a delegated individual) will need to take to setup the development team for success.  In this section, I will do my best to summarize the steps required for a VMM administrator to get everything ready for integration with TFS.

Step

Action

Details

1

Install VMM Console on TFS 2010 Application Tier In order for TFS web services to communicate with VMM, the VMM Administrator console is required.  The web services interface with the PowerShell command-lets that are available in the VMM PowerShell provider.

2

Create VMM Host Group with physical hosts to be utilized by Lab Manager All “deployments” in Lab Manager occur against a host group.  For many VMM administrators, they will have multiple host groups containing individual physical hosts.   Access is granted in Lab Manager to a set of physical hosts through authorizing them to deploy to a host group.

3

Create VMM Library Server Lab Manager can utilize any library, though, one should expect that high utilization is going to greatly increase the number of “objects” stored in the library.  Where possible, I highly recommend you create a dedicated library for use by Lab Manager. 

4

Create VMM Templates to be used by Lab Manager users Lab Manager depends on VMM Templates for creation of new virtual machines.  These templates need to already exist for Lab Manager users to base their new templates on.

5

Grant VMM Administrator rights to the TFS Service Account This is the account that is running the TFS services, and as such, should be a dedicated service account.  Unfortunately, VMM administrators have to trust the owners of this account because this account is what is used when creating objects on behalf of other users (e.g. Dev, Test, etc.)

In the following sections, I will go a bit deeper into each of these steps to hopefully give context around the checklist item.  For now, though, you can simply trust that if you do the above that Lab Manager will be successful when setup in the TFS Administration console.

Host Groups:  Lab Managers Physical Hosts Access Point

Unless you are a very small IT environment, very seldom do VMM administrators use the default Host Group that is shipped as part of VMM 2008/R2.  The host group, All Hosts, represents the top of the virtualization tree and typically doesn’t have any physical hosts.  Instead, administrators often will “group” virtualization physical hosts into something called host groups which are a way of putting “like” resources together and managing them as a unit.  Hosts groups offer VMM administrators the ability to do the following:

  1. Set the hosts to allow Unencrypted Transfers
  2. Set performance characteristics on the physical hosts (resource constraining)image
  3. Manage behaviors associated with Performance & Resource Optimization (PRO)

In the image below, I want to show you how one VMM Administrator might build their host groups when running production level resources along with TFS Lab Manager resources.image In the case above, we have physical host groups which include production clusters, non-production clusters, and lastly the resources dedicated to TFS Lab Manager Hosts.  For today’s post, I’m focusing on the latter which is TFS Lab Manager Hosts.  To create a host group in VMM, you do the following -

  1. Right-click on All Hosts (or the parent folder of the host group you would like TFS hosts to live), select New Host Group
  2. Provide a new Host Group Name
  3. To select the physical hosts to put into that host group, highlight the physical host, right-click, and select Move Host Group (not available when on a clustered resource)image
  4. Select the host group to move the host to (in this case, TFS Lab Manager Hosts)

How Lab Manager utilizes VMM Library Assets?

There are a couple of steps involved in the library assets as mentioned above.  I hope to clarify those below and make it make sense to a VMM administrator.

VMM “Master” Templates – Source of all Virtual Machines

The first thing that a user of Lab Manager will need to do on a per-project basis is to import templates that have already been created by the VMM Administrator.  This is a key step that enables the dynamic creation of machines that serve as a “Complete” set of resources needed to test a Web application.  What do I mean by a complete set of resources? 

By today’s standards, not many applications are necessarily built on a single machine.  They often include front-end application tier servers along with Web services and Data services residing on other servers.  All these servers make up a single, “complete” set of resources needed to test new builds.

image

In the above example, we have two machines that serve as an “environment” – ConfigMgr Server & Database Server.  This deployment would deploy two servers and configure them to communicate with each other so that we can do testing of our application(s).

The first step is to create master templates that will serve as the basis for your machines.  These templates include both hardware and Operating System configurations and should be available on the library server serving the TFS Lab Host group.

For information on creating these master templates, see my blog post around creation of Library objects.

Lab Manager:  Importing Master Templates to Project

The next step is to “import” the master templates to the project which needs to use them.  After importing, you can create any number of machines from these templates and these result in a unique “new” template in VMM.  This is another reason for ensuring that the library is one that is separate from other libraries as this will seriously litter your VMM library with ugly templates. (see below)

To import in Lab Manager, do the following:

  1. Open Microsoft Test Manager 2010
  2. Click Lab Manager
  3. In Lab Center, click Virtual Machines & Templatesimage
  4. Click Importimage
  5. Under Path, click Browse the VMM Library and locate the template for importing and provide machine detailsimage
  6. Click Next
  7. Then Finish

The nice thing is the Default role, you can give it a friendly name through type rather than choosing on of the default role types.

Configuring TFS 2010:  Enable Lab Management

After the work has been done on the VMM side, there are a couple of things that need to be done on the TFS side.  Those are listed below.

First, install the VMM Administrator’s Console on the TFS Application Tier server.  To do this, simply use the VMM setup.exe.

Second, you need to enable Lab Management.  To do this, do the following:

  1. Open the TFS Administration Console
  2. Open Application Tier
  3. Click Lab Management
  4. Click Configure Lab Management image
  5. Enter the Fully Qualified Domain Name (FQDN) and click Test
  6. Click Network Isolation Tab, enter a non-routable IP Address block to use for isolation
  7. Select the FQDN for lab manager to use
  8. Click OK

Third, and most importantly, enable Lab Manager for the TFS collection(s).  To do this, you will do the following:

  1. In TFS Administration Console, click Team Project Collections
  2. Highlight the Collection
  3. Click Lab Management tab
  4. Click Configure Library Shares
  5. Configure Host Shares
  6. Configure Service Accountimage

That’s it.  You should be working.  If not, there are multiple documents that walk you through in much more detail listed below -

Summary

In today’s post, I focused a bit on hopefully bridging the gap for those VMM administrators who will get attacked by software engineering organizations asking for resources from your VMM pool.  I don’t expect many VMM administrators to be overly familiar with MTM & MLM so I hoped to create a “cliff notes” for those Admins by sharing what they will need to do to support MLM as well as what to expect when using MLM integrated into VMM.  If succeeded, then you have carved off a set of physical hosts in the form of host groups that are used by MLM and also built library resources for them to utilize.

Enjoy!

Thanks,

-Chris

Digg This