Thursday, 19 December 2013

01. Create a PDC in an Isolated Internal Network - Setup Virtual Environment for TFS 2013 - Using Virtualbox

This is the first step of Setup Virtual Environment for TFS 2013 - Using Virtualbox. Today I'm going to guide step by step on how to configure a primary domain controller (PDC) on an isolated network environment with Virtual Box.

01. Create a virtual hard disk (.vhd) in virtual box and install Windows 2008 R2 SP1(If you prefer to have Windows 2012 server you can use it as well and all steps more or less similar). Refer this post if you want more information or here is the manual. You can refer to this you tube video as well. Install the Guest Additions to get more control over the VM and host.

02. Once you are ready with the virtual box VM with Win2008R2SP1 shut down the VM and make copy of the virtual box hard disk. Name it as BaseWin2008R2SP1.vhd and keep it as the base hard disk so that you can use it to create other VMs required.

Whenever you want to create a new Win2008R2SP1 VM in virtual box, just make copy of the BaseWin2008R2SP1.vhd and name it as you wish. Then change the uuid as shown here and create a virtual box machine with that .vhd.


03. Now create a VM for PDC using the BaseWin2008R2SP1.vhd as described in above step. Set the network adapter as shown in below image. Provide a name for the Internal Network of Virtual box network(in my case it is Chaminda.net). For more information about different network options with virtual box refer here.


04. Set the other options of the PDC VM as shown below.


05. Start PDC VM and Open Network options and configure an IP. I chose  192.169.1.1




06. Change the VM name as PDC and restart.



07. After restart completed in the run window type dcpromo and hit return key


06. Active Directory Domain Service binaries will be installed and a wizard will popup.


07. Choose advance mode of installation.



08. Create a new domain in new forest


09. Give a name to root domain.




10. If you want a different name for the domain you can change the suggested name.




11. Set the functional level to Window 2008 R2 since we will not be adding additional domain controllers any way.



12. Configure DNS server.


say yes here



13. give a password that you can remember.


14. verify all selected options and hit next.






15. Restart the PDC


16. Password will be the password you have given for the administrator of the machine when you initially set up the machine.


17. PDC is ready now




18. Go to firewall and enable network discovery and file and printer sharing for the domain.



19. Verify IPv4 network properties.


20. Go to server manager and set DNS options as shown below.



If IPv6 is set here change it to IP of IPv4.(Right click to get properties)




If you do not understand exactly what you did..do not worry much. Believe me... I did not understand it very much when I did it for the first time..)  and I ruined few attempts. After going through several networking articles figured it out a bit and got some help from networking expert to make it to this far.

So we are done with our primary domain controller. In the next post we can have a look at how to create a VM for TFS server and add it to our newly created domain.

Setup Virtual Environment for TFS 2013 - Using Virtualbox

For anyone interested in learning how to work with TFS & VS for ALM, one of main challenges will be  creating the necessary environment. Of course you can download infamous Brian Keller VMs and use the comprehensive set of hands on labs. But for the folks who are interested in setting up "MY OWN" environment and learn the install & configure stuff (crazy enough to enjoy learning things in a difficult way), I am going to give a complete guide in the coming series of posts.

I will be using Oracle VirtualBox so that you would be able to create a similar environment in your Win7 or Win 8 machines as well.

We will start this journey with creating a Primary Domain Controller (PDC) and I hope to take you through series of activities until we gain experience with VS 2013 Release Management.

 We will be doing this in an Isolated network environment using Virtual Box so that it will not harm the active directory settings of your host machine's corporate domain. you have the option to go with bridged network mode and even expose your virtual environment to outside networks, may be for training purposes. We can discuss all those great stuff after we complete setting up the environment. :)  For more information about different network options with virtual box refer here.

So let's start with the first step and I will keep updating this post as I add more and more posts in this series.

01. Create a PDC in an Isolated Internal Network.
02. Create VM for TFS and add it to the domain.
03. Setup SQL Server for TFS. 
04. Setup SharePoint Foundation 2013 for TFS.
05. Install & Configure TFS 2013
06. Setup a Build Server
07. Setup Development Workstation Base
08. Create Instance of Development Machine
09. Create First Team Project with New Environment 
10. Create a Simple Application and a CI Build
11. Create a Release Build.

I will conclude the series Virtual Environment for TFS 2013 with the post "11. Create a Release Build". Do not worry, as promised when I started this series of posts, I will continue to explain VS 2013 Release Management as a new series using Virtual Environment for TFS 2013.

Thursday, 14 November 2013

TF259641: To use the environment, you must install a compatible test agent in all machines of the environment. Click 'Install Agents' to complete this task.


I have been trying to configure a TFS standard lab environment with below topology having full trust two domains. This I have done few times and I have  not faced any difficulty in previous attempts. But this time I faced a bit of a challenge with error TF259641.


I was using a configured test controller, for the project collection previously, and that is used in other lab environments without any issues.


The error  "TF259641: To use the environment, you must install a compatible test agent in all machines of the environment. Click 'Install Agents' to complete this task." encountered when I tried to configure my lab environment.


Checked the event log in Test Agent installed machine...




Error was "Unable to connect to the controller on 'myTESTcontroller:6901'. The agent can connect to the controller but the controller cannot connect to the agent because of following reason: The requested name is valid, but no data of the requested type was found. Make sure that the firewall on the test agent machine is not blocking the connection"

Searching for this error pointed to Windows Firewall settings for port (TCP port 6910 for inbound connectivity for agent allowed) of test agent and File and Printer Sharing settings. Verified all OK.



What could be wrong here..I was bit worried. Back to basics and went through MSDN.

This article How to: Bind a Test Controller or Test Agent to a Network Adapter was interesting and I applied binding to my test agent service config file.

Stopped the service.


Opened the config.


Added binding ("This will let test controller to find my test agent machine" was my assumption).


It worked....and my Lab environment configured successfully..


But it was giving a completely different name to my lab environment machine. Then I realized who was the culprit, it was none other but ME.

I have done an experiment to support a payment gateway some time back, with this standard environment machine I used for lab set up now. I have added an entry in hosts (for local IP) file which was causing the error in the first place, not allowing test controller to connect back with the test agent.


Removed this entry from hosts file. I proceeded to remove the binding I applied to Test Agent service config. Restarted Test Agent and refreshed the lab environment. Correct name appeared for my Lab standard environment machine.



Cool...It was working as it should when configured in an environment having multiple domains with full trust. 

Posted this to help crazy fellows like me..who are lazy to create a new machine and use an old virtual machine hoping to run.. often into problems. :)