I like Virtual PC and I use it a lot. Recently I decided to rebuild my set of VSTS and TFS images. So I happily created a base image with Windows 2003 Server R2, IIS and Office 2007. This will serve as a good base for the rest of my disks, I thought. Next, I copied the base image to install TFS 2005 on it. I started up the VPC, used NewSID to change the computer Sid and give it a new name. Then I installed TFS and all its prerequisites without any problems. Patched it with service pack 1. Tested according to the doc’s (ran the web service, viewed the report site etc). All is good.
Then I went ahead and created a team project in TFS. Not so good… The project wizard failed with this error when creating the Share Point site:
Unable to connect to the Windows SharePoint Services at TFSDEMO01
The Project Creation Wizard was not able to connect to the Windows SharePoint Services at TFSDEMO01. The reason for the failed connection cannot be determined at this time. Because the connection failed, the wizard was not able to complete creating the Windows SharePoint Services site.
The project creation log didn’t say much more. The most interesting was the statement before it failed where it verified that the Share Point templates existed (http://tfsdemo01/_vti_bin/Sites.asmx).
Finally, this was logged to the Windows event log:
#50070: Unable to connect to the database STS_Config_TFS on TFSDEMO01. Check the database connection information and make sure that the database server is running.
Since the errors were unintuitive, I Googled a while, checked permissions, updated the IIS scriptmaps, and checked a good number of other things to find the cause for the error. Nothing. Until I came across this post and it dawned on me. Never install IIS on a VPC image, then change the computer name (or Sid?) and expect IIS to work correctly after. This is probably obvious to everyone... What really fooled me was that IIS responded correctly and the TFS setup went through without an error.
Yesterday, a colleague of mine told me how I could enable hardware virtualization for Virtual PC on my Dell laptop (just enable it in BIOS). Now life is good again.