Quick Guide to Installing TFS in Windows 2008 with SQL Server 2008 in a Hyper-V Virtual Machine

July 27, 2009

I have to say, installing TFS is one of the most cubersome processes that Microsoft has come up with.

Firstly, you need and edition of Windows Server. I decided that I would install it on Windows Server 2008 R2 64-bit Release Candidate. But that’s no good, because it is designed for 32-bit Windows Server and has very little support for 64-bit. It detects that it’s not 32-bit, and prevents you from continuing with the TFS install.

I had real trouble installing Windows Server 2008 first release on my machine; some problem with drivers that I couldn’t resolve, so for the moment I am pretty much stuck with the release candidate of Windows Server 2008 R2.

So I decided to install a 32-bit version of Windows Server 2008 in a Virtual Machine using Hyper-V. That was fun. I installed from an ISO image and I was up and running. To configure the Hyper-V site, I had to set up a virtual network, and I wanted to expose my TFS site to the outside world, so I had to tick the box to share the actual physical network adapter with the virtual one.

That got interesting, because the moment I did that, it cleared the settings on the actual physical network adapter. So I decided it needed to have the settings put back in. Wrong move! Leaving the network adapter how it is, without the settings, works.

Next, within the Hyper-V environment, you need to run the operating system, then you need to select Action from the Hyper-V main menu, and then click “Insert Integration Services Disk”. This puts a virtual ISO in the Virtual DVD drive, and a popup box helps you install this vital piece of software.

Once the Integration Services disk is installed, the VM should be able to have network access. To test, simply enter a web site, such as http://www.msdn.microsoft.com.

Next, the TFS installation. First, you need to set up all the accounts. The best place to look for which accounts need to be created is the chm file that you download from the Microsoft site, at http://www.microsoft.com/downloads/details.aspx?FamilyId=FF12844F-398C-4FE9-8B0D-9E84181D9923&displaylang=en

Next, you must use TFS with Service Pack 1 to be able to install on SQL Server 2008. This is not fun. To be able to perform this from scratch involves manually extracting files from the TFS installer and Service Pack 1 intallers and then creating a new merged installer from the two images. If you don’t do this, you will not be able to get TFS to install with SQL Server 2008. This step is quite complex; it’s not for the faint hearted.

It requires SQL Server Standard or Enterprise Edition, 2005 or 2008. On that machine, I had a SQL Server 2008 Development Edition. Nope, it can’t accept that. It must be a Standard or Enterprise Edition. So I installed a copy of SQL Server 2008 and installed SP1, and tried to install TFS. Wrong again. It didn’t recognise SQL Server 2008 with SP1.

So I had a think about it and decided that it must have worked without the service pack. So I removed my SP1 version of SQL Server 2008 and reinstalled without the service pack. It finally detected SQL Server 2008 and installed successfully.

A reboot after all this is a must.

Next, within Visual Studio 2008 Team Edition Development Edition, you need to install Team Explorer. Funnily enough, it’s called Team Edition but that means nothing without the Team Explorer. It’s yet another otherwise unneccessarily annoying steps to achieving the goal.

Of course, it doesn’t end here, because you also need to install Visual Studio 2008 SP1 again, as the Team Explorer downloaded will install in Visual Studio but is not the SP1 version. The implication here is that it won’t be able to connect to the project site correctly, meaning you won’t be able to add Projects.

Next, you need to add the users to the TFS Licenced Users group. This is how TFS tracks the total number of users that can access TFS. I am only using a Workgroup edition, so that limit is 5.  

Well, that was a tough installation process, but it was worth it. TFS is now up and running. It gives you a project structure, it gives you process guidance, a Sharepoint site to manage each project, reporting with SQL Server Reporting Services (SSRS) amongst many other features. Hope this helps!