Getting Started with Lab Management
With Visual Studio Lab Management you can manage a set of virtual machines as a single entity called a virtual environment. Each environment consists of one or many virtual machines for each role required for your application. The environments that you create make up your virtual lab. Then you use the virtual lab to deploy applications and run tests using Microsoft Test Manager. These environments are created by using the Lab Center in Microsoft Test Manager. Applications are deployed to these environments in your lab by using Team Foundation Build. Tests are run on these environments in your lab from the Test Center by using Microsoft Test Manager. For more information about Lab Management, see Using a Virtual Lab for Your Application Lifecycle.
Lab Management integrates with Hyper-V, SCVMM and Team Foundation Server to manage the virtual environments in your lab. Hyper-V hosts the virtual machines; System Center Virtual Machine Manager (SCVMM) is a tool for managing your Hyper-V host machines from a central console; Team Foundation Server enables you to manage your virtual environments on these host machines and associate them with a team project or a team project collection. You use Microsoft Test Manager to create, start and run tests on your virtual environments.
If you have existing virtual machines that were created by using Hyper-V, you can use them to create your virtual environment. Or you can create virtual machines with Hyper-V to use for your environment. For more information about how to create virtual machines, see How to: Create and Store Virtual Machines and Templates Ready for Lab Management.
For information about how to plan a more complex setup for multiple users and using virtual machines and templates as golden masters to create your environment, see Creating Virtual Environments.
Prerequisites for Getting Started
Before you start using Lab Management, make sure that you have the latest updates installed. To find the latest updates, see Update for Microsoft Visual Studio 2010 Lab Management and this Microsoft Web page.
You must configure Lab Management to work with Hyper-V, SCVMM and Team Foundation Server. To do this, follow the steps in this topic: Configuring Lab Management for the First Time.
Getting Started with Lab Management
You can compose an environment from existing virtual machines and then deploy your application or run tests on the environment. To be able to compose an environment using Microsoft Test Manager, verify the following prerequisites have been completed:
Create at least one team project in your team project collection. For more information, see Create a Team Project.
You must install Visual Studio Test Professional or Visual Studio 2010 Ultimate on a client machine so that you can use Microsoft Test Manager.
Make sure that the existing machines that you want to add to your environment are running on a host in a host group that has been added to your team project collection.
To get started with Lab Management
On a client machine that has Microsoft Test Manager installed, log on as domain\tfsadmin or any user who is a contributor in the team project.
Connect to a team project that is configured for Lab Management.
Click Start, All Programs, Microsoft Visual Studio 2010, and then click Microsoft Test Manager.
If you are prompted to add a Team Foundation Server, type the name of the TfsMachine, and then click Add.
Click the arrow to view the list of team projects in the team project collection, select the team project in the list, and then click Connect Now.
Click Lab Center from the drop-down list of centers, or if you had to add a Team Foundation Server, click Lab Center under Change project.
Click Continue to connect to the Lab Center of the selected team project.
The Environments pane is displayed.
If no team projects appear in the team project collection, the collection administrator might not have created any projects. If a project appears but is displayed as Not supported, the collection administrator might not have provisioned the library shares and host groups for that team project.
To compose a virtual environment, follow the steps in the procedure in the following topic: How to: Compose an Environment from Deployed Virtual Machines.
To view the state of your composed environment, click Lab. The Environments view is displayed. Select the composed environment that you created.
You should now see the capabilities that you enabled for this environment. The status is displayed with a blue check mark and Ready is displayed next to Testing or Workflow in the details for the environment.
If the status for each capability is correct, you have successfully completed getting started for Lab Management.
If the status is not correct for a capability, you can find help with your issue by using the following topic: Troubleshooting Lab Management.
You can now use your composed environment for any of the following tasks:
Deploy your application to a virtual environment: You can use the workflow capability to deploy your application to your environment after you have built the application. You can then use the environment to run tests or to have users test an internal release.
Run manual tests by using a virtual environment: You can use Microsoft Test Manager to run manual tests by using a virtual environment for the back-end tiers of your application.
Run automated tests by using a virtual environment: You can use your virtual environment to run automated tests from Microsoft Test Manager by selecting the environment as part of your test plan or when you run your tests from the Run Tests view.
Build, deploy and test your application on a scheduled basis by using the workflow and testing capabilities: You can use the workflow and testing capabilities if you want to schedule building your application, deploying your application, and running automated tests to check the quality of your build.
After getting started with this topic, you might want to determine what you need for your virtual lab to get all your users access to the environments that they require. For more information about this, see Creating Virtual Environments.