Dev Helper 2: The Windows XP box

Posted by on Aug 9, 2010 in Career, Development, Lessons | No Comments

There are at least two main reasons I need a Windows XP guest to run in VirtualBox on my Desktop.

  1. If I’m running Linux, sometimes I need to run Windows software, like a MS-SQL server or Visual Studio to complete my work on a specific target that only works on Windows
  2. As Web development is one of my primary jobs, many times I need to test older versions of Internet Explorer, or even combinations of older versions of FireFox to insure cross-browser support.

Both of these can be handled in one easy Windows XP install.   Some might ask me, where do I get a Windows XP install, my install disks are old and worn out, or I’ve run out of licenses at home.  The answer here is actually that there’s rarely an easy fix, unless your workplace or you’ve kept a Windows XP license aside just for this occasion.  I purchased a license for XP nearly a decade ago, at retail prices when it came out.  This license still works, and I’m able to find install media for it through my MSDN license.  My MSDN also comes with licenses for installing test and/or development machines.  I use these sparingly as the licensing for these seems to be anathema to VirtualBox and virtual computing.

I create a new VirtualBox instance, install XP with my install media, license the machine, and then decide if I’m going to accept the windows updates based upon the testing I intend to do.  I sometimes take a snapshot of this install for a backup.  Be careful here to make certain you run only one valid license of Windows XP at a time.  There’s no reason to run afoul of your license agreement over this one, and as long as you load only one instance of your saved session at a time, you should be in good shape.  Once upon a time I’d keep saved instances at service pack 1, 2, and 3, but I urge you to stick to just 1 and 3.  It will save vital storage space and speed load times when you do need to test.  I do however, load a SQL Server 2000 and a SQL Server 2005 image and save them aside for work, moving forward.

Because I’m a strict conservationist on hard drive space, all of my Windows XP licenses use 4 GB hard drives and I vary RAM between 512 and 1024 MB.  While a GB of RAM can be helpful, and more can be better, XP was optimized in these ranges, starting out needing only 128 in the early days and then ballooning in size as things moved along.  Because I’m prone to have both a Linux guest and an XP guest running at the same time, along side other work, I prefer to keep this as small as possible.

There are a few programs I prefer to have on all of my WindowsXP machines.

  • 7-Zip: A universal and open source file compression utility, with both a command line and GUI client
  • FileZilla: A fairly robust GUI FTP manager.  Very nice, especially when I need to pass large files to the outside world.
  • Notepad++: A Gui text editor for when VIM just isn’t going to serve your purposes.
  • VIM:  A text editor recognizable to anyone whose been in Computer Science for the last two decades.  VIM works because Typing and the Keyboard are the most effective means short of plugging your brain into your computer, to get data in and/or out.  The Mouse is a wasteful, nearly brainless device that has enslaved you.  Repent your evil ways and embrace VIM.
  • SQL Server Management Studio:  This comes with a few strings attached with the developer documentation at MSDN.  There are a variety of ways to access this on the cheap or even free legally, but the best is if you have a legal SQL server, you have licenses to this development studio.  Use them wisely.
  • putty and the other putty tools(especially pscp):  Putty is a terminal access program for ssh, telnet and rsh.  The other tools assist in generating RSA keys, in moving files securely to servers via command line and a host of other little tools and tricks you just need to get through the day.
  • Cygwin:   I personally have a variety of tools I’ve helped compiled or have been compiled for me that make Cygwin a bit on the bulky and unwieldy side, but that package and the nonsense I have to go through to make it work are too troublesome for your average worker, and too long for this current article.  Cygwin helps the linux user bring to bear the many commands he/she already uses on a regular basis.  Cygwin works by giving you a Cygwin enabled terminal that you can run your commands within.

Now that I have my tools, I add my shared folders.  Exactly like my linux setup, I use the Work, Deploy, Longterm folders, mounted for share to my Windows Box.

An example work flow might be, I start a SQL server on my Windows Box, load a test DB, and then start my Jetty server on my linux shell that uses a JDBC connection pointed at my Windows Guest.  I do my primary development, testing with Chrome and Firefox(latest) on my main machine, and then test against IE 6 and an older Firefox on my WindowsXP slice.

Another example, I need to work on a Visual Studio C++ project on my Windows slice.  I check the code out to a work sub-folder, that’s effectively hosted on my main machine.  I complete coding and testing, and transfer the app and installer to my Deploy folder as part of my install.   I open a command prompt and pscp the finished file up to the QA server for testing, and then alt-tab over to Visual Source Safe or a simialr product, and commit my code.

All simple processes aided by a secondary host living resident on my machine.

Leave a Reply