Monday, August 20, 2007

Somehow I missed the announcement that SP1 was released for Virtual Server 2005 R2.  Given that I run nearly all my development (and some non-development) environments on R2, I'm surprised I didn't catch wind of SP1!

You can download SP1 here: http://www.microsoft.com/downloads/details.aspx?FamilyId=BC49C7C8-4840-4E67-8DC4-1E6E218ACCE4&displaylang=en.  It's interesting to note that Vista flavors are listed as supported host operating systems, yet include a "non-Production only" caveat.

I run Virtual Server 2005 R2 on Vista Business without any problems (well, if you know some tricks).  As I upgraded I noted the following:

  • When installing SP1, be sure to turn off the Virtual Server service, else you will receive the following warning:

warning 

  • It will detect the previous version and force you to upgrade:

image

  • I could be wrong, but I'm pretty sure that some of these options are new.  Sorry, I haven't had the time to research them - when I do, I promise I'll post my findings.

image

The upgrade seemed to go without a problem.  I was able to mount and start my virtual machines without any problems whatsoever.

Posted on 08/20/2007 # Comments [1] Trackback
 Sunday, August 19, 2007

Although it has its share of issues, I am a big fan of Visual Studio 2005 Team Foundation Server (known as TFS for short).  Often you'll see people only leverage it for a source code repository, but if that's all you are using it for then you are missing out.  In addition to storing source code, TFS also supports:

  • Code analysis
  • Build automation
  • Support for continuous integration
  • Automated testing
  • Reporting
  • Project tracking

I have found TFS to a very useful tool for all my custom development projects, especially Commerce Server 2007.  From a developer's perspective, I find that I am much more excited about cod analysis, build automation, continuous integration, and testing; the project tracking and management functions are great, but it's the developer tools that really tickle my fancy.  As such, I have included around 15 to 20 pages of content in my book Professional Commerce Server 2007 on how to successfully integrate Commerce Server 2007 and TFS.

To support my writing efforts, I needed to have a TFS environment available during the writing of these chapters.  I virtualize nearly all my non-production environments, and it was no different when I setup this server.

To save myself some time, I started with one of my base servers that had the following characteristics (it is extremely handy to have one of these servers archived):

  • Windows Server 2003 Standard R2 with Service Pack 2 (and all updates applied)
  • IIS installed and configured
  • .NET 2.0 installed with latest hotfixes
  • Visual Studio 2005 Team Developer installed w/ Service Pack 1
  • SQL Server 2005 Database Services with Service Pack 2

This gave me a huge head start in setting up my TFS environment.  For the rest, you should utilize the Visual Studio 2005 Team Foundation Installation Guide.  Below are some notes I took on what I did to finish the installation and configuration of TFS.

Install and Configure TFS

(Wow, for some reason Live Writer did an awful job with this list - the RSS feed is a mess!  Sorry!)

  1. Changed the computer name from "BaseServer to "TFServer." (reboot)
  2. Updated SQL Server to use the new computer name.  Ran the following script:

    sp_dropserver 'BaseServer'
    GO
    sp_addserver 'TFServer', local
    GO

  3. Deleted all the SQL Server remote logins that I didn't need.
  4. Restarted SQL Server 2005.  Don't forget to do this; otherwise, when you run SELECT @@SERVERNAME the old computer name will return.
  5. I think joined "TFServer" to my local domain. (reboot)
  6. You should use domain accounts to manage TFS.  I created the following domain accounts:

    • TFSSetup (make this account part of the local Administrators group on TFS)
    • TFSService
    • TFSReports

  7. Confirmed that IIS 6.0 has ASP.NET enabled, and also confirmed that FrontPage Server 2002 Extensions is not installed.
  8. TFS makes use of more than SQL Server 2005 Database Services.  I Installed the following additional SQL Server components:

    • Analysis Services
    • Reporting Services
    • Integration Services

  9. Shutdown the Analysis, Reporting, and Integration services.
  10. Installed Service Pack 2 for SQL Server 2005 to upgrade additional components.  The Database Services had already been upgraded, so I didn't have to touch it.
  11. Installed Hotfix for Microsoft .NET Framework 2.0 (KB913393) - this is avail on the TFS CD.
  12. Installed Windows SharePoint Services 2.0 with Service Pack 2
  13. I decided to reboot the machine; all the services I previously stopped are turned back on, and then I can login as <domain>\TFSSetup.
  14. Configured Reporting Services:

    image_thumb[6]

    • Click Start -> Microsoft SQL Server 2005 -> Configuration Tools -> Reporting Services Configuration.
    • Do the following:
      • Create a Report Server Virtual Directory
      • Create a Report Manager Virtual Directory
      • Apply the Web Service Identity
      • Configure the Database Setup
    • I left the remaining steps alone.

  15. Installed TFS.

    • Selected a Single-Server Installation.
    • Pass the System Health Check .
    • Used <domain>\TFSService to run TFS.
    • Used <domain>\TFSReports to run Reporting.
    • Enabled Team Foundation Alerts:
      • Configured local server.
      • Setup from e-mail address.

  16. Backed-up the Reporting Services Encryption key:

    image

    • Ran the Reporting Services Configuration Tool
    • Clicked Encryption Keys, and then Backup.

  17. I then browsed to the following URL: http://localhost:8080/services/v1.0/Registration.asmx

    • Clicked GetRegistrationEntries and then clicked Invoke.
    • Ensured that the type was "VSTF" within the XML output.

  18. Installed Team Explorer (on the TFS CD).
  19. Installed Visual Studio Team Foundation Service Quiescence GDR:
  20. Installed Visual Studio 2005 Team Foundation Server Service Pack 1.
  21. Installed Team Foundation Build.

    • Opened the "build" folder on the TFS CD.
    • Ran Setup.exe.
    • Used <domain>\TFSSERVICE as the service account.

  22. Ran Visual Studio 2005 Team Foundation Server Service Pack 1 again to update Team Foundation Build.
  23. One final reboot.

Now, to verify that everything was installed and configured properly, I performed confirmed that I was able to create a new Team Project.

Create a Team Project in TFS

  1. Open up Visual Studio 2005
  2. Click View -> Team Explorer
  3. Click Add Existing Team Project

    image

  4. Select your Team Foundation Server, and click OK.

    image

  5. Right-click your Team Foundation Server, and click New Team Project.

    image

  6. Follow the wizard and create a new Team Project.

All together, this process took around 3 hours.  Granted, this would have taken a lot longer if I hadn't already had a virtual machine that was mostly configured.

I hope this helps!

Posted on 08/20/2007 # Comments [0] Trackback
 Tuesday, March 06, 2007

Since I use virtual machines (VMs) for development, I often find myself having to turn off the beep service on my VMs, or risk the rather of my neighbors.  There are a couple of ways to do this:

1. Stop the beep on/off for the particular session.  Obviously, the problem with this is that once you restart your machine, the beep service will restart.  Nevertheless, you can type the the following at the command line:

net stop beep

and ...

net start beep

2. Turn off the beep service.  This will turn it off even after it is rebooted (make sure you get the spacing exact -- it actually matters!):

sc config beep start= disabled

Note: I think that if you turn off the beep service it won't take effect until after a reboot.  Consequently, I recommend doing using the net stop beep after you turn off the service.

I believe that you can also accomplish this by modifying the registry, but I've never had to do that (these methods always work), so you'll have to look elsewhere to find out more.

Best of luck!

Posted on 03/06/2007 # Comments [0] Trackback
 Monday, March 05, 2007

Many applications require (or should have) direct access to the Windows Console, rather than a session on the the Windows Server.  I encounter these kind of problems often, as I do all my development on virtual machines (running on Virtual Server 2005 R2) and use Remote Desktop to connect.

In order to accomplish this, call the Remote Desktop application with the following command:

mstsc /console

This will attach the Remote Desktop application directly to the system console, preventing any issues that can result from attaching to a session.

If you use a short-cut to connect to Remote Desktop, rather than the command line, just choose the short-cut's link, and add "/console" to the target.

Best of luck!

Posted on 03/06/2007 # Comments [0] Trackback
 Friday, March 02, 2007

I came across a great blog entry today that provided the following script.  This script will setup IIS with the proper configuration to allow Virtual Server 2005 R2 to function.  Just run this in the command line (or create a batch file) before installing Virtual Server.

start /w pkgmgr /l:log.etw /iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures;IIS-StaticContent;IIS-DefaultDocument;IIS-DirectoryBrowsing;IIS-HttpErrors;IIS-HttpRedirect;IIS-ApplicationDevelopment;IIS-ASPNET;IIS-NetFxExtensibility;IIS-ASP;IIS-CGI;IIS-ISAPIExtensions;IIS-ISAPIFilter;IIS-ServerSideIncludes;IIS-HealthAndDiagnostics;IIS-HttpLogging;IIS-LoggingLibraries;IIS-RequestMonitor;IIS-HttpTracing;IIS-CustomLogging;IIS-ODBCLogging;IIS-Security;IIS-BasicAuthentication;IIS-WindowsAuthentication;IIS-DigestAuthentication;IIS-ClientCertificateMappingAuthentication;IIS-IISCertificateMappingAuthentication;IIS-URLAuthorization;IIS-RequestFiltering;IIS-IPSecurity;IIS-Performance;IIS-HttpCompressionStatic;IIS-HttpCompressionDynamic;IIS-WebServerManagementTools;IIS-ManagementConsole;IIS-ManagementScriptingTools;IIS-ManagementService;IIS-IIS6ManagementCompatibility;IIS-Metabase;IIS-WMICompatibility;IIS-LegacyScripts;IIS-LegacySnapIn;IIS-FTPPublishingService;IIS-FTPServer;IIS-FTPManagement;WAS-WindowsActivationService;WAS-ProcessModel;WAS-NetFxEnvironment;WAS-ConfigurationAPI

Note: this will pretty much install everything under IIS.  I recommend that you either go through and remove some of the above settings, or go in afterwards and do so.

Additionally, make sure that when you run the installer, select "Run as Administrator".

Thanks to Grant Holliday for the tip!

[Updated 06/21/07]

A good friend and former colleague of mine, Rich Finn, had a little trouble getting this to work based on my steps above (I'll have to review them again).  After he finally got the configuration correct, he sent me the following screen shot.  I hope this helps someone!

 

Posted on 03/03/2007 # Comments [0] Trackback
 Thursday, November 30, 2006

I recently had to configure a virtual machine on Virtual Server 2005 R2 for Commerce Server 2007.  While setting it up, I only had access to the Internet via my wireless adapter.  Consequently, I had to do the following in order to get the virtual machine to connect to the Internet:

  1. Install the Virtual Machine Additions.
  2. On the host machine, go to "Add Hardware" in Control Panel.  Click next, wait for it to search for hardware, then select "Yes" on the screen that follows.  Scroll all the way down to the bottom of the "Installed Hardware" list and select "Add a new hardware device".  Choose "Install the hardware that I manually select from a list (Advanced)".  Choose "Network adapters" on the screen that follows.
  3. Now you're presented with a list of network card manufacturers and network adapters.  Choose "Microsoft" as the manufacturer and choose "Microsoft Loopback Adapter" as the network card.  Click next and complete the wizard.
  4. You should now see an additional network connection in the Network Connections control panel.  It will be called something to the effect of "Local Area Connection 2", but you can determine which adapter is the one you just added either using the ToolTip or the details view (it should show up as Microsoft Loopback Adapter).
  5. Now you need to share your internet connection with the network adapter you just added.  Right click your real network card and click Properties.  Go to the Advanced tab and check "Allow other network users to connect through this computer's internet connection".  Choose your Loopback Adapter in the dropdown list, if applicable. Then click OK.
  6. Make sure your virtual machine is shutdown.
  7. Create a new "Virtual Network".  Choose your Loopback Adapter.  Rename the virtual network to "Loopback Adapter".
  8. Change the "Network adapters" for your virtual server, and select the new "Loopback Adapter".
  9. Click OK and start the virtual machine up.  You shouldn't have to do any work inside the virtual machine, so just wait for a while (it may take a while for it to get a connection).

You should now be able to connect to the internet!

Posted on 11/30/2006 # Comments [0] Trackback