Today I tried to move a TFS collection from one server to another server.

I followed the steps as described in detail at the following location. But Unfortunately I forgot to remove the lab management resources.

Since my new server does not have the lab management environment set up at this moment and my old machine did this is where I hit a problem during the restore of the collection at the new server.

I got the following error:


[2010-03-17 08:56:45Z][Error] TF261007: Team Foundation Sever encountered the following internal error while trying to restore the application-level configuration values: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.. Try the attach operation again.

Since it failed at the lab management step, I assumed it would be related to my old lab management settings and therefore I tried to run the following command on the TFS server to try to get rid of those settings.

TfsConfig Lab /Delete /CollectionName:APODefaultCollection /External

But that resulted in the following exception to be thrown: “Exception of type ‘Microsoft.TeamFoundation.Framework.Server.HostShutdownException’ was thrown” .

So there I was with a chicken egg problem. Could not run the command since the collection is not online, but can’t get the collection online since I have an issue with the Lab management environment. Fortunately I was able to fix this. It took way more effort then Expected, but it all works again.

So what did I do?

Since the problem was related to Lab management I tried to set up lab management in the hope it would let me attach the collection.

  • I installed VMM Admin console and VMM manager, but that caused me a headache as well 🙁
  • Install SVMM failed because it has some issues with DNS?!?! (Apparently SVMM installer can’t cope with using the “.” as the name of the server for the database. I needed to specify the full NETBIOS or DNS name. If you use “.” you will get a message that setup fails on a DNS resolve issue.)
  • Next I tried to Configure Lab Management , but unfortunately needed to change the TFS service account to use a different domain account since my TFS services need to run in a different context now. Network Service can’t be used to communicate to the lab environment, so i need a different user account for that.
  • So I got a new domain account , changed the service account for TFS
  • Tried to configure Lab Management again. That results in the following error:


Message details:
Lab Management
tf255231: The following name of the server running Virtual Machine Manager Server name cannot be changed because resources are associated with it: Delete the host groups and library shares for each team project collection. Then try the operation again.


  • Next you click Cancel and will see the following results:


  • Next I just tried to reconnect the collection. And what do you know, it attached again!


  • So it now my collection is restored, except for lab management what is expected.
  • Last step was now to run the command to clean up the Lab management configuration.
    TfsConfig Lab /Delete /CollectionName:APODefaultCollection /External

This time it succeeded and now I am good to go ….. pfewww 🙂

Hope this helps you if you might hit this same issue.