Share via


How to connect from Visual Studio 2012 on Win 8 host to TFS running on a VM using Loopback adapter

 

I often teach and do demos of VS and TFS and I always like to do it from the Client machine, instead of doing it from a Server OS. The reason is the UI looks very neat and polished when done from a Client OS like Windows 8 or Windows 7.

The following are the steps I did on my machine. You can follow the same to good effect.

 

1. First step is to add Loopback Adapter on host machine - Microsoft-KM-Test-Loopback-Adapter on Windows8

clip_image002

2. Set its IP on non-routable 192.168.10.XX (with subnet mask of 255.255.255.0). I used 192.168.10.88 (pick something not used in your internal network)

clip_image004

3. On your Hyper-V Management Console on win8, Open Virtual Switch Manager and create a new Switch and use the Loopback adapter as its External Network. (you did this in #1)

clip_image006

4. Now go to your VM, and open Settings and choose the network switch you created in #3 above as the network adapter for the VM.

clip_image008

5. Open the network properties for network adapter of your VM network adapter and set it to an IP address on the same subnet as #2. I used 192.168.10.89

clip_image010

6. After this you should be able to do the Ping tests (from host to VM and from VM to host)

7. Ping host to VM

8. Ping VM to host.

9. Add an entry in c:\windows\system32\etc\drivers\hosts for your VM and save the file. (You might have to be admin to do this).
   I added as follows to this file.

   192.168.10.89              MYVSALM

10. On your VM open your TFS Admin Console and add your ID (which is what you use your host machine with) as a local workgroup ID. I added mine as VSALM\GPBLABLA and made myself also an administrator to the local VM. Then went to the TFS Admin Console and added VSALM\GPBLABLA as a Server Administrator. Also add yourself to the respective individual Collections and projects as needed.

11. Now you should be able to connect from your Windows 8 host machines’ Visual Studio 2012 or browser to your VM's TFS.