Wednesday, November 18, 2009

Changing the Hostname on a Linux Box

I recently had need to change a server name due to a change in our server naming scheme (local ski resorts to breweries). For the simple comedy of the naming scheme switch, here's how it currently looks (without server prefixes for security purposes of course). If you just want the solution, skip down a paragraph.

Our current environment is mostly virtualized. The hosts are named after breweries and their virtual guests are named after the beers that each brewery produces. Clever, yeah? I can already feel my morale rising.

Now, to the solution...
Changing the hostname on a Linux machine is a bit more complicated than it is in windows.




First off, open up a terminal window













Then type sudo nano /etc/hostname










The file that comes up should contain nothing but a hostname. In my case this is hal8000 (yes, laugh all you want). Change this to whatever hostname you want. Once you have input this, press Ctrl + x. From there press y and Enter. (Ctrl + x closes the file, y says to save the file before closing, Enter saves the file under the original filename).





Once you've done this, all you need to do is restart your computer and you should be golden.



***NOTE***
While the method I just described will change the actual hostname of the computer, its IP address will no longer resolve to its hostname.

Here's how we fix the aforementioned issue.

If you've closed your terminal for the restart, open it up again.
Type sudo nano /etc/hosts



At the top you should see 127.0.0.1, 127.0.1.1 and their associated 'hostnames'. The one to the right of 127.0.1.1 should show your old hostname. Change that to the new hostname and save the file (Press Ctrl + x -> y -> Enter). Now your computer's IP address should resolve to its new hostname.


Enjoy!

Now for a cup of joe...

Thursday, November 12, 2009

Blog Resurrection

Hello all,

A few months back I moved jobs. At my last job (as you all well know from this blog), I was a server administrator and .Net programmer on the side. At the new job, I was hired primarily as a web developer (PHP, JavaScript, Joomla dev, etc.). Naturally, because of the position change, I was no longer doing server administration and consequentially had nothing new to post on this blog.

That has changed now. The company I now work for didn't have much of a server infrastructure (a non-server edition mac that stored files), so they asked me to design and build a new one.

All that being said, I now have new content to post here. You Linux users will be happy to hear that I am now using Linux for some of our servers (virtual host and file server). To you Windows users, I will be building an Exchange server, terminal server, and a backup server (this might be done on Linux though). Most likely things in that list will be shifted around a bit in the next two or so weeks so please bare with me.

Some of the technologies I will be using in the upcoming posts will be
Windows Small Business Server 2008 (x64)
Ubuntu Server 9.10
VMWare Server 2
Microsoft Outlook Exchange
TightVNC
SSH

On one final note, I would like to put out a shameless plug for my other blog, Musings of a Web Developer. It covers the issues and fixes I have found throughout my adventures of coding websites. Essentially, it's the same thing as this blog but for web development rather than server administration.

I look forward to the upcoming comments about how depressing IT work can be *AHEM*... I, uh, I mean the joys of IT work. Who's kidding though. Everyone knows that we IT people love our jobs, especially the Dilbert comics that document our endeavors.

:P

Friday, July 31, 2009

TFS 2008 : Permissions for Creating Team Projects

I recently finished my Team Foundation build and am quite pleased with it. With Team Foundation Server being new to me, I ran into a few issues with permissions.

The Team Foundation server I built will be managing my team's code as well as two other teams once everyone has moved over.

That being said, I need to give out permissions for the managers of each group so they can create team projects for their teams.





Let's get started

Permissions for this are somewhat complicated in that they have to be given in three different locations for the user(s) to be able to create Team Projects and all of the other services associated with one.




We'll start off with the TFS permissions.

By default, the service account has permissions to perform these actions so you should be logged in as that account.

Head to your Team Explorer in Visual Studio and connect to your Team Foundation Server. Right-click your server name, go to Team Foundation Server Settings, and select Group Membership. From within here you should see a group titled Team Foundation Administrators. Double-click this group and add your user/group to it and you're done with the TFS part.


*NOTE* To keep the Administrators group from becoming cluttered with usernames and group names, I created a TFS group for Administrators ( for instance) and simply added that group to Team Foundation Administrators.




Next up we'll tackle SQL Reporting Services permissions.

For this one you want to go to your SQL Reporting Services page (mine was http://servername/Reports ).

Once there, click the Properties tab. Click New Role Assignment on the page that loads. From here, enter the active directory username or group name you want to have permissions to create team projects in TFS and assign them at least the Content Manager role. Once you're done, click OK and you're done with the permissions for SQL Reporting Services.




Finally, Windows SharePoint Services permissions.

Head to your central administration site (Start -> Administrative Tools -> SharePoint 3.0 Central Administration). Once there, click the Operations tab at the top left. On that page, select Update farm administrators's group (it's under the Security Configuration group). From here, click New to add a new user (the button also has a drop down function so if you get that, click Add User). On the AddUser: Central Administration page, type in the username or groupname and add them to the Farm Administrators [Full Control] group.



There you have it. You should now be good to add as many Team Projects as you desire.


A closing thought: I would recommend that the majority of this be done through active directory groups. It makes usermanagement much easier. If someone quits or it let go, all you have to do is remove their account from the group in active directory and it takes care of everything in Sharepoint, TFS, and SQL Reporting services instead of having to manually go in and remove the person from every location.


On a side note, I'm going to get some lunch...

Thursday, July 30, 2009

Upgrading TFS 2008 Workgroup to TFS 2008 Standard

About a month ago I was assigned the task of learning how to build and maintain a team foundation server. To avoid the costs of purchasing licenses for a software we were only testing for a production environment, we decided to use our MSDNAA copy for our test. Incidentally, the version MSDNAA distributes to schools is the workgroup edition.
After the build was completed, I decided that Microsoft's Visual Studio Team Foundation Server would do everything (and more) that we needed. Due to legal restrictions, I couldn't/shouldn't use the MSDNAA license for a production environment. Additionally, the workgroup license for TFS only supports five users, hardly enough for my team's purposes.
Naturally I wanted to avoid have to reinstall Team Foundation Server since simply inserting the new license key would be the easiest thing to do, if the software supported it. I searched around the web for a bit and found a Microsoft article on upgrading from workgroup to standard, but it was for TFS 2005. None-the-less, it was worth a shot. Coicidentally, it was not too far off. Here's how I upgraded my copy and a problem I ran into in the process.


This method DIDN'T work (Microsoft's suggestion)

If you go into your Programs and Features (if you're using Server 2003 go to Add or Remove Programs) on your server that TFS is isntalled on, double click the uninstaller for Microsoft Visual Studio 2008 Team Foundation Server - ENU(assuming your copy is English). On the window that comes up you should see an option at the bottom to upgrade to Team Foundation Server. Check that radio button and enter the new license key you have and click Next. You should see a window that says upgrade was successful.

The problem I had with this method was that when I checked the radio button, the license key text boxes remained greyed out. When I clicked Next, hoping to see a place to input the new license key, I was met with a screen that said my upgrade was successful, though it wasn't.


This method DID work

Insert/mount your Team Foundation Server disk/image and run the installer. It should give you options to repair, uninstall, or upgrade. In my case, the upgrade option automatically showed the license key for my disk. I selected that option, clicked Next, and my edition was upgraded to TFS standard.

Tada!

Tuesday, July 28, 2009

Installing Visual Studio 2008 Service Pack 1

Recently, I realized that a few of our developement servers were running Visual Studio 2008 with the beta of SP1. One would assume that the installation of a service pack wouldn't be too difficult but since they already had the beta of service pack 1 installed, the installation of SP1 became a bit more complicated.

If you download the service pack installation file from Microsoft and run it, you get an error saying that you need to run the Service Pack Preparation Tool before being able to install. Head to the Microsoft website and download the removal tool.
In my case, I ran the SP prep tool and received yet another error. It said that it need some files on the installation disk for Visual Studio 2008 Shell (integrated mode) - ENU. The ticket here is that we don't have a disk for that and to my knowledge, there isn't one. Microsoft has a download for it but it's an executable that doesn't extract an iso. I searched around for a solution to the problem and found a site that said to simply uninstall VS 2008 Shell (listed in Programs and Features as Microsoft Visual Studio 2008 Shell...). I performed said action and the prep tool ran fine with no errors.
After running the prep tool, I stimply ran the installer for the service pack with yet again no errors.
The install did, however, take about two hours (ugh).

There you have it.

Monday, July 27, 2009

Server Administration : Firewalls

Hello again all,

The majority of the servers that I manage have to communicate with many other servers I manage for various reasons. Inevitably, I have many firewall blocking issues. Despite my age, I still have trouble remembering all of those commonly used ports and what they are for. That being said, this post will list all of the Windows default firewall ports used for the various software sources. Yes these are all readily available at other sites. This is simply a central collection.
I will update this post when I have more blocks come up.
Post comments if you would like to have a particular port added to the list.



FTP

21

HTTP

80

HTTPS

443

POP3

110

SMTP

25

SQL Server Management Studio (remote connect)

1433

Terminal Services

3389

VMWare Server Administration

8222

VMWare Server Administration (Secure)

8333



Let me know in the comments section if there are any ports you would like added to this list.

Wednesday, July 15, 2009

Installing Team Foundation Server 2008

The installation of TFS 2008 can be a daunting task if the right documentation is not used. This post will cover the installation of Team Foundation Server 2008 and all of its prerequisites.

To preface, this post will document a single server installation of Team Foundation Server 2008 on a Windows Server 2008 server using SQL 2008 on the backend.

Here’s the quick rundown of what will be done.
1.) Install IIS 7.0
2.) Install SQL Server 2008
3.) Install SharePoint
4.) Install Team Foundation Server 2008

*NOTE* Before the install of Team Foundation Server you must have service pack one integrated into your install media. Microsoft has outlined how to integrate SP1 into your install media here.

To save text space on each installation process, I will be simply saying where to go to install the specified software rather than doing a step-by-step tutorial.
Lets get started


Installation of IIS 7.0

Here’s a good one. To install this one, head to the Server Manager window. From there, go to install the IIS 7.0 Role (it is called Web Server (IIS) in the wizard). When you select it to be installed, you will be prompted to install two more features additionally, assuming this is a clean install. Accept the install of the two additional features and continue.
The role services that need to be installed are:
1.) HTTP Redirection
2.) ASP.NET (Add required role services as well)
3.) IIS 6 Management Compatibility
Click through the windows until IIS 7.0 is installed. Though it is not required, I always do a restart after the installation of a new role or service, just to be safe.


Installation of SQL Server 2008

Yet another exciting step (like every step in this process) is the installation of SQL Server 2008. Insert the DVD (or mount the iso) and run the setup.exe on the disk. Select the New SQL Server stand-alone installation or add features to an existing installation option under the Installation page.
Enter your license key on the window that comes up and proceed through the various prompting windows until you get to the Feature Selection screen.
The features that need to be installed are:
1.) Database Engine Services
2.) Full-Text search
3.) Analysis Services
4.) Reporting Services
5.) Management Tools – Basic
For the Instance Configuration, the Named instance field can be anything. I personally use the default instance and Instance ID for simplicity.
For Server Configuration I used the NT AUTHORITY\NETWORK SERVICE “account” for all of the services. Also make sure that SQL Server Agent starts up automatically and not manually. The other three should be automatic startup by default.
On the Database Engine page the Microsoft documentation suggests Windows Authentication. I believe that that method for authentication has it’s purposes but for my purposes, I use Mixed Mode authentication. Don’t forget to add the user(s) you want to have sysadmin access to your SQL instance. If you forget this step, you won’t be able to get into your instance unless you find a way to enable the SQL SA account without having to authenticate.
Add the users you want to have access to the analysis services on the Analysis Services Configuration page and continue.
For the Reporting Services Configuration page, select to Install, but do not configure the report server. The Team Foundation Installer will do this for you later.
For the last few pages, just click through them (make sure to check if you want Microsoft to receive usage reports from your instance). Review your install to make sure everything is as it should be and install SQL server.

Popcorn anyone?


Installation of SharePoint Products and Technologies

Before the installation of SharePoint, we need to do a prerequisite install. Head to the Server Manager and add the .NET Framework 3.0 feature. On my server instance, this was actually already installed so I didn’t need to install it. Simply make sure that you have it installed or you will run into problems later on.
Now, for the installation of SharePoint Products and Technologies.
Head to the appropriate link to download download Windows SharePoint Services 3.0 with Service Pack 2.
x86
http://www.microsoft.com/downloads/details.aspx?familyid=EF93E453-75F1-45DF-8C6F-4565E8549C2A&displaylang=en
*NOTE* The link to the x64 version of this is not listed because there is not a 64 bit version of TFS 2008.

*NOTE* If you choose to go with an alternative installation package, it must at least have service pack 1 already integrated.

Run the SharePoint.exe file to get started with the installation.
After accepting the license agreement, we find ourselves at a fork in the road. Select Advanced to do a customized install. The server type should be Web Front End. On the Feedback tab decide whether or not to share usage reports with Microsoft. Click Install Now.
After the installation has completed, Make sure the Run the SharePoint Products and Technologies Configuration Wizard now is checked and click Close.
In the Configuration Wizard, Select No, I want to create a new server farm and click Next.
For Database server type the name your database is hosted on. In the case of a single-server install of TFS, this will be the hostname of the server that you are installing SharePoint on.
*NOTE* If you chose a name for your SQL instance other than the default instance name, type <ServerName>\<InstanceName>
Choose the name of the SharePoint database or leave it default (I used default).
Input the username and password for the service account (can be the TFSService account) and click Next.
On the next page, be sure to remember the port you choose for your Central Administration web application. It can be recovered relatively easily but it’s just best to remember now. Select NTLM and click Next.
Review your settings and finalize the install.
Finally, we need to run a few command line commands.
Open a command prompt as admin and navigate to C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\bin\.
First, run
stsadm.exe -o extendvs -exclusivelyusentlm -url http://<ThisServersName>:80 -ownerlogin Domain\Username1 -owneremail "admin@localhost" -sitetemplate sts -description "Default Web Site"
Domain\Username1 should be the account you want to have admin privileges on the port 80 SharePoint web application. I used mixed authentication so I gave this the service account for TFS and SQL.
Next, run
stsadm.exe -o siteowner -url http://<ThisServersName>:80 -secondarylogin Domain\Username2
In this case, Domain\Username2 represents the user you want to be your secondary administrator for your SharePoint port 80 web application.


Installation of Team Foundation Server 2008

*NOTE* Once again, Before the install of Team Foundation Server you must have service pack one integrated into your install media. Microsoft has outlined how to integrate SP1 into your install media here

Welcome to the final step in this installation process (TFS 2008 configuration will be in a different post). I won’t slow us down with any detailed intros. With that, let’s get started.
Insert your installation medium (once again, I used an iso mounted through Hyper-V). Start up the installation, agree to the TOS (if you actually do) and head on to the next screen. After clicking Next a few times, you’ll find yourself at the Team Foundation Database Server page. As I mentioned earlier in the post, I’m doing a single server install this time which means my TFS database is hosted on a local instance of SQL. The installer should fill out the local server name for you. Since we’re doing a single server install, click Next. Sit back and relax for a few minutes while the installer runs a System Health Check.
Once the health check is complete, click Next to head to the Team Foundation Server Service Account screen. Once there, specify the account you want TFS to run as. In my case I chose a domain account for access reasons. Click Next.
On the Reporting Services Data Source Account screen, input the information for the account you want TFS to run reports as. In my case, I elected to go with Use Team Foundation Server service account since my SQL reporting runs as that user. Click Next.
The installer should automatically fill in the information for you on the Windows SharePoint Services screen. In my case though, the Central Administration URL was incorrect for some reason (the port was one number off) so make sure that everything is right before continuing. Click Next.
Here we are at the Specify Alert Settings page. If you wish TFS to notify you (or anyone else) of various build events (this is configurable), check the Enable Team Foundation Alerts checkbox and fill in the information for SMTP server and From e-mail address fields. Click Next.
On the Ready to Install page, review your settings. If everything is correct, click Install.


There you have it…a fresh install of Team Foundation Server 2008.


Tuesday, June 30, 2009

Migrating SQL Data

In my current project I have found a need to migrate data from one SQL server to another. For those of you SQL gurus out there, you know that there are many ways to migrate data from point A to point B in SQL, even when different versions is involved.

Here's my setup
Server 1:
SQL Server 2005 Standard (x86)
Windows Server 2008 (x86)

Server 2:
SQL Server 2008 Standard (x64)
Windows Server 2008 (x64)

As you can tell, I'm upgrading versions and processor architectures. Surprisingly enough, this didn't seem to cause any issues for me.

Here are a few options one has to migrate SQL data between servers for those who don't find this post too useful.
1.) SQL Copy Database Wizard
2.) Detach, copy to new server, and reattach
3.) Backup database, copy backup to the new server, convert backup to a database, attach the converted database
4.) Create a database mirror
5.) Duplicate the database structure on server two and import the data from server 1

For my environment, only 1, 3, and 5 would work since the others leave more possibility for data integrity issues during the transfer or require that the SQL server be temporarily taken offline. I tried out a few of my options and decided that 1, the SQL Copy Database Wizard, was the best option. It's relatively straightforward and very efficient.
For the last three days I have been struggling with it because of what looks like permissions issues, though I can't be sure since all the error says is that step 1 was the last step to run and that the job failed (give me ambiguity or give me something else!). All that being said, I decided I needed to find a new way to transfer the data.

Through all of my troubleshooting I found quite a few SQL facets that I pieced together to get what I needed. Here's how I chose to migrate my 12 databases without too much trouble.


To start, I used SQL Server's remarkable "Script Database as" functionality to write out the query that creates the database, all of the columns, and all of their constraints. For mine I just copied the script to the clipboard to make compiling all of the scripts together much faster. To sum it up, I had SQL generate the queries for each database I wanted to migrate and I pasted them all into notepad so I could run them all at the same time.







After running all of the afforementioned queries to create the all of the database structures on your destination server we're ready to start importing data. Right click the database to import data to. Go to Tasks -> Import Data...













If you haven't done this before, you should receive a "Welcome to the SQL Server Import and Export Wizard" screen. Click Next.


Here we are at the "Choose a Data Source" screen. For Server name type the hostname of the server you need to migrate from (the source server). After that, select the database you want to copy to the new server. Once done with that, click Next.














On the "Choose a Destination" screen, type in the name of the server to migrate the data to. Next, select the Database you want to copy the data to (this should corrospond to the DB name on the source server since we ran the create queries generated by SQL). In my case, I was running the Import and Export Wizard from the server I was importing the data to so SQL server already had the Server name and Database filled out. Click Next.

In my case, I wanted to copy the entire database to the destination server, so for the "Specify Table Copy or Query" screen, I elected to "Copy data from one or more tables or views". Click Next. On the following screen, check all the database tables you want to be copied (or just check the box at the top left for all of them).

Nearing the end the "Save and Run Package" screen comes up. If you don't need to save the package to be run later or again at a later time, just leave Run immediately checked and click Next. Finally we review our settings and what will be copied. If everything looks right, click Finish. Once the transfers have completed, click Close. If any transfers failed or threw a warning, you can click the "Messages" text next to the table that did not succeed to see the log entries about it.

Repeat the aforementioned steps until you have migrated every database you need.

Thursday, June 25, 2009

Converting Hyper-V VHDs

I recently was assigned the task of rebuilding our Team Foundation Server with TFS 2010 for many reasons. One of those is because the old one has a VHD that is consuming far more resources than it should be (it's a 100 gigabyte vhd and only 8 gigabytes are in use). I seemed to recall somewhere that Hyper-V could "compact" a virtual hard drive, but I couldn't remember where. After doing a bit of searching around Hyper-V, I found what I needed.

Here's a few facts about this before getting started.
First, shrinking a hard drive only applies to Dynamically sizing disks. Since these do no shrink on their own (there's a lot of reasons why) but only grow, they might need to be compacted later to free up host space. It only reduces the .vhd file size by shrinking the 'shell' (if you will) to take up the drive space that is not being used by the guest OS.

In my situation, I was dealing with a drive that was not dynamically sizing but was static. If the vhd is static, the Compact button will not show up when you go to edit the drive.
In my case, I did not have to compact the drive. As I said, a drive cannot be compacted unless it is dynamic. Since mine was static, I converted it to dynamic to regain the compacting functionality but because of the way the conversion process works, it automatically 'compacts' the .vhd. My original static .vhd was 100 gigabytes. The output was 15.5 gigabytes.

Though I did not have to compact my .vhd because the conversion process did it for me, I'm going to put the instructions on how to compact the .vhd anyways.

For starters, the virtual machine that the hard drive is attached to must be turned off. Once the server is offline, from within the Hyper-V Manager (it's an mmc snap-in) go to the virtual machine's properties (right click the machine and select properties). Select the drive you want to shrink on the left panel that lists the various devices attached to the virtual machine. After selecting the drive, on the right panel, select Edit. This will bring up a window that tells you what editing a drive does and gives you the option to not show that screen again. Click Next. From here you should have three options (unless the .vhd is static). Select Compact and click Next. Finally, click Finish and Hyper-V Manager will shrink the .vhd as much as it can.

Friday, June 19, 2009

Team Foundation Server 2010 Beta 1 Configuration

After finishing my last post on the installation of Team Foundation Server 2010 Beta 1, I closed down for the day and went home (now now, no judging...that was a long post). Today I'm back to go over the configuration of TFS 2010 Beta.


Configuration of TFS 2010 Beta 1
If you're coming to this blog post from my last one on the installation of TFS 2010 Beta, you will have just restarted your server and the Team Foundation Server configuration screen should be up. That's where we'll be starting here.


At the first configuration page, you must decide which confiruation path you want to take. The descriptions that the page gives are quite helpful in deciding which path to take since they give "You want to use this if..." and "You don't want to use this if..." sections for each option. For my purposes (Single-server installation with Sharepoint not installed yet and using the default instance of SQL Server), the Default Configuration will suffice. Click Next.




The next page of the configuration wizard (if Default Configuration was selected) simply indicates that some tests will be performed on the server to determine if certain pre-requisites are met for a proper configuration. Click Next.

*NOTE*
Here you have the option to click review OR next. If you click review before clicking next, you will most likely get [invalid] for Report Reader Account and the SharePoint Service Account since the next screen prompts for the service account's username and password


Here you are prompted for a service account. This account will be used as the service account to run Windows Sharepoint Services (WSS) and SQL Reporting Services. For my instance, I created a domain user account called TFSWSSService (creative, yeah?). If you want, you can click Test to confirm that the username and password work. After typing in the requested username and password, click Next.






Here the configuration wizard runs tests on your server to confirm everything is installed properly. The first time through, I received a warning on the first test because my firewall was disabled (I talked about that in the last post regarding installing TFS). Since we're all learning here, I elected to re-enable my firewall so I could have the problems that accompany closed firewall ports (the more problems you have, the better you get at troubleshooting the given system, right?). Click Next.





Here's where the real fun begins...if you can classify sitting around for about 20 minutes watching a looping progress bar as fun.












Once the configuration is complete and assuming you had no errors or warnings on previous screens, you should seen a screen that says what we all love to exclaim at the end of a long project...SUCCESS. The great thing is that if you click Next, it continues to say Success as well as telling you where you can find the configuration log. How considerate. Click Close.






That's it for now. If you followed my last post on the installation of TFS, you probably noticed that I installed Team Build as well as TFS. My next post will be on the configuration of Team Build.
Thanks for reading.

Aaron Ball

Thursday, June 18, 2009

Installing Team Foundation Server 2010 Beta 1


The installation of Microsoft's latest beta release of Team Foundation Server 2010 has apparently been quite a hot topic in IT lately. My Twitter page isn't that popular and when I first started tweeting my progress, shortly after I was receiving messages regarding my documentation and progress. Here is the shortly awaited documentation on what I've done to install TFS.

Here's what my environment looks/will look like:
- Windows Server 2008 Enterprise (with hyper-v but that's irrelevant)
- SQL Server 2008 Standard
- WSS 3.0
- Sharepoint 2007 Enterprise
- Team Foundation Server 2010 Beta 1 (of course)

There are a few ways this environment can be changed around (which versions such as Enterprise or Standard can be used). Check out Microsoft's TFS installation documentation for this information (a convenient .chm file...check my blog post on this if you have issues opening this file).

Additionally, this post documents a single-server installation on a 64-bit machine.

Here's a summary of the order of software installation that will be taking place.
1.) Windows Server 2008 (we have to have an operating system)
2.) IIS 7
3.) SQL Server 2008
4.) Team Foundation Server 2010 Beta 1 (with WSS 3.0)

If it isn't obvious yet, this is going to be a long post. I've taken screenshots of many of the steps which won't help the length. Is everyone buckled in? Good. Let's get started.



Installing Windows Server 2008

The install of Windows Server really isn't that complicated. There are not special requirements for this. However, post-install, my server was added to a domain so I could use domain service accounts. It isn't necessary to have the server added to a domain though.



Installing IIS 7.0

This part really isn't too bad (thankfully). In the server management, on the left click Roles. On the right, click Add Role Services.



On the window that comes up, at the bottom check Web Server (IIS) and click Next.














Here some default values are selected. You need to add HTTP Redirection, ASP.Net, Windows Authentication, and IIS 6 Management Compatibility and all subordinate check boxes. Click Next.









Here your selections are reviewed. If everything is correct, click Install. Once the install has completed, you'll see another review window. If everything was successful, click Close.



Installing SQL Server 2008

Here's where the real fun begins. This install isn't too bad. The real ticket is to know if you have any service accounts you want to use for the SQL services. Since I did a single-server install on a server dedicated to my team, I used NT Authority/Network Service for mostly everything, but I'll get to that a little later.

First off, insert the SQL installation media (I used an ISO file mounted through Hyper-V for mine).
From here, run the setup executable on the disk. Mine did an autorun. From that window, I selected installation on the left navigation pane. On the screen that loads on the right, select New SQL Server stand-alone installation or add features to an existing installation.
The screen that comes up will run five tests. If your installation is clean than most likely all five will pass with a green check mark. Mine threw a warning to me on Windows Firewall because mine was turned on with default settings. Since the server is behind two firewalls, I elected to disable the Windows firewall completely. Re-running the test after that resolved the warning. Click Okay.

Here we are at the obligatory Product Key screen. Enter your product key and hit Next.
If you accept the license terms (License Terms page), check the box and click Next.

The next screen wants to install setup support files. Go ahead and click Install to continue. The following screen will yet again, run some more tests (eleven to be precise). Again, if this is a clean install, every test should pass.

Here's one of the crucial screens: Feature Selection. On this screen, you should select to install Database Engine Services (for TFS), Full Text search (for reporting), Reporting Services (for reporting), Analysis Services, Client Tools Connectivity, and Management Tools Basic. Once those are checked, click Next.



Hit Next to continue to the Instance Configuration screen. If you want to, you can rename this SQL instance to whatever you want it to be. I chose the default MSSQLSERVER since it will be used for TFS only and nothing else will be connecting to it. Click Next.









Click Next on the Disk Space Requirements screen.

Here we are at the Server Configuration section. Unless you have any specific domain accounts set up for running SQL, NT AUTHORITY\Network Service will suffice for all of the accounts listed. No password is required to use this username. Also be sure to change SQL Server Agent to start up automatically (by default it is manual). Click Next.

The Microsoft documentation suggests on the Database Engine Configuration page that Windows authentication mode be checked. I have had some pretty nasty experiences with this in the past and selected Mixed mode authentication. Following this, you need to type in a password for the SQLSA user. Also, don't forget to add all of the users you want to have access to the DB engine. Once you're done with that, click next.
The next page is the Analysis Services Configuration page. Add any users you want to have access to the analysis services that your SQL instance will supply. Click Next.
On the Reporting Services Configuration page, select Install the native mode default configuration. Click Next.
Here's the obligatory Error and Usage Reporting screen. Check whether or not you want Microsoft to receive anonymous usage statistics regarding your SQL instance and click Next.
Nearing the end, click Next on the Installation Rules screen.
Finally, we're at the Ready to Install screen. Review the features to be installed and click Install.
Once the installation is complete, click Next and Close.



Installing Team Foundation Server 2010 Beta 1

Here we are at the final software install. This part really isn't too bad (surprisingly enough).
To begin, insert the installation media (once again, I mounted an ISO through Hyper-V). If autorun is enabled, a standard window should come up giving you the option to explore the newly inserted media. If this does not happen, just open up Computer and navigate to the disk.
Inside the disk there are three folders. Depending on your processor architecture, choose either the TFS-x64 or TFS-x86 folders. From within that folder, run the Setup.exe file.
Here we're at the first screen. Click Next to proceed.
Once again, the ever-present Licensing Terms page. If you accept, check the box and hit Next.



The Microsoft documentation suggests that only Team Foundation Server be checked. I actually need the build server to be on the Team Foundation Server as well so I checked all three. Either will work though. Click Install.














During your installation, the server will need to be restarted. Click restart now. Upon restart, the configuration option will become available to you.











Pat yourself on the back. You just installed TFS. This is a long enough blog post for now. I'll post here very shortly the configuration steps I took for TFS (still haven't taken all of the screenshots I need for it).

Thanks for reading.

Aaron




Wednesday, June 17, 2009

Opening CHM Files in Vista

If any of you have been following me on Twitter recently, you know I've been researching the installation of TFS. I had pretty good luck with a lot of websites regarding TFS 2008, but not so much with 2010 Beta 1 (naturally). The only source for detailed documentation was Microsoft, so I went with what I had and downloaded the document. If you hadn't guessed yet from the title of this post, the file was a .chm extension.

After downloading the .chm file, I proceeded to open it. Much to my dismay, it opened but the pages would not load. I was getting 404 errors on every topic. After spending a few hours searching, I found a solution. Apparently the .chm extension is not secure and Vista removed the ability to read files like that unless they are in a specified 'safe' location. I don't particularly want to have to download any .chm file to an obscure location and then have to find that location again to open the file. Naturally, I searched for a simpler solution.

The solution I found, simpler or no, worked. You guessed it...it's a registry hack.
I have a theory that one can literally do anything with registry hacks...things like make pigs fly or make hell freeze over.

Here's what to do:
1.) Right click your .chm file and select Properties
2.) Click Unblock and select Apply
3.) Open up Regedit (Windows Key + R and type regedit)
4.) Navigate to HKEY_LOCAL_MACHINE\Software\Microsoft\HTMLHelp\1.x\ItssRestrictions
5.) Modify the DWORD MaxAllowedZone to equal 1 (if it doesn't exist, create it)
6.) Close all Internet Explorer Windows and start up your .chm file

That's all there is to it. I haven't had any problems with any .chm files since.

The next post I have coming up (already have most of it written) is on the installation of TFS. Brace yourselves...

Aaron

Tuesday, June 9, 2009

Converting Disks in Hyper-V

I recently have been running into space issues. I had a four hundred gigabyte hard drive that had almost not space remaining. It stored 8 running servers with dynamically expanding disks that had a maximum size of 40 gigabytes (on the host it was almost 42 gigabytes). I also had to store a backup server image (sysprepped) for copying to quickly create a new server if needed. Additionally, one of the hard drives was 70 gigabytes, not 40. All around, the total came to 459 gigabytes if each hard drive expanded to its largest.I suggested to my boss that we should convert each disk to fixed rather than dynamic disks to improve performance. He agreed and I began my search for how to convert disks. Much to my delight, converting a disk is a relatively painless (albeit slow) process.
Here's how:

For starters, open up the Hyper-V Manager. If you have been working with Hyper-V for any amount of time, you should know where this is. If you're totally new to this, Hyper-V Manager should be located in Administrative Tools. If you can't find it there, open a run window (Windows Key + R) and type mmc. From the window that comes up, Click File -> Add/Remove Snap-in... From the window that comes up, scroll down in the Available snap-ins list and double click Hyper-V Manager. Click OK.

*NOTE* A server must be either off or paused to convert the disk (I chose off for my conversions)

Alright, now that that's out of the way, right click the server you want to convert.

From there, click settings. In the window that comes up (Settings for ), click the hard drive you want to convert. In my case I only had one hard drive 'attached' to my servers.
From here, click Edit











The window that comes up (Edit Virtual Hard Disk Wizard) will start on the "Locate Disk" step but should continue to the next step automatically in a few seconds. On the "Choose Action" step, check the radio button next to the "Convert" option (second down from the top).













Click Next. This will take you to the "Convert Disk" step. Here you need to set the destination filename for the conversion. In my case, I just selected the old file from the browse window and added a "_fixed" at the end of the filename. Any naming scheme works though of course.

Click Next yet again. This will bring you to the summary window. Make sure everything you entered is correct and click Finish.







From here, just sit back and relax.


The conversion speed at the beginning can be a little deceiving. Mine got almost 25% done in the first five minutes. It actually took it about an hour to complete for forty gigabytes though. Reminds me of a cell phone. It reads full battery power until it has none left and then it says it has none five minutes before turning off.


Thursday, June 4, 2009

SQL Server 2008 Memory Management

Once again, hello all:

Recently I had a problem with SQL server. I was sifting through the processes in Task Manager a few days ago ordered by memory consumption. At the top of the list for memory consumption was SQL Server (sqlserver.exe) weighing in at 200 megabytes of memory. I decided to look past that one since 200 megabytes isn't too unreasonable for SQL, especially when it's hosting the data for quite a few SharePoint web applications.

Today, I checked again. After my server had been online for two and a half days, SQL server had grown to over 650 megabytes of memory (653,224 KB specifically). Seeing as how I have not made any changes to my local SharePoint environment in that time (I'm currently developing a non-SharePoint related project), I decided to look into putting a cap on the memory consumption of SQL. Originally I had 2 gigabytes of ram for my server. I added an extra gigabyte to that and SQL took up the additional space.

As it turns out, one can put a maximun and a minimum limit on SQL. Here's how.

*NOTE* This is done in SQL Server 2008 so the specified actions may not be available if you are using an older version such as 2003.

- Open up SQL Server Management Studio 2008

- Type in the information to connect to the server that has SQL server running on it and click connect.

- Right click the server name

















- Click Properties
- Select Memory on the left side of the window that comes up


















- Under Server Memory Options, adjust the minimum and maxiumum memory settings to what you need.
*NOTE* If you are running a 32-bit operating system and need to allocate more than 4 gigabytes of RAM to SQL, be sure to check the "Use AWE to allocate memory" checkbox.

- Click OK

- Right Click the server name again

- Select Stop from the menu
- Click necessary buttons to get through the prompts

- Right Click the server name yet again

- Select Start from the menu

- Click the necessary buttons to get through the prompts


And that's it. Mine (as in the screenshots) has yet to go over 300 megabytes of memory consumption.
Thanks for reading.

Aaron Ball

Saturday, May 30, 2009

SQL 2008 Re-install Errors

Hello again all,

Recently, after the server build was 'finished', I discovered that the SQL install was not configured to use the proper authentication method or service accounts (oops) and without mixed mode authentication enabled, windows authentication could not be used to log in to sql to fix these things. That being said, I had to uninstall SQL 2008 (standard edition) and do a reinstall to correct these issues. Time to grab some popcorn and a drink and sit back to watch that entertaining progress bar as it slowly creeps across the tiny 800x600 virtual console window.

I configured the SQL install and ran into an ambiguous error (how typical).
"This access control list is not in canonical form and therefore cannot be modified."

How quaint. Thankfully, after searching for a few minutes with our friend Google, I stumbled upon a Microsoft feedback article that seemed to contain my answer.

Here's what needs to be done.
Navigate in an explorer window to
C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\

The link at the end of this post to the Microsoft feedback article says that from there you open up the "details.txt" file. I found that that folder actually contained 11 folders (from the current install and the previous install) and a file called "summary.txt". I found the right "details.txt" file in the most recently created folder.

Once you've located the right "details.txt" file, open it up in notepad (or your editor of choice) and scroll to the end of the file (it's pretty big so use the scroller bar). Near the end, you should see some text that looks similar to...

2009-05-30 18:02:40 Slp: Sco: Attempting to set directory full path
2009-05-30 18:02:40 Slp: Sco: Attempting to normalize directory path C:\Program Files\Microsoft SQL Server\100\COM\
2009-05-30 18:02:40 Slp: Sco: Attempting to check if directory C:\Program Files\Microsoft SQL Server\100\COM\ exists
2009-05-30 18:02:40 Slp: Sco: Attempting to set security descriptor for directory C:\Program Files\Microsoft SQL Server\100\COM\, security descriptor D:(A;OICI;FRFX;;;S-1-5-80-3263513310-3392720605-1798839546-683002060-3227631582)
2009-05-30 18:02:40 Slp: Sco: Attempting to check if directory C:\Program Files\Microsoft SQL Server\100\COM\ exists
2009-05-30 18:02:40 Slp: Sco: Attempting to normalize security descriptor D:(A;OICI;FRFX;;;S-1-5-80-3263513310-3392720605-1798839546-683002060-3227631582)
2009-05-30 18:02:40 Slp: Sco: Attempting to replace account with sid in security descriptor D:(A;OICI;FRFX;;;S-1-5-80-3263513310-3392720605-1798839546-683002060-3227631582)
2009-05-30 18:02:40 Slp: ReplaceAccountWithSidInSddl -- SDDL to be processed: D:(A;OICI;FRFX;;;S-1-5-80-3263513310-3392720605-1798839546-683002060-3227631582)
2009-05-30 18:02:40 Slp: ReplaceAccountWithSidInSddl -- SDDL to be returned: D:(A;OICI;FRFX;;;S-1-5-80-3263513310-3392720605-1798839546-683002060-3227631582)
2009-05-30 18:02:40 Slp: Prompting user if they want to retry this action

The text you're looking for is the directory path listed after the text "Attempting to normalize directory path".
Open up another explorer window and navigate to (not inside) the directory that is specified after the previous quote. Right click the directory (in this case, the directory is COM within the directory 100) and select "Properties". From within the Properties window, click the "Security" tab. Windows should give you an error that says something along the lines of the permissions being out of order and might not be effective (sorry...I forgot to copy that error).

Please note right now that this is done in Windows Server 2008 and the specified buttons/tabs to click won't be the same in Server 2003 from this point.

Click "Edit" near the middle of the window. Windows should then throw up another dialog box saying that the permissions are out of order and need to be fixed. Click "Okay" and Windows will automatically fix the problem for you. Just click "Okay" in the window that comes up. Click "Okay" in the "Security" window to close it out as well.
Go back to your installer now and click "Retry" on the error window.

I had to fix two directories. The guy in the Microsoft feedback article said he had to fix five directories. That being said, this may need to be done more than once.

That about sums this up. The article I found that helped me get started fixing this can be found here:


Aaron Ball

Tuesday, May 26, 2009

Hyper-V and Vista

Hello again all,

Today I built out 8 more servers for our dev team. We have a blade server hosting all of this with Hyper-V. Here's what my picture looks like...
I log into my Vista work machine, use terminal services to log into the blade and open up Hyper-V Manager. From there I connect to the machine via Hypervisor console.
Essentially, I have a remote window inside of a remote window. Naturally, mouse and keyboard key sends are at less-than-desireable speeds. My hopeful solution: Hyper-V management console on Vista.

Over the last year or so I have been hearing talks about how one could not install Hypervisor on Vista so naturally my hopes were already somewhat crushed. Despite the dire situation, I started the search (thanks Google) and much to my suprise, with Vista SP1 Microsoft released a patch (KB952627) to install the Hyper-V Console through Windows Update (thank you Microsoft).

Here are the links (Windows authenticity check required)

Vista x64


Once the management console is installed, you should be able to remotely connect to your server with Hyper-V.
Once again, thank you Microsoft for a very satisfying product.

Regards,
Aaron

Friday, May 22, 2009

Sysprepping Server 2008

Hello all,

This my first post on this blog (if it wasn't obvious enough), but I'm going to spare you all the boring 'welcome to the blog' and get down to business before I forget what I am blogging about here.

I do need to mention a few things before getting started though

My name is Aaron Ball and I work at the College of Business at Colorado State University, specifically on their web development team. I program for SharePoint but also enjoy building and maintaining servers. My current project is to build and maintain ten virtual (Hyper-V) Server 2008 development servers for the team. Each team member needs a semi-isolated development environment with a unique SharePoint instance so if their tests crash it, it does not affect any other people.

Alright, now that that's out of the way, here's the good stuff...

Now, continuing along the same lines as the subject of this post, I have been researching the unattend.xml file for sysprepping a system for the last week in an effort to find a template I could fill out for our latest Server '08 builds. A guy from another section of our IT department has a sysprep file from Windows XP, which apparently doesn't work for Server 2008 (well...it was worth a try though).

All week I have been Googling things like 'create unattend.xml', 'generate unattend.xml', 'sysprep unattend.xml', 'sysprep unattend file', and various other searches that escape me now. Today I thought I'd try sysprep.xml because I recalled seeing that somewhere. Low and behold, I discovered (as the first search result), the exact website I needed. It has a template sysprep.xml file that was actually designed for my exact circumstance (incredible, yes?).

Here's the link:

To use the sysprep.xml file, I have a batch file I created that runs the command...
C:\Windows\System32\sysprep\sysprep.exe /oobe /generalize /shutdown /unattend:C:\ProgramData\sysprep\sysprep.xml

/generalize
removes all unique identifiers of the machine.
/shutdown
specifies that the machine shutdown after the sysprep process rather than restarting
/unattend:
specifies the sysprep.xml file to use to guide the machine when it goes through the setup process after reboot.


Many thanks Brian. You brought my seemingly endless search for a sysprep template file to an end.

To end on an even more positive note, after sysprepping the server build, I did not have to respond to a single prompt with the exception of logging in as Administrator. It did everything for me.


Regards,
Aaron Ball