Important: The instructions in this post only apply to the Beta2 version of Team Foundation Server 2010. For Beta1, see this post.

If you are upgrading your Visual Studio Team Foundation Server (TFS) 2008 to Visual Studio Team Foundation Server 2010 Beta2 and want to enable Lab Management features for your existing projects you will need to follow a set of steps. This blog post covers details about these steps.

So, first upgrade your TFS server. Then you can configure Lab Management using TFS administration console and start using these features for new projects. To enable Lab Management features on existing team projects use the following steps.

Pre-requisites

Step 1 - Configure Lab Management

You can configure Lab Management by using the administration console for Team Foundation.

  1. Click Start, All programs, Microsoft Team Foundation Server 2010 Beta 2, and then click Team Foundation Administration Console.
  2. In the Administration Console, in the Application Tier node, click Lab Management.
  3. Click Configure Lab Management.
  4. On the Virtual Machine Manager tab, in VMM Server Name, type the name of the server that is running Virtual Machine Manager and that you will use to manage the virtual machines.
  5. Click Test to determine whether Visual Studio Team Foundation Server can communicate with the VMM server.
    1. If Team Foundation Server service account does not have the appropriate permissions on the specified VMM, a dialog box prompts you for your username and password.
    2. Specify the credentials of an existing member of VMM Administrators Role. Using this username and password, the Team Foundation Server service account will be added to the VMM Administrator Role.
      • If Team Foundation Server cannot contact the VMM server, a red x and an error message will appear.
  6. In Network Location, select network location from the drop-down list. Click OK.

Step 2 - Configure Lab Management for the Project Collection hosting upgraded projects

  1. Click Start, All programs, Microsoft Team Foundation Server 2010 Beta 2, and then click Team Foundation Administration Console.
  2. In the tree pane, click the Team Project Collections node under Application Tier.
  3. Select the project collection hosting upgraded projects.
  4. Click on Lab Management tab for the selected project collection.
  5. In the results pane, click Configure Library Shares.
  6. Click Add, select one or more VMM library shares that this team project collection will use, and then click Add. You can add a library share to only one team project collection at a time.
  7. Now to configure Host Groups for this collection, select Host Groups tab.
  8. Click Add, select one or more host groups that this team project collection will use, and then click Add.
  9. Click Verify to verify the status of selected host groups. Click OK.

Step 3 - Configure Lab Management for upgraded Team Project(s)

Download the zip file attached to this post, and extract it to a local directory such as C:\Upgrade.

Before you run the script, open “EnableLabManagement.bat” in a text editor and complete the configuration by specifying values for the following:

  • Team Foundation Server URL
  • Name of the team project collection
  • Name of the team project
  • Path to TFSLabConfig.exe utility
  • Set ConfigComplete = 1 to indicate that you’ve completed this step

This script will grant default Lab Management permissions to standard security groups, ex. Readers, Contributors, Project Administrators and Project Collection Administrators.

Rerun the batch file for each existing project, after updating project name in the batch file.

- Vishal Mehrotra

[Edit] - Modified the script as per the updated syntax.