Visual Studio Lab Management 2010 – Host group and Library Share management


Visual Studio Lab Management 2010 setup guidelines explains the steps required for first time setup and configuration of Host group and Library share in Virtual Machine Manager server to enable the scenarios that is required for Lab management to work.

The blog here talks about some of the management activities that could be done in Virtual Machine Manager library share and Virtual Machine Manager host group and its implication in Visual Studio Lab Management 2010. In this blog, I will refer Virtual Machine Manager as VMM server.

1.0 Host group management

Out of band changes in VMM server

Any Host group level modifications done at VMM will have impact in Visual Studio Lab Management 2010.

The operations listed below will all result in loss of Lab objects created via Visual Studio Lab management 2010 when the host group is already bound to Lab Management.

  • Rename of host group in VMM
  • Movement of Host group in the VMM Host group tree
  • Removal and re-addition of host group in VMM

   After any of the above operation, the Visual Studio Lab Management will become out of sync with VMM resulting in Lab objects like Environments created in host groups going to Failure or Missing state. Any new Lab operations like for example create on the host group will result in failure.

Removal of Host group

If you would like to remove a host group completely out of Lab Management, then all Lab objects created in the host group would have to be deleted first. You can delete the Lab objects via Microsoft Test Manager by deleting the created Environment explicitly using Delete operation.

You can also use the TFSCONFIG command to remove the data from a host group. Please note that this is not the clean way as this will only remove the host group related data from TFS however the external artefacts will continue to remain in VMM. The command to delete is as follows:

<TFS Install path>\tools\TfsConfig lab /hostGroup /collectionName:<collectionName>
                    [/delete /name:<name> [/noprompt]]

Once the Lab objects in Host group has been removed, then you can completely remove the host group binding with Lab Management using TFS Admin Console in Lab management tab at Collection level settings.


2.0 Library Share management

Out of band changes in VMM

Just as host group, any out of band changes at Library Share will result in loss of Lab objects created via Visual Studio Lab Management 2010.

Once Library Share has been bound to Visual Studio Lab Management 2010, the Library share cannot be removed and re-added in VMM server. Removal and Re-addition will result in Lab Management to be out of sync with VMM resulting in all Stored Environments, Imported VMs and Templates to be in Failure or Missing state. Any new Lab operations like create using Templates in those Library will result in failure.

Removal of Library Share

Similar to Host group, to remove a Library share completely from Lab Management, all the Lab objects should be removed first.

Using Microsoft Test Manager, you should delete all the imported VMs and Templates and should also delete the Stored environment templates created on that Library share. Please note that deletion of imported VMs and Templates will only remove it from Lab Management. The templates will continue to remain in VMM Library. However, if you have either created a Template via Lab Management using “Store in Library” option or if you have created a stored Environment template, then deletion of those will remove them completely from VMM Library.


The best way to think about this is, anything that was created from within Lab Management will be removed while anything that was imported from VMM server will continue to persist in VMM Library.

There is an option in TFSCONFIG that can be used to delete the Library objects. However, as mentioned earlier it is not the clean way to do so. The command line will look as below

<TFS Install path>\tools\TfsConfig lab /libraryShare /collectionName:<collection name>
            [/delete /name:<name> [/noprompt]]

Once the Lab objects have been deleted, then the Library Share binding can be completely removed from Lab Management using TFS Console in Lab Management tab at Collection level settings.


3.0 Host management

Movement of Host is allowed provided the movement is within the same hierarchy in VMM host group tree. If say in VMM the Host group tree looks as below:


And lets say that in TFS you have configured your Host group binding at “All Hosts”\HG1\HG2 like as below


With such configuration, you will be able to move a host any where under HG2 sub-tree. If a host is initially under HG2 and if Lab objects were created and later if the host is moved under HG2\HG3, all Lab objects continue to work fine. The host can again be moved back from HG2\HG3 to HG2 without any issues. This is allowed because the Lab Management binding is at “All Hosts\HG1\HG2” level.

However, for this configuration, movement of a host out of HG2 sub-tree will result in loss of Lab objects. For this example, you cannot move a host which is under HG2 sub-tree to placed directly under “All Hosts” or be placed at “All Hosts”\HG1. Such a movement will result in all Lab environments created in that host ending up in Missing or Failure state.

If a host is removed and added back out of band at VMM, Lab Management will auto detect the environments that were created on the host. The only requirement is that the host has to be added back under a host group or the host group sub-tree which is bound to Visual Studio Lab management 2010.

4.0 Best Practices

Listed are few best practices while configuring Host, Host group and Library Share for best performance with Visual Studio Lab Management 2010.

Host reserve settings

Ensure that the Host reserve settings in the host added in VMM server is set appropriately. Make sure the values meet the minimum system requirement that the Host operation system demands. Having lesser value would result in sub-optimal performance of the host and the Guest VMs (the Environments created via Lab management) that are created in this host.

In VMM server, click on Host properties and pick the “Reserves” tab to make changes.


Host placement settings

Ensure that the Placement path chosen for the host has maximum disk capacity. By default it could point to your system drive which may not be the drive with maximum disk space.

In the same properties window, click on “Placement” tab to make changes.


Un-encrypted file transfer

If your Host and Library are within your test lab network and if it is safe to turn-off data encryption for the data that is being transferred on wire, then enabling un-encrypted file transfer between library and host will increase the performance during data transfer between them. Given that with Lab Management the transfer for Virtual Machines are in the order of Giga bytes, setting this option will help reduce the CPU load in Host and Library resulting in faster transfer rate.

Please note that you will have to enable this in both Library Share and Host group.

In VMM server, click on Host group properties –> “General” tab to make the changes.


In VMM server, click on Library Share properties –> “General” tab to make changes


Co-location of Library and Host in same Switch

 It is strongly recommended for Visual Studio Lab Management 2010 that the Hosts and Library are connected in same LAN network with minimum 1 GB for network bandwidth. For any network speed which is lesser than 1 GB, the deployments of environment will consume additional time due to slow data transfer rate in the network resulting in sub-optimal performance in Lab environment creations.

If your project is spread across geographically, then it is strongly recommended to have Library and Host group created and co-located in each of the location. Having Library and Host spread across geography will result in data transfer across WAN impacting the deployment time of environments.