As a developer in Microsoft technologies, I often have to setup a Virtual PC ("VPC") with a Windows Server and the software used for a project. Technology requirements vary from WSS 3.0, SharePoint, or to some other third party LMS system like IntraLearn's LearningServer.  Sometimes you just need a Windows Server to emulate a production environment.  The software development environment might be limited to Visual Studio 2005 Web Application Projects.  Or the toolset might require Visual Studio 2008. This blog entry is about one such project.

Recently, about a week ago, I was given the task of re-skinning a live site to use WSS 3.0 SP1. It should have taken a day at most to setup the VPC with a development environment. I've been on a non-SharePoint project for a while so it took a while to get re-oriented and setup took a lot longer than it should have.  The following is a set of instructions on how to setup a dev environment from scratch.

So, to get started, install Microsoft Virtual PC 2007. You can get that here (or search Google): http://www.microsoft.com/windows/downloads/virtualpc/default.mspx. The software is free.  The two most helpful recommendations for VPC settings are to set the RAM to about half of that available on the host machine and to put the virtual hard drive and other VPC files on a drive rated at 5400rpm or higher.

Install Windows Server 2003 SP2 with a default admin account and password.  Don't join a domain yet.  Use only one network adapter in Network Settings of the VPC at this point. The main purpose for that is to have internet access.  So use the network card on the host computer. In addition to Windows Updates, here is a list of other software to install:

• IE7
• IE7 Developer Toolbar
• Firefox
• Firebug AddIn for Firefox
• WSS 3.0 - Advancaed Install type with single server choice
• WSS 3.0 SP1
• Desktop shortcut to the WSS "12" folder: "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12"
• Add the following path to the path system variable in Windows system properties: “C:\Program Files\Common Files\Microsoft Shared\Web
• Server Extensions\12\BIN”
• Desktop shortcut to “C:\Inetpub\wwwroot\wss\VirtualDirectories\”
• Consolas Font Pack - just because I like the font
• Sharepoint Manager 2007
• U2U CAML Query Builder v3
• Windows 2003 Open Command Prompt Extension
• Lutz Roeder's Reflector
• Microsoft .Net Framework 3.5 - 2.0 and 3.0 should be installed from Windows Update

Now that all the basic software is installed, it is time to optimize the VPC. Following is a list of steps that should optimize the VPC (source: http://www.sharepointforum.com/en-US/Wiki/Optimize%20developer%20VPC.aspx).

Stop unnecessary services....
• Select Start > Administrative Tools > Services
• In the right pane of the Services window, locate and right-click on the Error Reporting service, then select Properties
• Under the General tab of the Error Reporting Service Properties dialog box, in the Service status section, click the Stop button
• For Startup type, select Disabled from the drop-down list, then click the OK button
• Repeat these steps to stop and disable the Help & Support service and the Print Spooler service.

Disable visual enhancements....
• Select Start > Control Panel > Display
• Under the Settings tab of the Display Properties dialog box, click the Advanced button
• Under the Troubleshoot tab of the Default Monitor dialog box, move the Hardware acceleration slider all the way to the left, then click the OK button
• Under the Desktop tab of the Display Properties dialog box, select (None) from the Background list, then click the Apply button
• Under the Screen Saver tab of the Display Properties dialog box, select (None) from the Screen saver drop-down list, then click the OK button
• Select Start > Control Panel > System
• Under the Advanced tab of the System Properties dialog box, under the Performance heading, click the Settings button
• Under the Visual Effects tab of the Performance Options dialog box, select the Adjust for best performance option, then click the OK button

Disable system recovery features....
• Select Start > Control Panel > System
• Under the Advanced tab of the System Properties dialog box, under the Startup and Recovery heading, click the Settings button
• In the Startup and Recovery dialog box, select (none) from the Write debugging information drop-down list, then click the OK button

Disable Remote Desktop connections....
• Select Start > Control Panel > System
• Under the Remote tab of the System Properties dialog box, in the Remote Assistance section, deselect the Turn on Remote Assistance and allow invitations to be sent from this computer checkbox, and in the Remote Desktop section, deselect the Enable Remote Desktop on this computer checkbox, then click the OK button

Disable searching for network drives and printers....
• Launch Windows Explorer, then select Tools > Folder Options
• Under the View tab of the Folder Options dialog box, in the Advanced settings list, deselect the Automatically search for network folders and printers checkbox, then click the Apply to All Folders button
• In the Folder Views alert box, click the Yes button
• Click the OK button to accept the changes and close the Folder Options dialog box

Defragment the virtual machine C: drive....
• Select Start > All Programs > Accessories > System Tools > Disk Defragmenter
• Ensure that the C: drive is selected in the upper pane of the Disk Defragmenter window, then click the Defragment button. Repeat the defragmenting process until it happens quickly (this may take several cycles).

Compact the Virtual Hard Disk....
• In the Virtual PC window, select CD > Capture ISO Image
• In the Select CD Image to Capture dialog box, browse through your local hard drive to locate the Virtual Disk Precompactor.iso file, then click the Open button
• C:\Program Files\Microsoft Virtual PC\Virtual Machine Additions\Virtual Disk Precompactor.iso
• When the Microsoft Virtual Disk Pre-Compactor alert is displayed, click the Yes button
• When the process is complete, the Pre-Compaction Completed message will be displayed; click the OK button
• Select Start > Shut Down to shut down the virtual machine, then return to the Virtual PC Console and select File > Virtual Disk Wizard
• In the Welcome to the Virtual Disk Wizard dialog box, click the Next button
• In the Disk Options dialog box, select the Edit an existing virtual disk option, then click the Next button
• In the Virtual Disk to Edit dialog box, browse for the VHD (Virtual Hard Disk) file which contains your virtual machine, then click the Next button
• In the Virtual Disk Information and Options dialog box, select the Compact it option, then click the Next button
• In the Virtual Hard Disk Compaction dialog box, select the Replace the original file option, then click the Next button
• In the Completing the Virtual Disk Wizard dialog box, click the Finish button
• When the compaction process is complete, a success message will be displayed; click the Close button to acknowledge the message

Now, it's time to shut down the VPC and get the networking setup. There are several blog sites which talked about optimal settings for networking in addition to other setup tips.  The following are in my opinion some good blogs on that subject:

http://blog.devstone.com/aaron/archive/2005/05/03/577.aspx
http://blogs.msdn.com/smguest/archive/2005/02/10/370861.aspx
http://weblogs.asp.net/erobillard/archive/2007/02/23/build-a-sharepoint-development-machine.aspx

Here is a summary of what to do:

• Create a Microsoft Loopback Adapter on the host machine. This creates a private LAN between the host and the server. 
      o Click Start, Control Panel, and open the Add Hardware wizard. 
      o Click Next. Wait a moment while the wizard scans for hardware. 
      o Select: Yes, I have already connected the hardware, click Next. 
      o Scroll to the bottom of the list and select Add a new hardware device. Click Next. 
      o Select: Install the hardware that I manually select from a list (Advanced). Click Next. 
      o Select: Network adapters. Select: Microsoft. Select: Microsoft Loopback Adapter. 
      o Click Next. Click Next again. Wait a moment. Click Finish.
• Configure the Loopback Adapter on the host machine. 
      o Click Start, Control Panel, and open the Network Connections utility. 
      o Right-click the Microsoft Loopback Adapter connection and select Properties. 
      o Double-click Internet Protocol (TCP/IP). 
      o Now configure an address for this adapter. Use an IP address that is not in use on the network. There will be one setup here that the VPC will point to later (via hosts file entry). 
         - IP Address: 10.50.50.1 
         - Subnet mask: 255.255.255.0 
         - Default gateway: 
               • You can ignore DNS. Click OK. Click OK again.
• Shut down the VPC
• Go into Network Settings via Virtual PC Console
• Set the number of network adapters to 2
• Select the host NIC card as the first one
• Select the Microsoft Loopback Adapter as the second one
• Start the VPC
• Go to network settings on the VPC
• Select Local Connection 2 Properties
• Double-click Internet Protocol (TCP/IP). 
      o Now configure an address for this adapter. Use an ip address that is not in use on the network. Notice that the IP address is incremented by 1 away from that used on the host machine. The subnet masks must match between host and VPC. 
         - IP Address: 10.50.50.2 
         - Subnet mask: 255.255.255.0 
         - Default gateway: 
               • You can ignore DNS. Click OK. Click OK again.
• Go into the hosts file on the VPC
• Add an entry like this, replace the curly bracket text with real text: 10.50.50.1 {host computer name}
• Save the hosts file
• Shut down the VPC
• Go into the hosts file on the host computer
• Add an entry like this: 10.50.50.2 {VPC computer name}
• Save the hosts file
• Restart the VPC. It should see the network that the host computer is on.
• Click Start, Control Panel, System, and click on the Computer Name tab
• Click Change
• Select the Domain radio button and enter the name of the host computer's domain.
• Click OK and restart if prompted
• Now add your domain login to the Administrator's Group on the VPC (after any restart) 
      o Click Start, Administrative Tools, Computer Management, and select Local Users and Groups 
      o Find the Administrator group in Groups and add your domain user to this group 
      o The Find Now should be able to find your username and Locations should now be able to list the host domain.

That's it! That is all there is to it (mostly)! I will probably edit, refine, and expand this document to include MOSS installation and/or server farm installs. But that is it for now.

I'm up in Seattle visiting friends and having a mini-vacation with my wife. This city is huge, compared to Portland. I don't get up here enough. What a great vacation from the laid back, rains all the time, town rolls up at 9:00pm, what is with this inelastic Oregon economy anyway(?), kind of daily life. Seattle rocks!

So, while my wife was out with the girls, I went over to Dimitriou's Jazz Alley to see my favorite sax player, David Sanborn. What a huge treat! I missed him in Portland a couple of weeks ago at a place called the Alladin. Let's just say, the Alladin typifies Portlandia while the Jazz Alley typifies Seattle. Really. No...really. These places are diametrically opposed as far as what the venues have to offer. Dimitriou's Jazz Alley has the restaurant style seating and drinks while the Alladin has a small auditorium seating venue where people go to focus on and enjoy the performance.

After this show, in Seattle, I kind of want to go back in time a week or so and see him at the Alladin. I mean, I wish I had seen him when he was in Portland. The manhattens at Jazz Alley were awesome. No question. Also, I had a perfect seat near the bar. Thank you to the waitress and people at Jazz Alley for letting me come to your place and enjoy a great seat. Anyway, I cannot say enough positive things about the musicality I heard tonight. There were literally no mistakes and it was a flawless performance. David jokes about his age but he is still playing like he's in his 30's to me. At his peak. I need to seriously look up the guitar player, bass player, drummer, and piano players in the band that goes on the road with him. They are the shit!!! They are uber-talented, I've seen them before, and every time I see those guys I just enjoy listening to their talent. His tour band lays it down for David with accuracy and a purely smokin' groove. I love David Sanborn for the way his music makes me just love life. The music builds and builds, makes you want to dance, and damn...I get it! Love his music.

Jazz Alley...well, they can continue to bring rich people in and support the arts in that manner. I just have to say, that looking around at the audience I just wanted to barf. So many people just were not moved at all. There were a few people, two or three, that I saw were gettin' it and lovin' it. But f!, I just don't see how a person can see/hear David Sanborn and not feel something! That guy is up there pouring his heart out into his music and doing great things with it and getting the audience involved with the whole band. They obviously do not know who he is and what his body of work consists of. What a monumental artist of our time! It just blows me away, Seattle, how your audience didn't get it. Seattle liked the songs that have been converted into "easy listening" and that get a lot of radio play. But the really good stuff that David played where he embellished and in part imitated his own recorded solos, that was the shit! That made me move to the groove and enjoy the moment in which he was playing. I mean, he played a song that he wrote for an ex girlfriend of what must have been a while ago. And he played it with the kind of soul that you would expect when someone loved and lost. Damn! That shit was good.

You know, there are people, good sax teachers, who have said and who believe that David plays too much in the altissimo range. I read a recent blog post from a sax man I respect for his generosity, talent, knowledge, and ability. But ya know, Mr. Sanborn is playing and he is touring and he is actively contributing to the jazz community in a way that inspires kids to play saxophone. We need all of that we can get in this day. In no way has David ruined sax players. Instead I think he is out there doing what he loves and in many ways is showing people how to do what they love in music and getting people inspired. Me, for one.

Thank you David for a fantastic performance. I look forward to your next CD release.  Wish I could take some sax lessons with you or just jam some time.  That would be fun.