SCVMM (virtual) environments
An SCVMM lab environment is a collection of virtual machines on which you can run tests. You create and manage them with Microsoft Test Manager.
Typically, you use lab environments when you’re testing an application that runs on servers, such as a web application. You run the server components on lab machines, and run your web browser or client app on your own local machine.
By using SCVMM environments, you can:
Collect diagnostic data while you perform your tests.
Revert all the machines in an environment to a fresh state. You avoid the risk of using data or saved state from previous tests.
Take a snapshot of the machines in the environment if you find a bug. This helps with diagnosis.
Create a new environment of test machines whenever you want.
Create a library of environment templates, which you can use to create pre-configured test labs.
For example, you could set up a template that contains Internet Information Services (IIS) in one machine, and SQL Server in another. After you create an instance from this template, you only have to install your own server software.
Create network-isolated environments that can be replicated without causing domain name clashes.
As an alternative, you might want to consider using standard environments. A standard environment can be created from any hardware or virtual machine. Standard environments take less upfront work to set up. They let you reserve machines for tests and collect diagnostic data, but you can’t save or reset their machine states.
Open Microsoft Test Manager to find out if there is a lab environment that is ready and not in use. Select an environment to see if it has the number and types of machines that you want.
If you find a suitable environment, mark it in use and install your software on it. After you’ve finished testing, don’t forget to unmark it.
SCVMM environments can be saved as templates. You can use a template to create a new environment. Find out whether there’s a suitable template in your project’s library.
Open the lab center, go to the Library page and look at the environments.
Select each item in the list and look at the number of machines and descriptions.
If you find a suitable environment template, deploy it. The environment will be copied and started.
On the lab environments page, wait until your new environment is ready.
If you didn’t find a suitable environment or template, you can create one from your project’s collection of virtual machines.
After you create your environment, consider saving it to the environment library. Do this after you configure any platform software such as a DBMS, but before you install the application you’re testing.
Start the new environment wizard.
What to enter
The name of the environment, which must be unique within your team project.
This option is disabled? Then you need to set up SCVMM.
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.
On 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 can’t find an item with the features that you want, you can set up a new virtual machine.
A running VM is a virtual machine that is in the running state. When you add a machine to your environment, you are effectively reserving it for your use, because it can’t be added to more than one environment at a time. When you delete your environment, a running VM will be returned to the pool of available machines.
If you compose your environment only of running VMs, it is usually ready to use immediately.
When you add a virtual machine template to an environment, a new virtual machine is created. Copying takes a few minutes.
A new name and port ids are automatically generated. Your software and tests have to be able to deal with the changed server name.
When you add a virtual machine, an exact copy of it is made in your lab environment.
If you want to create more than one running copy of a stored VM, you will have to change the machine name. Typically, a stored virtual machine is part of a workgroup.
If you want to run tests on more than one set of machines without changing their domain names, consider setting up a Network-Isolated Environment.
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.
Don’t use 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.
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.
User-defined custom properties. You can use them to indicate information such as:
Verify the environment 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, you’re finished.
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 connect to it from the context menu of the machine’s icon.
Mark the environment as in use to assign it to yourself.
Connect to the environment.
Log into its machines and configure any platform software you need, such as a database management system.
Might you want to create another environment like this, another time? Consider saving it to the environment library. You have to pause the environment first.
In the test plan properties, set the test environment to the environment you chose. This allows you to collect event logs and other data from the machines in the environment.
Install the latest build of your software.
Diagnostic information from the lab machines will be included in the test results, and will also be attached to any bug that you create.
When you’ve finished with the environment, choose unmark in use.
Alternatively, you could delete the environment, to remove its template machines, or to allow running virtual machines to be added to other environments.
- Q: Which versions of SCVMM are supported?
SCVMM 2008 R2
SCVMM 2012 SP1
SCVMM 2012 R2
Team Foundation Server 2010 SP1
Team Foundation Server 2012 RTM
Team Foundation Server 2012.4
Team Foundation Server (2013 and later)
- Q: Which versions of Hyper-V hosts are supported?
Hyper-V 2008 R2
Hyper-V 2012 R2
Guest OS (supported by SCVMM templates)
SCVMM 2008 R2
Windows XP SP3 32/64, Windows Vista 32/64, Windows 7 32/64
Windows Server 2003 SP3 32/64, Windows Server 2008 32/64, Windows Server 2008 R2 64
SCVMM 2012 SP1
Windows XP SP3 32/64, Windows Vista 32/64, Windows 7 32/64, Windows 8
Windows Server 2003 SP3 32/64, Windows Server 2008 32/64, Windows Server 2008 R2 64, Windows Server 2012 SP1
SCVMM 2012 R2
Windows XP SP3 32/64, Windows Vista 32/64, Windows 7 32/64, Windows 8, Windows 8.1
Windows Server 2003 SP3 32/64, Windows Server 2008 32/64, Windows Server 2008 R2 64, Windows Server 2012 SP1, Windows Server 2012 R2
You might want to look at Upgrade SCVMM 2008 R2 to SCVMM 2012.
- Q: The SCVMM option is disabled. What’s wrong?
You need to set up SCVMM for your Team Foundation project collection.
As an alternative, you might want to create a standard lab environment with existing physical or virtual machines. Standard environments take less work to set up, but you can’t save or reset their state.
- Q: There isn’t a virtual machine with the characteristics I want. How do I create a new one?
- Q: The status of my environment is Not Ready. What should I do?
A: In the context menu of the environment in the environment list, choose Repair.
Not Ready means that a test agent is not properly configured on one of the environment’s machines. Repair attempts to install and reconfigure it. If it doesn’t work, make sure all the machines can communicate with the test controller. You can log in to a machine even though it is not ready. To find out where the test controller is running, open Lab Center, Controllers. The test controller is usually installed on the same computer as Team Foundation Server.
If a machine is running Windows XP, manually re-install and configure the test agent on that machine. The test agent installer comes with the Visual Studio installer.