Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Working with Virtual Environments

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Virtual environments are the entities on which you perform most of your tasks when you use Lab Management, such as development, application deployment, and testing. An environment is a group of machines. A virtual environment managed by Lab Management is a group of virtual machines. Grouping allows you to define machines that are required for an instance of your multi-tier application and to perform tasks on that entity as if it were a single unit. The following list includes examples of these tasks:

  • Create and start the environment

  • Take snapshot of the environment

  • Deploy your application to various machines of the environment

  • Run test cases on the environment

By using Lab Management and Microsoft Test and Lab Manager, you can create and use virtual environments in a variety of development tasks.

  • If you are developing one or more components of a multi-tier application, you can use a single virtual environment that contains multiple virtual machines. Each virtual machine constitutes a separate tier of your application. In most cases, you would want a virtual environment to mimic the way the application would be set up in production.

  • If you are developing a server application that can be deployed in multiple topologies, you could define a separate virtual environment for each topology. For example, you might want to test your server application in two topologies:

    • Where the database and application tiers are on the same machine

    • Where the two tiers are located on different machines. You can then define one virtual environment for the first topology and one virtual environment for the second.

  • If you are developing a desktop or client application, you can create the virtual environment using a single virtual machine.

You can also define a virtual environment with only some components of the application. Other components are shared across environments. For example, if your application needs a large database, then you can choose to host a shared database on a physical machine. All virtual environments will have only virtual machines for the client and application tiers.

You can create a virtual environment on a team project host group or in a team project library share.

When an environment is created on a team project host group, the virtual machines of the environment are hosted on a Hyper-V host. When the environment is started, the corresponding virtual machines are started and you can interact with those virtual machines. This environment is now considered to be an active environment. You can view and manage active environments under the Lab tab in Microsoft Test and Lab Manager.

When an environment is created on a team project library share, the virtual machines or templates of the environment are stored on the disk of the library server. In this case, the environment is simply a passive set of files. Until the environment is deployed onto a team project host group, you cannot do anything more with it, and the environment is now considered to be a stored environment. Stored environments are viewed and managed under the Library tab in Microsoft Test and Lab Manager.

The process of making a copy of a stored environment and creating an active environment from the copy is called deploying. The process of making a copy of an active environment and creating a stored environment from the copy is called storing.

Note Note

The term deployment here should not be confused with application deployment. While the former means creating an active environment, the latter means installing bits of the application on an environment.

Create and deploy an environment

All the supported ways of creating environments are summarized in the picture above. A team can adapt these creation operations to suit the needs of their development process. A typical scenario using environments might be:

  1. Import: A team project administrator or lead imports virtual machine templates in a team project library share. These templates are "golden" images of standard operating systems or operating systems combined with the prerequisite software for the application being developed.

  2. Create active environment: A team project member creates an active environment by grouping virtual machine templates. After they have been created and started, the virtual machines in the environment are running and available for use.

    1. The team project member connects to the environment and installs all the prerequisite software for the application being developed or tested.

    2. The team project member takes a snapshot of the environment in order to return to this pristine state and install a newer version of the application whenever a new version is needed.

    3. The team project member installs the latest version of the application and makes any post-installation configurations.

  3. Store: The team project member stores a copy of that environment in the team project library share. This will save time for the rest of the team members as they do not have to install the application or its prerequisites again.

  4. Deploy: Each team project member creates a fresh instance from that stored environment for his or her daily work.

  5. Store: When a team project member finds a bug, the team member takes a snapshot of the environment to preserve the bug. At the end of his testing, he stores another copy of the environment to library.

  6. Deploy: A developer can deploy a copy of the environment stored with the bug to reproduce and fix the bug.

  7. Delete: When the environments are no longer needed, the team project members who created the environments remove them from both the host groups and the library shares.

The above scenario is not intended to be prescriptive and must be adapted to the needs and processes followed by individual teams.

Show:
© 2015 Microsoft