Month: July 2007

Tools list

If you’re setting up a new machine then there are certain applications you are always going to install and these are then your essential tools. As I’ve just had to add a differencing disk to a virtual machine I’ve had a chance to consider my own set of indispensable utilities.

Assuming I’m developing with Visual Studio 2005 and Sql Server 2005 :

NAnt is good but MSBuild is easier as it can handle a VS.NET 2005 solution file.
NUnit is just what I know and what I’ve been using for the last couple of years.
FxCop is something I rarely use as I have Resharper but it is worth adding in.
Lutz’s Reflector (and Addins) are gold.
Subversion because I loathe VSS and TeamExplorer isn’t much better.
Tortoise as it’s just so clean and easy to use. Ankh is pretty good for VS.NET integration but it’s easier to make a mistake and it’s not quite so clean.
CruiseControl.Net even if it’s just a solo coding project. I don’t need to worry about breaking the build anymore.
TestDriven.NET makes it way easy to launch unit tests.
NCoverExplorer comes with TestDriven.NET now.
MSDN I install as you never know when you’re going to be offline (and anyway, it’s faster to look something up if it’s right there).
SharpDevelop is wonderful even if you are developing in VS.NET as it just loads so quickly and neatly. I check any code I publish will work nicely with this.

Watir/WatirMaker make it easy to generate web page tests. MVC/MVP will only get you so far in your automated testing.
MyGeneration rather than CodeSmith as it’s free and there are plenty of decent templates, too.
vsnet2005cmdhere says a cut-and-paste at the command prompt to get to where you need to be.

Dreamweaver works and VS.NET doesn’t when it comes to doing proper web page markup.
XMLSpy if you have to do any XML work. MapForce is excellent as well if you need to do XSLT.

Mono as it’s nice to try and produce something that’s cross-platform.

Technorati Tags: , , ,

VM setup for Virtual Server

I have some notes I made on setting up Virtual Machines to run under Virtual PC 2007 and as I’ve moved over to using Virtual Server 2005 RC2 and Remote Desktop I thought I’d write them up for Virtual Server. I’m installing XP VMs into a Virtual Server on Vista Business. YMMV.

Here are some general points about creating a tidy VM that you can then use as the parent for a differencing disk.

  • The default is a 16GB NTFS partition. Fixed disk sizes would be a problem as I create a hierarchy of differencing disks. Adding more disks is fine but it’s a pain to manage (other than perhaps a ‘Data’ disk that can be attached to any VM – pretty handy). The supposed performance gains aren’t documented. I’d set my base disk to be a 32768MB dynamically expanding disk in most cases.
  • Enable NTFS file compression on dynamically expanding disks. Right-click on the .vhd > Properties > General > Advanced > Compress contents to save disk space.

After doing the base install of the OS you’ll want to set up a few essentials:

  • Turn on Microsoft Update.
  • Install Sysinternals Contig on the host machine and create a scheduled task (Control Panel > Scheduled Tasks in XP or Administrative Tools > Task Scheduler in Vista) to defrag the .vhd every day.
  • Set up a task inside the VM to regularly defrag the virtual hard disk. This apparently makes a difference.
  • Exclude VMs from antivirus scans. I’ve installed AVG Free Edition Anti-Virus and it seems to ignore the .vhd files in real time scans. You should still install antivirus and firewall apps into the VMs of course.
  • Turn off the VM’s bleep:

    net stop beep
    sc config beep start= disabled

  • Disabling GUI effects is likely to be a small performance gain and anyway can be managed through your Remote Desktop configuration.
  • This one is only relevant to a Server 2003 install. Turn off the Shutdown Event Tracker (annoyance) through the Group Policy Object Editor Console:

    $> gpedit.msc

    Computer Configuration > Administration Templates > System
    “Display Shutdown Event Tracker”

    $> gpupdate /force

  • Turn off screensavers, etc..
  • Empty the DLL cache

    sfc /cachesize=1
    sfc /purgecache

  • Create an empty paging file by doing the following. Configure no paging file, restart the VM, create a normal paging file.
  • Obviously, compact the virtual hard disk. Easily done through the Virtual Server Administration Website. The compact option is available only for dynamically expanding virtual hard disks. Note that you can’t compact a differencing disk. To create a smaller VM that you could cut to, for instance, a DVD then merge with the parent into a new file and do the compaction then.
  • Sysprep. If you’re going to have more than one copy of the VM on a network then you’ll need to sort out the MAC etc.. I tried to do this but it required the Server service to be bounced as it was complaining “there is an incompatibility between this tool and the current operating system”. Then it decided it wouldn’t do it for “computer that is a member of a network domain”. I don’t know enough AD admin to sort this out. So I’d resort to using Sysinternals NewSID if it’s required.

Also, and this is just for the sake of ease of use, you really want to go through the settings on apps like IE and set them up how you like them. I’d also recommend going through the Windows Components and uninstalling all the cruft (Games, MSN, Outlook Express, Windows Media Player, Windows Messenger etc.).

It’s up to you whether you want to install Office, VS.NET and SQL Server to this base install to make your dev machine or just Office or whether you want to kick off a differencing disk now. Another option is just to take a copy of the virtual hard disk in case you want to set up a different set of apps on a base install later. A final note; I seem to get along just fine with 1GB of RAM given over to each VM, 512MB for Server 2003.

Technorati Tags: , ,