Home > Development > Building my ultimate development computer (Part 2, Virtual Machines)

Building my ultimate development computer (Part 2, Virtual Machines)

July 6th, 2008 Scott Lilly

After using virtual machines for test and build servers, I knew that I’d want to use them for my personal development environment.  However, when I was planning things out, I changed my mind as to how I was going to use the VMs.

My first thought was to have one image for Visual Studio 2005, another for Visual studio 2008, another for my development SQL server, another for my build server, etc.  But I started to realize that I was going to need to be running several VMs simultaneously, just to work on one typical application.  Even with the CPU and RAM that I have, that might start straining my computer.  I also might end up needing to manage multiple versions of each image (e.g., a development SQL Server with no service pack installed, another with SP1 installed, another with SP2 installed).  That was going to get messier than I wanted.

So, I decided to create an image to hold my full development environment for each project.  That gives me the ability to move a complete development environment to offline storage, once I’m done with the project.  If the client comes back a year later and wants me to make some enhancements, I can bring the complete environment back to where it was when I last worked on it.

To do this, I created an image with my base operating system installed.  After running Windows Update until everything was updated, I saved that image as my base OS image.  Then, I cloned that to a base development image.  I installed all the software that I would need for a full development environment (editor, database, source control, etc.) on that image.  After running Windows Update on that image, I cloned that to another image that I would actually use for development.  That way, if I ever need to build up another VM, I can clone from the base and have a clean environment.  When building base images, keep in mind that things will be easier if you configure all your applications the way you want, then build your clones off of that image.  Download your favorite browser and set your home page to your normal home page.  Go into your editor and set your tab stops where you want.  You won’t want to do that each time you make a new VM.

Figure out the size RAM and hard disk you want for your virtual machines.  If they are all fairly close, use the maximum size as your standard VM configuration.  If they are significantly different, you may want to create a few different base images.  If you are using Windows as your operating system, significant changes in machine configuration may cause Windows to think it is installed on another computer, and expect another license key.  I went with 2 gigs of RAM and a 100 gig hard disk.  Even though I set up the hard disk as 100 gigs, they image sizes are currently only taking up from five to seventeen gigs of actual space.

When installing software from an ISO, set up the ISO image as a CD-ROM drive.  If you have trouble running the install from the virtual CD (as I did for a few programs), copy the files over to the VM’s ‘local drive’ and run the setup application from there.

A couple of things I’m not fully happy about, but haven’t figured out how I want to handle them yet, are having my source control and continuous integration on each development VM.  Ideally, I’d like to have all the source control in one place, so I can share code between applications easier.  I can also see that there may potentially be problems with running my CI build on my development VM.  If it starts to cause problems, I’ll post what is happening and how I get around it.

I also created a couple of other VMs, one for all my office functions (e-mail, word processor, spreadsheet, etc.), and one for web browsing.  Doing my browsing on one VM limits the amount of damaged that could be caused by spyware or the latest browser exploit.  If something starts to get strange, just make sure my bookmarks are stored somewhere and rebuild my image.

Categories: Development Tags:
  1. No comments yet.
Comments are closed.