Lab Management (pre-release) 2010 Walkthrough VHD
Updated 7/16/2012: Please note this an archived post and the Lab Management VHD has been retired and been removed from the Microsoft Downloads site.
Visual Studio Lab Management 2010 enables teams to accelerate setup/tear down and restoration of complex virtual environments to a known state for test execution and build automation. It extends build automation by automating virtual machine provisioning, build deployment and build verification in an integrated manner. It also allows testers to file rich bugs with links to environment snapshots that developers can use to recreate complex environments; effectively reducing wasted time and resources in your development and test lifecycle. A few months back, we had released a similar VHD with Visual Studio RC bits; but the new version has the following distinctions
- It uses the Visual Studio RTM build, so you get the latest version to try out various scenarios.
- There is an additional two-machine environment stored in the library. So you can try all the lab management scenarios in this multi-machine environment, which is closer representative of the customer’s deployment.
- This VHD also contains another environment with Network Isolation capability. So you can run multiple copies of environment in parallel without any machine name/IP address conflicts.
- Team Foundation Server has been configured with SharePoint and reporting services. So you can use this VHD to demo all the Application Lifecycle Management (ALM) capabilities offered by VS family of products
To enable quick evaluation of the Lab Management 2010 pre-RTM, we have created a Windows Server 2008 R2 Hyper-V based Virtual Machine (VM) that provides an all-in-one setup with pre-configured System Centre Virtual Machine Manager, Visual Studio, Team Foundation Server with Lab Management enabled. You can download this pre-configured VM from here.
This document consists of the following sections:
- Setup instructions for importing this Virtual Machine (VM), configuring an internal virtual network and configuring this VM and the host machine (Estimated Time : 1 Hour)
- Walkthroughs to try out following scenarios
- Provision environments quickly (Estimated Time: 30 minutes): deploying a stored Virtual Environment on the host and taking a snapshot.
- Automate the build-deploy-test cycle (Estimated Time: 30 minutes): executing an end to end workflow that covers building a sample web application, deploying it onto the virtual environment and executing Coded UI test
- File rich bug with environment snapshots (Estimated Time: 30 minutes): filing rich bugs with automatic collections environment snapshot, which can be used by developer to debug the issue
- Other advanced scenarios
Table of contents
- Overview
- Setup Steps
- Scenarios
- Activation
- Advanced Scenarios (optional)
- Appendix
Overview
In order to use the Lab Management features, a physical Hyper-V host is required. The Hyper-V host is used to run both the downloaded VM (LabServer) and the virtual environments.
Machine |
Type |
Details |
Physical Hyper-V Host |
Physical |
Hyper-V Host for hosting Virtual Machines listed below |
LabServer (the VM you downloaded) |
Virtual |
Machine name: labserver.labdomain.local
|
TailSpin VM Template |
Virtual Template |
A Windows Server 2008 R2 based Stored Virtual Machine template |
TailSpin Environment |
Virtual |
Application and Database tier for TailSpin Application |
Shown below is the diagram once the LabServer VM and the Hyper-V host are configured.
Setup Steps
Pre-requisites
Setup a clean install of Windows Server 2008 R2 on a Hyper-V capable machine with
- At least 8 GB RAM
- At least 60 GB free hard disk space
- Enable Hyper-V role on the machine
- Machine should be joined to a Workgroup (as later in the setup, you will join this host machine to a private AD)
- Use this machine only for testing/evaluation purposes
In case you are not able to complete the Setup and Scenarios section within 10 days, you must first activate this VM to continue using for 180 days (trial period). Refer to Activation section for more details.
Import the virtual machine
- Login to your host server using local Administrator credentials (All the steps below should be performed as administrator)
- Download all the package files to this host machine.
- The VM is available as a collection of self-extracting RAR files. Run the “Visual Studio Lab Management (pre-release) 2010 VHD.part01.exe”
- Accept the License terms and select a folder to extract the rar package (The extraction will take ~30 minutes, and consume ~36 GB of disk space)
- Click Start, point to Administrative Tools, and then click Hyper-V Manager.
- From Hyper-V Manager’s Action pane (right side pane), click Import Virtual Machine.
- Click Browse and select the folder LabServer (this would be under “Visual Studio Lab Management (pre-release) 2010 VHD” folder) in the Import Virtual Machine popup screen and choose the defaults.
- Click Import and then click close. (Ignore the warnings, if any)
- Troubleshooting Tips
- If you are using Windows Server 2008 SP2 or import of the LabServer VM fails for other reason, you should try creating a new Virtual Machine using Hyper-V Manager, with 4 GB of RAM, and use the existing VHD (browse to the folder LabServer\Virtual Hard Disks\LabServer\.vhd)
Configuring virtual network adapters
- Open Hyper-V Manager.
- From the Actions menu, click Virtual Network Manager (left side pane).
- Delete all Internal and Private Networks which are already present.
- Create an Internal network adapter (This will be used to connect the physical host, LabServer VM and Virtual Environments)
- Under New virtual network, select Internal and click Add.
- The New Virtual Network page appears, give it a name (LabNetwork) and click OK.
- You may get a warning that “Pending changes may disrupt network connectivity”, Click Yes, to Continue (you may lose network connectivity to the host for a couple of minutes)
- Create an External network Adapter (this will be used for activating the virtual machine)
- Again open the Virtual Network Manager from Hyper-V Manager.
- Under New virtual network, select External and click Add.
- The New Virtual Network page appears, give it a name (“External Network”) and click OK.
- You may get a warning that “Pending changes may disrupt network connectivity”, Click Yes, to Continue (you may lose network connectivity to the host for a couple of minutes)
Launch the Virtual Machine
- Once you go through the steps in Import the virtual machine to your Hyper-V manager, the virtual machine you added will be listed under the Virtual Machines pane.
- Right-Click on the virtual machine and click Settings.
- Select Network Adapter on the left side pane, choose LabNetwork (the internal network you created in the steps Configuring virtual networks) from the “Network” dropdown.
- Do NOT change the network of the second network adapter and keep it as “Not Connected”. This network adapter will be later used to activate the windows image of virtual machine.
- Double check that there are no other external facing adapters attached to your Virtual Machine. The VM has DHCP running and can interfere with your corporate network if it is not on an internal network.
- To preserve the VM state and to automatically start it when the Hyper-V Host is restarted, make sure that the LabServer VM is configured with the following settings:
- Right-Click on the LabServer VM and click Settings
- Select Automatic Start Action on the left side pane, and check “Automatic start if it was running when the service was stopped
- Select Automatic Stop Action on the left side pane, and check “Save the virtual machine state
- Click OK.
- Right-Click on the virtual machine and click Start.
- Do not change the computer name of the LabServer VM
Virtual Machine configuration
- Login to the LabServer VM using the following credentials
- Username: Labdomain\tfsadmin
- Password: P2ssw0rd (Capital P, Numeral 2, small s, small s, small w, numeral 0, small r, small d)
- Restart the VM if the machine asks for reboot to apply the system changes.
- Once the VM restarts and you login again, open Services(run services.msc) and make sure that the following services are running
- Visual Studio Team Foundation Background Job Agent
- Visual Studio Team Foundation Build Service Host
- Visual Studio Test Controller
- Open Control Panel -> Network and Internet -> Network and Sharing Center. Click on the “Local Area Connection x” (x could be any numeral say 4).
- Click on Properties and select “Internet Protocol Version 4 (TCP/IPv4)” and click on Properties again.
- In the General Tab, make sure that the network adapter has the following settings
- IP: 10.10.1.2
- Subnet: 255.0.0.0
- Default gateway: 10.10.1.1
- Preferred DNS: 10.10.1.2
- Click Advanced and select DNS tab:
- DNS 10.10.1.2
- DNS suffix for this connection: labdomain.local
- Select “Register this connection’s address in DNS” and “Use this connection’s DNS suffix in DNS registration”
- Click OK
- Click OK again.
- Click Close and Close again.
- Restart the VM after performing the above steps. This will ensure that the DNS, DHCP and AD services can recognize the new adapter correctly.
- Once the VM restarts, login to the LabServer machine using the same credentials (labdomain\tfsadmin)
Hyper-V host configuration
- On Hyper-V host machine, open command prompt and run ipconfig to make sure that the host’s internal network gets a DHCP address assigned to it by the VM’s DHCP server
- Check the IP Address (should be 10.10.1.xxx) and that the DNS suffix should be: labdomain.local
- Troubleshooting tips
- On the host machine, use ipconfig /renew to get a new DHCP address on the host (if not already assigned)
- Make sure that LabServer VM and the Hyper-V host are able to communicate with each other
- Open command prompt from the host machine and run “ping labserver”
- Find the host name of the Hyper-V host (run hostname from command prompt). Open command prompt from the LabServer VM and run “ping <HostName>”
- Firewall might prevent the two machines from communicating to each other, turn off the firewall on the host and the LabServer VM.
- To disable all firewalls on this Hyper-V host.
- Open Control Panel –> Check Firewall Status –> (from left side pane) Turn Windows Firewall on or off; alternatively run firewall.cpl
- Select “Turn off Windows Firewall (not recommended)” for each Network location settings (Domain, Home, Public etc.)
- Click OK
- Join the host machine to the domain of the VM (labdomain.local)
- Click OK and restart the Hyper-V host to apply the changes. (It is ok to restart the Hyper-V host even when the LabServer VM is running, as you had earlier configured to automatically save/start)
- Troubleshooting tips
- If the domain is not found, verify that LabServer VM and the Hyper-V host are able to communicate with each other
- Open command prompt from the host machine and run “ping labserver”
- Find the host name of the Hyper-V host (run hostname from command prompt). Open command prompt from the LabServer VM and run “ping <HostName>”
- Firewall might prevent the two machines from communicating to each other, turn off the firewall on the host and the VM.
- If you have changed the machine name of the host, restart it; before connecting to the domain.
- If the domain is not found, verify that LabServer VM and the Hyper-V host are able to communicate with each other
- Verification
- After the restart of Hyper-V host, login and ensure that the LabServer VM is also running. If not, go into Hyper-V Manager and start the VM.
- Connect to the LabServer VM and login using labdomain\tfsadmin. Open DNS Manager (Start -> Administrative Tools -> DNS) and verify that the host was successfully registered in the DNS. Notice that a new entry for your physical host is shown. (HyperVHost in the following image)
- Troubleshooting tips
- If the host computer entry still does not show up, from an elevated command prompt on the host, run ipconfig /registerdns. Wait a few minutes and check the event viewer to see if there are errors. If not, check again in the DNS Manager to see that the host is registered.
- Add labdomain\tfsadmin as an administrator on the host machine. This is needed so that TFS and SCVMM can communicate with the host.
- Open Server Manager –> Configuration -> Local Users and Groups –> Groups -> Administrators (alternatively run lusrmgr.msc from the command prompt)
- Add labdomain\tfsadmin into the administrators group. Provide the following credentials in the popup
- Username: Labdomain\tfsadmin
- Password: P2ssw0rd
Lab Management configuration
- Make sure that all firewalls are disabled on this Hyper-V host
- Open Control Panel –> Check Firewall Status –> (from left side pane) Turn Windows Firewall on or off; alternatively run firewall.cpl
- Select “Turn off Windows Firewall (not recommended)” for each Network location settings (Domain, Home, Public etc.)
- Click OK
- Add the host to the SCVMM host group.
- Login to the LabServer VM and open System Center Virtual Machine Manager (SCVMM) Admin Console.
- If VMM Server is not reachable, verify that the service Virtual Machine Manager is running on the VM.
- Click “Add host” from the right side pane.
- Complete the Add Host wizard, by providing the following details:
- Select Host Location
- Username: tfsadmin
- Password: P2ssw0rd
- Domain: Labdomain
- Select Host Servers
- Type the Computer Name as the machine name of your Hyper-V Host, and click Add.
- Ignore the warnings (on the bottom of wizard) and press Next
- If you receive a popup that Hyper-V role with be enabled, click Yes to continue
- Configuration Settings
- Host Group: “All Hosts”
- Check the “Reassociate host with this Virtual Manager Server” in case the host was earlier connected to another VMM Server
- Host Properties
- Review the summary and Click “Add Hosts”
- Select Host Location
- After the job is completed, you can check the host status by clicking the “Hosts” from the left side pane in SCVMM Admin console.
- Troubleshooting tips
- Make sure that you are not running SCVMM Server on the Hyper-V host.
- Manually install the System Center Virtual Machine Manager Agent on the Hyper-V host and try adding the host again.
- Login to the LabServer VM and open System Center Virtual Machine Manager (SCVMM) Admin Console.
- Verifying that Lab Management is properly configured for the Project Collection
- Launch Team Foundation Server Administration Console (Start -> All Programs -> Team Foundation Administration Console)
- Select Team Project Collections (from the left side pane) -> Default Collection -> Lab Management tab -> Configure Library Shares
- Click Verify to check if VMM Library Share is configured appropriately. A green tick mark should appear.
- Select Host Groups tab, and click Verify to make sure that VMM Host Group (and the corresponding host) is configured appropriately. A similar green tick mark should appear.
- Troubleshooting tips
- Add labdomain\tfsadmin as an administrator on the host machine
This completes the Lab setup and configuration. The subsequent sections help you to exercise various Lab Management scenarios.
Scenarios
Once you have configured the LabServer VM and the host as above, you can perform the following scenarios. These exercises are designed to enable a quick introduction to deploying a Virtual Environment, running an build-deploy-test workflow and creating a rich bug with environment snapshot.
For these scenario walkthroughs, we are using a sample web application called TailSpin, which is an online storefront for buying Airplanes. The company has decided to adopt virtualization to consolidate its hardware footprint and increase its utilization. The company decides to adopt Visual Studio 2010 Lab Management as it offers an out of the box integrated solution to leverage all the benefits of virtualization for application lifecycle management (ALM). Using Lab Management, the company is able to accelerate their software release cycle and also improve the overall quality as
- Developer and testers are able to quickly provision virtual environments
- Build automation is extended to environment provisioning, application deployment and testing
- Testers are able to file rich bugs which include link to environment snapshot
Following artifacts have already been created to carry out the scenario walkthroughs
- TailSpin sample web application checked-in to the source control
- Coded UI Test cases for the application checked-in to the source control
- Testing artifacts – test plan, manual and automated test cases, and test settings
- Build definition for compiling the TailSpin application
- An build-deploy-test workflow
- A Virtual Machine Template (Windows Server 2008 R2) stored into the library. This VM templates has the following software installed
- Build agent
- Lab agent
- Test agent
- SQL Server Express 2008
- IIS role
- A stored Virtual Environment created with the above VM Template
Scenario 1: Provision environments quickly
(Estimated Time: 30 minutes)
In this exercise, the Test Lead uses Microsoft Test Manager to deploy a virtual environment that will be later used for nightly build verification.
- Login into LabServer VM (labdomain\tfsadmin, P2ssw0rd)
- Start Microsoft Test Manager. It will automatically connect to the TailSpin. Otherwise connect to LabServer\DefaultCollection -> TailSpin
- Go to Lab Center, if you are currently under Testing Center
- Click Deploy under the Environments section.
- It will show Stored Environment from the Library. Select TailSpin Environment and Click Deploy.
- Do not change the name of Environment as the same name has been used in end-to-end workflow definition.
- The environment deployment will typically take ~20 minutes.
- Once the environment is deployed, right click on the environment name and Click Start. Similarly right click on the environment name and Click Connect
- This will open the Microsoft Environment Viewer to enable interaction with the virtual machines in the environment.
- Login environment’s Virtual Machine using the following credentials (click Ctrl+Alt+Del from the toolbar in the Environment Viewer):
- Username: Labdomain\tfsadmin
- Password: P2ssw0rd
- Troubleshooting tips: If you are not able to connect to the environment using environment viewer
- Click on the System Info in the environment viewer and note the SCVMM VM Name
- From the Hyper-V Manager on your Hyper-V Host, connect to this VM.
- Login using the Administrator (local admin) and enable remote desktop on this Virtual Machine.
- Now from the Microsoft Test Manager, right click on the VM in the right side pane, and click Remote Desktop
- Provide the labdomain\tfsadmin credentials and accept any certificates
- Troubleshooting tips: If you are not able to login using the labdomain\tfsadmin
- Try to login using the local Administrator (password: P2ssw0rd)
- From the computer properties, check if the VM is part of a Workgroup or joined to the Domain (labdomain)
- If it is a workgroup VM: Click on the System Info in the environment viewer and note the SCVMM VM Name
- From the Hyper-V Manager on your Hyper-V Host, select this VM, right click and open Settings.
- Make sure that in the Ethernet Port on the left side pane, LabNetwork (Internal network you created earlier) is selected. Otherwise manually select the LabNetwork and click OK.
- Also delete all other Internal and Private networks (except LabNetwork) from the Virtual Network Manager.
- Using Microsoft Environment Viewer, manually join the VM to the labdomain domain (use labdomain\tfsadmin, P2ssw0rd)
- Restart this VM and verify if you are now able to login using labdomain\tfsadmin.
- Once you login, the Test Agent processes should start-up and connect to the Test controller. Make sure that the status changes to Online.
- You might see that one of the capabilities (Testing or Workflow) has some errors. Click on the “Repair Testing capability” so that testing capability is configured appropriately.
- After a few minutes, the Testing capability should also be in Ready State.
- Disable Internet Explorer popups. This is to make sure that IE popups do not interfere with the Coded UI Tests (which will be executed later)
- Launch Internet Explorer from the Virtual Machine in the environment.
- In the “Set up Windows Internet Explorer 8” popup, click Next. Do NOT choose “Ask me later”, as this will later interfere with the execution of automated tests.
- Select “Yes, turn on Suggested sites” and Click Next
- Select “Use express settings” and click Finish.
- Now Close the Internet Explorer.
- Once, the testing and workflow capabilities are ready, Select the Snapshots tab from the left side pane in the Microsoft environment viewer
- Click on the “Take Snapshot” icon and give it a name “Clean State”.
- Use the same name (TailSpin Environment) as it as it has been used in end-to-end workflow definition
Scenario 2: Automate the build-deploy-test cycle
(Estimated Time: 30 minutes)
Visual Studio 2010 enables you to automate your whole build-deploy-test cycle using Lab Management, build and testing tools. This helps you to address some of the following key pain points with build-deploy-test cycles
- Today the whole process is not automated and results in manual effort and issues. You preferably want to automate the whole process so that in the morning when the team comes to work, the build is generated, application is deployed on the environment and initial testing is already completed.
- Confidence on daily builds deployed on the same environment is not high as changes may be left from an earlier build. You preferably want to setup the daily build on a clean environment.
- Agility for debugging issues with other builds which are not currently deployed is really bad as we need to reset the environment and then deploy the build needed for debugging. You preferably want to have a one click experience to go to any build for debugging.
As part of this walkthrough you will experience how Visual Studio 2010 helps you to overcome the above challenges by running an end to end Workflow that builds the application, deploys the application on the Clean state of virtual environment and runs Coded UI Tests.
- From the LabServer VM, open Visual Studio and go into Team Explorer. It should automatically connect to “LabServer\DefaultCollection -> TailSpin”.
- Go to Builds -> Right Click on “BuildDeployTest-TailSpin” -> Edit build definition. This should open the build definition for editing.
- Go to Process, from the left side pane and click on icon besides Lab process settings
- A new wizard for changing Lab workflow parameters should open up.
- Go to Environments, from the left side pane
- Click Finish and Save the build definition “BuildDeployTest-TailSpin”
- Right click on the build definition “BuildDeployTest-TailSpin”, click on Queue new build.
- Use the Default Options and Click Queue. (The workflow will take ~10 minutes to complete)
- To see the progress of this workflow, double click on the “BuildDeployTest-TailSpin” in the Build Explorer.
- The workflow performs the following activities
- Compile/Build the TailSpin application and associated Coded UI tests
- Revert the TailSpin Environment to the clean snapshot that you created earlier
- Deploy the build on this environment
- After the build has been deployed, take a post deployment snapshot.
- Run Coded UI Tests (CUIT)
- You can go to Microsoft Environment Viewer to see when Environment is either reverted to a snapshot, or Post Deployment Snapshot is taken.
- Once the workflow is in the Running Tests step, you can even see the Coded UI Tests are being run in the Virtual environment. From the environment Viewer, check if TailSpin home page opens up automatically, and some pages are being navigated by the Coded UI Tests.
- Once the workflow completes, it should report success if the deployment and test execution completes.
- Troubleshooting tips
- If some of the tests failed, Internet Explorer popups could have disrupted the Coded UI tests.
- Using environment Viewer, Revert the environment to the snapshot “Clean State”
- Perform the steps mentioned in the section “Scenario1: Provision environments quickly” on how to disable Internet explorer popups.
- Take another snapshot of the environment and give it an appropriate name (say “New Clean State”)
- Again perform the steps as mentioned in this scenario, and in step 5.2 choose the snapshot you just created.
- If you see the message “The service is unavailable” in the browser, you can safely ignore this message. Hit the back button in the internet explorer and check if TailSpin application is working fine.
- In the build report, you might see the message/error something like “Unable to add user or group labdomain\Windows-abcd123$”. You can ignore this message.
- If some of the tests failed, Internet Explorer popups could have disrupted the Coded UI tests.
- Using environment Viewer, you can now do further testing of the TailSpin application.
Scenario 3: File rich bugs with environment snapshots
(Estimated Time: 30 minutes)
Visual Studio 2010 enables testers to file rich bugs that help developer to debug the issue without wasting time in bug ping pong between developer/tester (e.g. developer claiming that a bug does not reproduce on his/her machine and wants more details e.g. system info, event logs etc.)
As part of this walkthrough you will experience how Visual Studio 2010 enables filing of rich bugs with automatic collections with each bug. Also with a bug you can create a Snapshot of the whole environment which can be used by developer to debug the issue. With Snapshot developer gets the whole environment in exactly the same state where the bug was filed.
- Open Microsoft Test Manager, switch to Testing Center and select Plan tab.
- Select TailSpin Test Plan and click Properties from the top.
- Under the Run Settings section,
- Under Manual runs, select
- Test Settings: TailSpin – Manual
- Test environment: TailSpin Environment
- Under Automated runs, select
- Test Settings: TailSpin – Automated
- Test environment: TailSpin Environment
- Under Manual runs, select
- Click on Save and Close.
- Now select the Test tab.
- Select Manual Test Suite, under the TailSpin Test Plan
- Select the test case “Validate if discount coupon is applied”, and right click and select Run
- This will open Microsoft Test Runner.
- Select the option “Overwrite existing action recording” and Click Start Test.
- Follow the steps specified in the Test case, and for each step you can assign the result as Pass or Fail (Step 8 should Fail).
- For step 1 of the test case, Click on "Connect to environment" (from the above toolbar) which will open Environment Viewer.
- Click on "System Info" and copy Computer Name. Now Close the System Info dialog.
- For Step4, open https://<ComputerName>/tailspin.web/default.aspx in Internet Explorer. Replace <ComputerName> with the actual machine name (without FQDN), you got from the System Info dialog e.g. open https://windows-abcd1234/tailspin.web/default.aspx
- The Step 8 will fail as after adding the discount coupon, web page throws an error. Mark this step as Fail, and add an appropriate Comment.
- Click on the Capture rectangular screenshot and take a screen clipping where the web page shows an error. This will automatically attach a screenshot to the test step.
- As this bug may be difficult to debug for your developer, so you should take a Snapshot of your environment by clicking Take Environment Snapshot in the Microsoft Test Runner toolbar. This will automatically attach a snapshot of the environment to the test step.
- Now file a bug by clicking Create a bug.
- In the New Bug window, provide the Title (No Discount is applied) for the bug and Assign it to TFSAdmin.
- You can check the Details, System Info tabs to see all the rich information which has been collected automatically.
- Click Save and Close to create the bug.
- Click Resume and follow step 10.
- Click On Save and Close in the Microsoft Test Runner. You can choose to overwrite existing action recording, if you are asked for a confirmation.
As a tester you have a created a rich bug. Now let’s see how developer can easily reach the state of the environment where the bug was filed.
- Open Visual Studio and connect to LabServer\DefaultCollection -> TailSpin in the Team Explorer.
- Expand the Work Items -> Team Queries and double click on My Bugs
- In the query results, you will see the bug which you just created.
- Review the detailed information in Details, System Info, Test Cases tabs, to understand under what conditions the bug was found.
- You can also see which of the test steps passed/failed.
- Under the Details tab, double click on the .lvr file.
- In the Connect to Environment dialog, select the option Connect to snapshot in this environment and click Connect. This will revert the environment to the exact state where the bug was filed.
- Once the environment viewer opens up, you (as a developer) can easily investigate into the bug and fix it accordingly.
Activation
The evaluation period for this virtual machine image is 180 days; once the evaluation period terminates, the image should be discarded. NO EFFORT SHOULD BE MADE TO ACTIVATE THIS IMAGE after that date. Please read the following to get an idea of the risks and key things you need to know.
Guidelines on usage:
- You have 10 days to activate the product. If not activated within 10 days, the system will shut down once every hour until activated.
- The 180-day Trial is the full working version of the Windows Server 2008 R2 x64 Enterprise Full installation, the version most of you will be working with in your corporate environment. It will not require a product key (it is embedded with the download).
- The 180-day Trial will shut down once every hour when you have reached the end of the 180-day evaluation period.
For complete use-rights, please refer to the EULA contained within this evaluation package.
- Do not redistribute this image.
- Do not put this image into a production environment.
- It is recommended not to join this image to a corporate network.
- Since this Virtual Machine is running a DHCP Server, you should not connect directly to an external network. Follow the steps in the next section on how to activate this image
Activation steps
- Login to the LabServer VM using the labdomain\tfsadmin and close all other active programs.
- Open Services(run services.msc), right click on DHCP Server and click Properties
- Change the Startup type to Disabled. Click OK.
- Open Hyper-V Manager on your Hyper-V Host; right click on the LabServer VM and click Settings
- Change the Network of second adapter to “External Network” from the dropdown (the external network you created in the steps “Configuring virtual networks”). Click OK.
- Troubleshooting tips
- Open Virtual Network Manager from the Hyper-V Manager to find which of these adapters is connected to the external network
- From inside the LabServer VM, open Internet Explorer, Click on Tools –> Internet Options and select Connections tab.
- Click on LAN settings, Select Automatically detect settings. Click OK and OK again.
- Open the Computer Properties (Start Menu -> Computer -> Properties) and click on the Activate Windows now
- Under the section Windows activation, Click on the option Activate Windows online now
- Troubleshooting tips
- If you hit the Error Code 0xC004B011, the system clock may not be showing the correct time.
- Manually update the system time and date of the your Hyper-V host and LabServer VM (according to your time zone) and try Windows activation again.
- If you are not able to connect to internet, also provide the Proxy Server’s address in Internet Explorer (Tools -> Properties -> Connections tab -> LAN settings -> Select “Use a proxy server for your LAN…”)
- Once the Windows activation succeeds, Click Close.
- Open Hyper-V Manager on your Hyper-V Host; right click on the LabServer VM and click Settings
- Change the Network of second Network Adapter to again “Not Connected”. Click OK.
- Login to LabServer VM and open Services(run services.msc), right click on DHCP Server and click Properties
- Change the Startup type to Automatic. Click OK.
- Again right click on DHCP Server and click Start.
You can follow the same approach for activating the VM’s which are part of virtual environment (disabling DHCP is not required). Connect to the environment and Click System Info in the environment viewer. Note down the “SCVMM VM Name” and shutdown the environment. Using Hyper-V Manager, temporarily add an external network adapter for this virtual machine. Follow the steps similar to 7-12 mentioned in the above section to activate the image, and later remove the external adapter.
Advanced Scenarios (optional)
Scenario 4: Build-Deploy-Test workflow on a multi-machine environment
(Estimated Time: 60 minutes)
A typical application requires multiple machines to test it. E.g. a Web application has a Web Server, a Database server and a web client. Since more than one machine is likely to be used in the production, testing in similar distributed environment is very important. Using Lab Management, you can create complex environments to test multi-tier application and assign a Role (Web Server, Database Server etc.) to each machine in the environment.
In this scenario, we will be deploying on a two machine environment for testing the TailSpin application. One of the machine will act as a Web Client and the second machine hosts both the Database Server (SQL) and the Web Server (IIS).
- Open Microsoft Test Manager and Go to Lab Center, if you are currently under Testing Center
- Click Deploy under the Environments section.
- It will show Stored Environment from the Library. Select “TailSpin multi-machine Environment” and Click Deploy.
- Do not change the name of Environment as the same name has been associated in end-to-end workflow definition.
- The environment deployment will typically take ~35 minutes.
- Troubleshooting tips
- If the deployment fails because of insufficient disk space, free-up some disk space on the hyper-v host machine. Also make sure that the drive which has sufficient space has been added as placement path in Virtual Machine Manager.
- If the deployment fails because of insufficient memory, you should shut down the environment you previously created in the Scenario1, and re-try the deployment.
- Once the environment is deployed, right click on the environment name and Click Start. Similarly right click on the environment name and Click Connect
- This will open the Microsoft Environment Viewer to enable interaction with the virtual machines in the environment.
- Login to each Virtual Machine in the environment using the following credentials (click Ctrl+Alt+Del from the toolbar in the Environment Viewer):
- Username: Labdomain\tfsadmin
- Password: P2ssw0rd
- Once you login, the Test Agent processes should start-up and connect to the Test controller. Make sure that the status changes to Online in each machine of environment.
- You might see that one of the capabilities (Testing or Workflow) has some errors. Click on the “Repair Testing capability” so that testing capability is configured appropriately.
- After a few minutes, the Testing capability should also be in Ready State.
- Disable Internet Explorer popups. This is to make sure that IE popups do not interfere with the Coded UI Tests (which will be executed later).
- Launch Internet Explorer from the Web Client machine in the environment.
- In the “Set up Windows Internet Explorer 8” popup, click Next. Do NOT choose “Ask me later”, as this will later interfere with the execution of automated tests.
- Select “Yes, turn on Suggested sites” and Click Next
- Select “Use express settings” and click Finish.
- Now Close the Internet Explorer.
- Once, the testing and workflow capabilities are ready, Select the Snapshots tab from the left side pane in the Microsoft environment viewer
- Click on the “Take Snapshot” icon and give it a name “Clean State”. Use the same name as it as it has been used in end-to-end workflow definition
- Open Visual Studio and go to Team Explorer. Go to Builds -> Right Click on “BuildDeployTest-2Tier-TailSpin” -> Edit build definition. This should open the build definition for editing.
- Go to Process, from the left side pane and click on icon besides Lab process settings
- A new wizard for changing Lab workflow parameters should open up.
- Go to Environments, from the left side pane
- From the dropdown, select the “TailSpin multi-machine Environment” you created earlier.
- Check the option to “Revert to a specific snapshot of the environment” and select Clean State
- Click Finish and Save the build definition “BuildDeployTest-2Tier-TailSpin”
- Right click on the build definition “BuildDeployTest-2Tier-TailSpin”, click on Queue new build.
- Use the Default Options and Click Queue. (The workflow will take ~10 minutes to complete)
- To see the progress of this workflow, double click on the “BuildDeployTest-2Tier-TailSpin” in the Build Explorer.
- The workflow performs the following activities
- Compile/Build the TailSpin application and associated Coded UI tests
- Revert the TailSpin Environment to the clean snapshot that you created earlier
- Deploy the build on the multiple machines of this environment
- After the build has been deployed, take a post deployment snapshot.
- Run Coded UI Tests (CUIT)
- You can go to Microsoft Environment Viewer to see when Environment is either reverted to a snapshot, or Post Deployment Snapshot is taken.
- Once the workflow is in the Running Tests step, you can even see the Coded UI Tests are being run in the Virtual environment. From the environment Viewer, check if TailSpin home page opens up automatically, and some pages are being navigated by the Coded UI Tests.
- Once the workflow completes, it should report success if the deployment and test execution completes.
Scenario 5: Network Isolation
(Estimated Time: 90 minutes)
Network Isolation enables you to run multiple copies of the environment in parallel without machine name or IP conflicts. The machines in a network-isolated environment are protected from network conflicts by using two network adapters. One network adapter is used for a private network inside the environment. The second adapter is configured by Lab Management to present a separate, unique identity to the external network.
In this scenario, we will first deploy a Network Isolated TailSpin Environment (the VM inside the environment will be a workgroup machine). Next we run a build-deploy-test workflow to deploy the TailSpin application. Then we store a copy of this environment in the library, and later create a new environment using this stored copy. Hence we will be able to run two environments with TailSpin application, where the machines have the same machine name etc.
- Open Microsoft Test Manager and Go to Lab Center, if you are currently under Testing Center
- Click Deploy under the Environments section.
- It will show Stored Environment from the Library. Select “TailSpin Isolated Environment” and Click Deploy.
- Do not change the name of Environment as the same name has been used in end-to-end workflow definition.
- The environment deployment will typically take ~20 minutes.
- Once the environment is deployed, right click on the environment name and Click Start. Similarly right click on the environment name and Click Connect
- This will open the Microsoft Environment Viewer to enable interaction with the virtual machines in the environment.
- Login environment’s Virtual Machine using the following credentials (click Ctrl+Alt+Del from the toolbar in the Environment Viewer):
- Username: Administrator
- Password: P2ssw0rd
- Note you need to login as local administrator as the machine of this isolated environment is a workgroup machine.
- Click Start, Microsoft Visual Studio 2010, Test Agent configuration Tool
- Enter the username as .\administrator and Password as P2ssw0rd
- Click on Apply Settings. It will ask the password of tfsadmin, provide P2ssw0rd
- After few minutes, the Test Agent processes should start-up and connect to the Test controller. Make sure that the status changes to Online.
- You might see that one of the capabilities (Testing or Workflow) has some errors. Click on the “Repair Testing capability” so that testing capability is configured appropriately.
- After a few minutes, the Testing capability should also be in Ready State.
- Disable Internet Explorer popups. This is to make sure that IE popups do not interfere with the Coded UI Tests (which will be executed later)
- Launch Internet Explorer from the Virtual Machine in the environment.
- In the “Set up Windows Internet Explorer 8” popup, click Next. Do NOT choose “Ask me later”, as this will later interfere with the execution of automated tests.
- Select “Yes, turn on Suggested sites” and Click Next
- Select “Use express settings” and click Finish.
- Now Close the Internet Explorer.
- Once, the testing and workflow capabilities are ready, Select the Snapshots tab from the left side pane in the Microsoft environment viewer
- Click on the “Take Snapshot” icon and give it a name “Clean State”. Use the same name as it as it has been used in workflow definition
- Open Visual Studio and go into Team Explorer. Go to Builds -> Right Click on “BuildDeployTest-TailSpin” -> Edit build definition. This should open the build definition for editing.
- Go to Process, from the left side pane and click on icon besides Lab process settings
- A new wizard for changing Lab workflow parameters should open up.
- Go to Environments, from the left side pane
- From the dropdown, select the “TailSpin Isolated Environment”
you created earlier. - Check the option to “Revert to a specific snapshot of the environment” and select Clean State
- From the dropdown, select the “TailSpin Isolated Environment”
- Click Finish and Save the build definition “BuildDeployTest-TailSpin”
- Right click on the build definition “BuildDeployTest-TailSpin”, click on Queue new build.
- Use the Default Options and Click Queue. (The workflow will take ~10 minutes to complete)
- To see the progress of this workflow, double click on the “BuildDeployTest-TailSpin” in the Build Explorer.
- The workflow performs the following activities
- Compile/Build the TailSpin application and associated Coded UI tests
- Revert the TailSpin Environment to the clean snapshot that you created earlier
- Deploy the build on the multiple machines of this environment
- After the build has been deployed, take a post deployment snapshot.
- Run Coded UI Tests (CUIT)
- You can go to Microsoft Environment Viewer to see when Environment is either reverted to a snapshot, or Post Deployment Snapshot is taken.
- Once the workflow is in the Running Tests step, you can even see the Coded UI Tests are being run in the Virtual environment. From the environment Viewer, check if TailSpin home page opens up automatically, and some pages are being navigated by the Coded UI Tests.
- Once the workflow completes, it should report success if the deployment and test execution completes.
- Troubleshooting tips
- You might see the following message in the build report. You can ignore this message, since this machine is joined to workgroup; hence the account domain\Windows-abcd123 doesn’t exist.
- There is no such user or group: labdomain\Windows-abce123
- More help is available by typing NET HELPMSG 3783
- You might see the following message in the build report. You can ignore this message, since this machine is joined to workgroup; hence the account domain\Windows-abcd123 doesn’t exist.
- Using environment viewer, shutdown the environment
- In Microsoft Test Manager, right click on the Isolated Environment, and Click Store to Library
- Enter the name as “TailSpin Isolated Environment Copy” and click Store. This step would take ~20 minutes
- Once the Copy of the environment is stored, Click on Deploy again.
- Select the “TailSpin Isolated Environment Copy” and Click Deploy This step will take ~20 minutes.
- Once this environment is also deployed, right click on the environment name and Click Start. Similarly right click on the environment name (TailSpin Isolated Environment Copy) and Click Connect
- This will open the Microsoft Environment Viewer to enable interaction with the virtual machines in the environment.
- Login environment’s Virtual Machine using the following credentials (click Ctrl+Alt+Del from the toolbar in the Environment Viewer):
- Username: Administrator
- Password: P2ssw0rd
- Note you need to login as local administrator as the machine of this isolated environment is a workgroup machine
- Using environment viewer, you can now open TailSpin home page in internet explorer: https://localhost/tailspin.web/default.aspx
- Similarly you can open TailSpin home page on the earlier TailSpin Isolated environment.
- You can also check the same computer name of these environment (copy and original) by clicking on the System Info.
Appendix
The following table lists the details of all the artifacts in the VM
VM Machine Name |
labserver.labdomain.local |
Domain Name |
labdomain.local |
Domain Administrator |
labdomain\tfsadmin, P2ssw0rd |
TFS Administrator |
labdomain\tfsadmin, P2ssw0rd |
SCVMM Administrator |
labdomain\tfsadmin, P2ssw0rd |
Service account for test/build agent-controller communication |
labdomain\tfsadmin, P2ssw0rd |
Default SCVMM Library Share |
MSSCVMMLibrary, “C:\ProgramData\Virtual Machine Manager Library Files” |
Default Host Group |
All Hosts |
Template with agents installed |
TailSpin VM Template |
Stored environment in library |
TailSpin Environment |
TailSpin Source code |
C:\Map |
Sample Test Plan |
TailSpin Test Plan |
Comments
Anonymous
September 08, 2010
After adding a physical machine to the domain hosted by a virtual machine that is a guest on the physical machine causes an issue when the server reboots and is waiting for the domain. I tried following these steps 2 times and have run into the same issue.Anonymous
September 10, 2010
Has anyone successfully setup this test environment using these exact steps?Anonymous
September 14, 2010
I have tested this environment and these steps are well explained and easy to follow.Anonymous
September 18, 2010
I'm running into the following error on step: Lab Management configuration, Step C: Complete the Add Host wizard, by providing the following details, step d: After the job is completed, you can check the host status by clicking the “Hosts” from the left side pane in SCVMM Admin console. An internal error has occurred trying to contact an agent on the server. (Unknown error (0x80041013)) Recommended action: Ensure the agent is installed and running. Ensure the WS-Management service is installed and running, then restart the agent. I've ensured that the services are running: Virtual Machine Manager Agent is running under credentials: Local System Account Windows Remote Management (WS-Management) is running under credentials: Network Service I've tried rebooting both the Lab Management VM and the Host VM. I can tell that it successfully installed: 1 Add virtual machine host (FAIL) (66%) 1.1 Install Virtual Machine Manager agent (SUCCESSFUL) (100%) 1.2 Enable Hyper-V (SUCCESSFUL) (100%) 1.3 Refresh Host (FAIL) (0%) I've also verified that there aren't any firewalls enabled and that I can ping successfully between the VM and the Host. I was able to successfully join the domain. How can I troubleshoot this? Allen.Feinberg@Hotmail.comAnonymous
September 18, 2010
I've applied the System Center Virtual Machine Manager 2008 R2 Rollup Package in an attempt to fix the issue. This did not resovle the issue so I tried to skip past the step and I ran into this error in Microsoft Test Manager: TF29115: Team Foundation Server could not find any suitable host to deploy the virtual machine: TailSpin. More details: All the hosts in the host group had one or more of the following inadequacies: Host is unavailable. Ideas?Anonymous
September 21, 2010
Allen, The issue is specific to host addition in SCVMM, Can you try the following options
- Try restarting both the physical host and the LabServer VM, and then refresh the host using SCVMM admin console
- Remove the host from SCVMM admin console, and try adding it again?
- Anonymous
September 28, 2010
Hello, I have followed the steps above for running the Lab Manager Demo but receive the following error "Lab Management Configuration - 2E" at 66% (appears to be the same or similar to the one mentioned in the post above): "Error (2912) An internal error has occurred trying to contact an agent on the hypervhost.labdomain.local server. Recommended Action Ensure the agent is installed and running. Ensure the WS-Management installed and running, then restart the agent Warning (429) Failed to configure Virtual Machine Remote Client (VMRC) on host server hypervhost.labdomain.local. (The network path was not found (0x80070035)) " I have tried:
- Rebuilding the host with a fresh VM but it fails at exactly the same point with the same error
- The troubleshooting tips above
- Viewing Event Logs on both machines but they don't provide any further information
- Rebooting both machines
- Adding/removing the host from the console Any assistance would be much appreciated Regards Brett
Anonymous
February 21, 2011
Spent 2 days searching for the "Add host" issues and this solved my server: corruption in perf counters: blogs.technet.com/.../adding-a-host-to-system-center-virtual-machine-manager-2008-may-fail-with-error-2912-0xc0000bbf.aspx another thing that may help clean host renames is this certificate cleaning: blogs.technet.com/.../error-2912-when-a-virtual-machine-manager-2008-operation-fails-due-to-a-certificate-issue-element-not-found-0x80070490.aspxAnonymous
April 25, 2011
The comment has been removedAnonymous
July 27, 2011
I downloaded and installed the: Lab Management (pre-release) 2010 Walkthrough VHD And halfway through the walkthrough (configuration) I get the message: "The evaluation copy of System Center Virtual Machine Manager has expired" But I have just installed this today? Is this VHD not working anymore?Anonymous
July 28, 2011
Hi Geert Yes, the SCVMM trial period has expired, but the rest of applications should be fine. You would need to un-install the SCVMM Server (retain data) and Admin Console, and can re-install using your MSDN subscription. Check the steps here: technet.microsoft.com/.../ee230379.aspx Let us know if you are able to make progress. Regards HariveerAnonymous
July 28, 2011
Hi Hariveer, I tried your suggestion but when I reinstall the server and point it to the database it says my database format is not correct how can I fix this? GeertAnonymous
August 04, 2011
Geert, I had the same problem and couldn't find the correct update *.exe for my database versions to fix it. In the end I had to resort to a SQL data and schema compare to identify the differences, i.e. in VS2010 or whatever SQL compare tool you have, compare your existing database with a freshly created database from the SCVMM set up process and then apply the schema updates back onto your existing database. Not pretty but working so far.Anonymous
August 12, 2011
Hi Geert, I've followed all the instructions but I'm facing a problem. The Host LabServer.labdomain.local don't have any network adapter available (from SCVMM --> Right click over the host --> Properties --> Hardware --> network adapters) and so the deploy environment in MS Lab Center failed. Any idea? Thank you.Anonymous
August 30, 2011
I've followed all the instructions but I'm facing a problem. The Host LabServer.labdomain.local doesn't have any network adapter available (from SCVMM --> Right click over the host --> Properties --> Hardware --> network adapters) and so the deploy environment in MS Lab Center failed. This is due to the fact that following the instructions the physical network adapter present on the physical server is not connected to the VM machine (the machine that I've downloaded). Creating an internal network using the SCVMM seems not good for creating the VMs present in the libraries. Any idea? I'm block on this point and unable to start the Demo. Thank you.Anonymous
September 08, 2011
Geert, Sam: The SCVMM trial version in the VHD has expired. We are working on a fresh VHD with all the latest bits. Stay tuned for an update. Thanks. VijayAnonymous
September 08, 2011
Gio, you need to have an internal virtual network that connects the host with the VMs. Can you try creating that manually using Hyper-V Console, and see if that resolves your problem? Thanks VijayAnonymous
September 08, 2011
Vijay, I already have defined an internal virtual network on the host the problem is that to deploy the VM in the lab management or also in SCVMM a network adapter is needed (the error is The Host LabServer.labdomain.local doesn't have any network adapter available) and I'm not able to see any netowrk adapter available (both in SCVMM or Hyper-V present on the VM downloaded). Any other idea? Thank you.Anonymous
September 11, 2011
Regarding the networking problem on the host while using the VHD, can you please send me your email address to vijayma@microsoft.com. I will follow up offline with you to understand the problem in more detail. Thanks VijayAnonymous
September 11, 2011
Hi Vijay, I sent you an email. Thank you!Anonymous
September 14, 2011
hi Vijay I am waiting for the scvmm update.. i am stuck at the moment with VMM expired problem. ThanksAnonymous
October 16, 2011
is anybody who install this VHD successfully??????Anonymous
October 19, 2011
I have done successfully install the lab management..Anonymous
October 24, 2011
Hi Vijay! Is there any update on new VHD? i'm stuck with the same VMM expired problem. Thanks!Anonymous
October 25, 2011
Alex, download the new SCVMM and run it without un-install the old version of SCVMM. here is the link below www.microsoft.com/.../details.aspx ..Anonymous
October 25, 2011
Thanks a lot, Almus! I'll give it a shot. Do I understand correctly that it only has to be installed on LabServer vm?Anonymous
October 25, 2011
yes alex you have to do it on lab server VM ..but do not uninstall the old SCVMM ..run the new one it will update all files..Anonymous
March 14, 2012
Does any one have a build guide for this VHD? I would rather build it from scratch.Anonymous
May 31, 2012
The comment has been removedAnonymous
May 31, 2012
Solved my own problem: I had to remove the server from ANY domain and put it back into a Workgroup. Once I did this and after rebooting, I added the machine back into the domain. Now the name is changed to reference the new domain and the step succeeded.
- Bruce