Creating Virtual Environments
Visual Studio Lab Management lets you manage a set of virtual machines as virtual environments. Each environment consists of a collection of virtual machines. Each virtual machine in the environment is assigned to a role that is required for your application. By using virtual environments, you can manage these virtual machines as a single entity. This simplifies the process of preparing an environment to use for development, testing, or running your application. For example, you can use Lab Management to start all the virtual machines in the environment at the same time to run an application or test an application. Also, you can take a snapshot of your entire environment so that you can re-create the exact state of all the virtual machines in this environment at a specific point in time.
Note
To use a virtual machine for testing with Lab Management, the virtual machine must have a test agent installed on it. Your virtual machine must have one of the following operating systems to run a test agent:
-
Windows Server 2008 Release 2 or later versions
-
Windows Server 2008 SP2 or later versions
-
Windows Server 2003 SP2 or later versions
-
Windows 7 Original release or later versions
-
Windows Vista SP2 or later versions
-
Windows XP Professional x86 with SP3 or later versions
For more information about the system requirements for test agents, see Test Controller and Test Agent Requirements.
This section describes the procedures for creating and operating virtual environments. Topics in this section assume that you are familiar with Lab Management and virtual environments. For more information, see Using a Virtual Lab for Your Application Lifecycle and Virtual Environments Concepts and Guidelines.
Tasks
The key tasks for creating virtual environments for testing and development with Lab Management are as follows:
Visual Studio Developer Center: How Do I: Create a Virtual Environment with Lab Management |
This video walks you through the experience of creating a virtual environment. The video demonstrates the two ways to create a new virtual environment:
|
Import virtual machines and templates from System Center Virtual Machine Manager into your team project library. |
|
How to: Create a Virtual Machine or Template from an Environment |
Create a stored virtual machine or template from a deployed environment in your team project lab. |
How to: Create an Environment from Virtual Machines or Templates |
Create a virtual environment from the stored virtual machines and templates in your team project library. |
Special considerations for creating a virtual environment that uses network isolation. |
|
How to: Compose an Environment from Deployed Virtual Machines |
Create a virtual environment from virtual machines on a team project host group that are created and managed outside Lab Management. |
Special considerations for creating stored virtual environments in the team project library. |
|
Set the Lab Management properties of virtual machines and templates. |
|
Use Environment Viewer to connect to and operate deployed environments in your team project lab. |
Related Scenarios
Configure and run scheduled tests after you have built and deployed your application
You can check the quality of builds for your application. You can use a specific lab template for a build definition that you created by using Team Foundation Build to build your application, deploy the application to an active virtual environment, and then run automated tests for that build. This process lets you make sure that the tests are run in a clean environment by using a known state for your virtual environment.
For more information, see How to: Configure and Run Scheduled Tests After Building and Deploying Your Application.
Create reproducible bugs that include the environment used for testing
When you are running your manual tests with Test Runner, you can create a bug that includes a link to a snapshot of your virtual environment when the bug occurred. The developer can open the bug and use the link to connect to the snapshot for this environment to see the actual state of the environment at that point in time. This can greatly reduce the time for the developer to reproduce a bug.
For more information, see How to: Run Manual Tests and Create Reproducible Bugs With Virtual Environments.