Before you can start creating virtual test environments in Visual Studio Lab management you need virtual machines (VMs) or templates to create these virtual environments. To enable testing, build-deploy-test workflow and network isolation capabilities on these environments, you need to install Visual Studio Test Agent, Visual Studio Lab Agent and Team Foundation Build Agent on VMs and templates that are part of the lab environments.
Microsoft released a tool that automates this process of upgrading/installing Test, Build, and Lab Agents on a Virtual machine and configuring them. It also provides support for automating the process of creating templates with agents installed on them.
Before you can start using it, you’ll have to execute some steps:
- Download RTM version of VS Agents Installer ISO and TFS installer ISO from Microsoft download center:
- VS Agents Installer: http://www.microsoft.com/downloads/details.aspx?FamilyID=a3216d2a-0530-4f6c-a7c9-0df37c54a902&displaylang=en
- TFS Installer (needed for build agent): http://download.microsoft.com/download/1/5/1/15139F21-8A10-44E8-99D5-B37316D3F00F/X16-42785VS2010TFS1.iso
- Download patches for all lab management software: http://www.microsoft.com/downloads/details.aspx?FamilyID=8406ef19-35a3-4c03-a145-08ba982f3cef&displaylang=en
- Extract the ISOs and store the extracted files on a well-known file share that is accessible from VMs that are part of your Lab Environment. (You can use third party tools like WIN-RAR (www.rarlab.com) to extract the ISO. Check out http://en.wikipedia.org/wiki/Comparison_of_ISO_image_software for other options)
- Assuming your file-share is \\Share, you can create the layout as follows
- Download the VMPrepTool.msi and LabMgmt.ISO as mentioned before http://code.msdn.microsoft.com/vslabmgmt
- Run VMPrepTool.msi which will install VMPrepTool_RTM.zip to the specified destination folder.
- Right click on the zip file -> Properties. On bottom of the General Tab click “Unblock”. Click Apply and Ok (This will enable executing the contained PowerShell script on your machine)
- Unzip the VMpreptool_RTM.zip and place the contents on the same share. Copy Labmgmt.ISO on to your share as well.
Afterwards you can log in on the Virtual Machine you want to configure, browse to the file share and start the VMPreptoolUI.exe.