Creating an SCVMM Environment Using Stored Virtual Machines and Templates
You can create an SCVMM environment using stored virtual machines and templates. When you create an SCVMM environment this way, Microsoft Test Manager creates copies the virtual machines and templates and adds them to your environment.
Requirements
- Visual Studio Ultimate, Visual Studio Premium, Visual Studio Test Professional
Note
When you create an SCVMM environment, you can host your virtual machines on multiple hosts and groups of clustered hosts, unless you enable network isolation. If you add virtual machines to your environment, and those virtual machines are hosted on a cluster, you should also add at least one virtual machine that is not hosted on a cluster to your environment. In addition, you cannot use clustered hosts with a network-isolated environment.
This topic is about how to create a new SCVMM environment using stored virtual machines and templates. For information about the other ways to create and manage SCVMM environments, see Guidance for Creating and Managing SCVMM Environments. For an overview of lab environments, see Using a Lab Environment for Your Application Lifecycle.
This topic contains the following sections:
Prerequisites
Selecting the Templates or Stored Virtual Machines
Selecting the Templates or Stored Virtual Machines
Selecting the Templates or Stored Virtual Machines
Selecting the Templates or Stored Virtual Machines
New Environment: Advanced
New Environment: Verification
Completing the Configuration of the Machines
What’s Next
Prerequisites
Warning
To create a lab environment that contains virtual machines that are running Windows XP, perform the additional steps listed in Configuring Lab Environments that Contain Windows XP or Windows Server 2003 Machines.
The following prerequisites must be complete before you create an SCVMM environment using stored virtual machines and templates:
Each virtual machine that you add to the environment must be managed by System Center Virtual Machine Manager (SCVMM). Before you can create an SCVMM environment, you must complete the prerequisite tasks for SCVMM environments in Test on a lab environment.
One of the following operating systems must be installed on each stored virtual machine and template that you’re going add to the environment:
Windows Server 2008
Windows Server 2012
Windows XP SP3
Windows Vista SP2
Windows 7 SP1
Windows 8
File sharing must be enabled on each stored virtual machine and template that you’re going to add to the environment.
Selecting the Templates or Stored Virtual Machines
To create an environment, you copy virtual machines from your team project library.
To create a new SCVMM environment
Open Microsoft Test Manager and choose Lab Center and Lab.
You can now see a list of the lab environments in your team project.
Choose the New button.
In the New Environment wizard, choose SCVMM environment.
Fill the other fields in the wizard according to the following sections.
New Environment: Type and Name
Field |
What to enter |
---|---|
Name |
The name of the environment, which must be unique within your team project. |
Description |
Optional. |
Tags |
Tags are optional name-value pairs that you can set according to your project’s conventions. For example, your environments could use tags that indicate the purpose of the environment and the date after which it can be deleted. |
New Environment: Machines
In the Machines page, choose virtual machines or virtual machine templates to add to your environment.
Virtual machines available: |
This is the list of virtual machines and templates that are stored in your team project’s library. Typically, it includes machines in which different combinations of operating system, client applications, and server software have been installed. For example, you could choose a web client and a web server. If you cannot find an item with the features that you want, you can set up a new virtual machine and import it to the library. Choose Import. For more information, see How to: Import a Virtual Machine or Template from SCVMM. |
|
A virtual machine template is a virtual machine that has had its identity information removed. When you add a virtual machine template in an environment, a new virtual machine is created. A new name and port ids are automatically generated. |
|
When you add a virtual machine, an exact copy of it is made in your lab environment. You must therefore be sure to change its name. Typically a stored virtual machine is part of a workgroup. |
|
Running virtual machines are created independently of any environment. They are set up by an SCVMM administrator, and form a resource pool. You can attach these machines to your environment. A running machine cannot be attached to more than one environment at a time. When you have finished your tests, you should delete your environment so that the machine is returned to the pool. For more information, see SCVMM (virtual) environments |
Selected machines: |
You can set the following properties for each machine that you add to your environment. Notice that you can add the same virtual machine or virtual machine template more than once. You must give the machines different names. |
|
This name identifies the virtual machine within this environment. It is not the same as the computer name. Avoid using commas in the name. |
|
A role identifies the function of the machine in the environment. It can be used by Test Manager to determine what components to install for testing purposes, and what testing data to collect. You can either select a role from the menu, or type any role name that you choose. Note The role is just an indication of the intended use of the machine. Lab Management does not automatically verify that the virtual machines or the templates have the necessary software, nor install the software automatically to fulfill these roles. |
New Environment: Machine Properties
Tab |
Machine Properties |
||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Hardware profile |
The amount of memory to assign to the virtual machine. |
||||||||||||||||
OS profile (templates only) |
Operating system type, computer name, administrator password, product key, domain, and workgroup for virtual machines deployed from the template. Note When you import a template from SCVMM, the secured administrator password and product key in the template are removed. You must re-enter this information.
|
||||||||||||||||
Machine tags |
User-defined custom properties. You can use them to indicate information such as:
|
New Environment: Advanced
Test controller |
The name of the test controller machine for this environment. |
Configure environment to run UI tests |
Select this option if your tests include Coded UI Tests. For more information, see Verifying Code by Using UI Automation. This option can be set only when the environment is running. To set it on a new environment: Finish the wizard. Wait until the environment’s status is Ready. Select the environment and then choose Open to return to the wizard. Warning |
Enable network isolation |
Network isolation enables you to deploy the same stored environment more than once, without name or IP address conflicts. For more information about the network isolation capability, see Creating and using a network isolated environment. |
New Environment: Verification
Choose Verify to make sure that the properties you have set are valid.
If verification fails, you must fix the problem before you can finish.
If verification succeeds, choose Finish.
If verification succeeds, choose Finish.
The new environment wizard closes, and your environment appears in the Environments list under Type:SCVMM.
Creating the environment can take some time. You can see the progress of the process in the Environments list. To see the progress of individual virtual machines, select the environment.
After a virtual machine has been created, you can log on to it if you want. Select the environment, and then choose Connect from the shortcut menu of the machine’s icon.
Completing the Configuration of the Machines
Install test agents if necessary
If the status of the SCVMM environment changes to Not Ready, choose Repair on the shortcut menu.Lab Management will install a test agent on each virtual machine and configure it to communicate with your test controller.
Tip
This step is required only if the templates or virtual machines that you selected from the library do not already have test agents. To avoid having to do this, you should install a test agent when you are adding templates or virtual machines to the library.
Join the computers to a domain if necessary
If you want your machines to be members of a domain, you will usually have to join each one to the domain.This step is necessary because virtual machines are usually joined to a workgroup before they are stored in the library. This good practice avoids domain name conflicts when more than one copy of the same virtual machine is in use at the same time.
What’s next
Here are the tasks that you can perform after you create an SCVMM environment:
Operate your environment, and manage the virtual machines in the environment. See Managing Lab Environments and Virtual Machines.
Store a copy of your environment in your team project library. See How to: How to: Store an SCVMM Environment.
Run manual and automated tests in your lab environment by using Microsoft Test Manager, the Tcm.exe command line utility, or a build-deploy-test workflow. See Test on a lab environment.
Create build-deploy-test workflows to automate the process of creating a build of your application, deploying the build to your lab environment, and running tests on the deployed application. See Automated build-deploy-test workflows.