次の方法で共有


Getting on the virtualization bandwagon

Lately I've been trying to support work happening in a variety of our development branches, and that's been challenging to the two machine setup I mentioned here.  Visual Studio (unfortunately) takes a long time to install and uninstall.  Also during our development cycle uninstall is sometimes broken.  That means that people often re-image (at least) their test machines whenever they need to install a new build of Visual Studio.

In order to do work in three different branches somewhat simultaneously, I need to have test machines that have those three different branches installed.  It wasn't reasonable to re-image and re-install my single test machine every time I needed to switch branches.  It's also not very cost effective for me to have 3 test machines where two of them spend the vast majority of their time idle, not to mention that this doesn't scale well if one day I need a 4th branch.

So last week, I jumped on the virtualization bandwagon.  I flattened my best machine, installed windows server 2008 64-bit*, and started using virtual machines for my test machines.  So far it's been working out very well for me, but I do have to give credit to some other people.  A few people in our test group have written some automation around Virtual Server to make life easy for people wanting to use virtual machines.  They have some software that manages creating VMs for you.  It basically does the following steps:

  1. Pull an image of a selected OS from the network, and cache it locally.
  2. Create a VM
  3. Install the OS
  4. Add it to the corporate network domain
  5. Install the latest set of Windows Updates
  6. Add my domain account to the Administrators group.
  7. Optionally run a custom script to install more software.

For step 7, this group has provided stock scripts for installing various versions of Visual Studio, and one to install the latest build from a selected branch.  It's really convenient, since steps 2 to 6 only take about 25 minutes (and step 1 is usually skipped because the image is in the usually in your local cache).

They also have an option to have the VM be destroyed and re-created every night, which means that you can come in to work in the morning and have a fresh test machine with the latest build on it.

So, I started out need to have 3 test machines in 3 different branches, but the system is so easy to use that I've already built up a larger set than that.  My current list of virtual machines is:

  1. VS2008 without SP1
  2. VS2008 with SP1.
  3. A debug build of VS from each of the 3 branches I mentioned above.
  4. A release build of VS from the branch I normally work in for performance testing (I don't need absolute numbers, just finding the hotspots).

My only wish is that they update it to take advantage of Hyper-V soon to improve performance of the hosted machines.

 

* I previously had Vista 32-bit on the machine because at the time I set it up Server 2008 wasn't released yet, and there was a bug in the interim builds of visual studio that made install fail on 64-bit machines.

Comments

  • Anonymous
    August 15, 2008
    PingBack from http://www.easycoded.com/getting-on-the-virtualization-bandwagon

  • Anonymous
    September 14, 2008
    I just saw this article & thought of your blog post: http://www.andrewconnell.com/blog/articles/UseVirtualPCsDifferencingDisksToYourAdvantage.aspx Specifically, thinking about the value of multiple layers of differencing disks.  They are a way to checkpoint key steps in configuring your machine. I suppose that you can accomplish the same thing with Windows Home Server, making a persistent backup of each step.  (Ooh, and you can run your WHS inside a VM!)

  • Anonymous
    September 20, 2008
    You told me you wanted better performance for your development environment than you were seeing in a virtual machine. Have you taken a look at Hyper-V?  My understanding is that, given compatible hardware, a VM can be one step closer to the actual hardware, giving it a perf boost.  

  • Anonymous
    September 22, 2008
    I haven't personally taken a look at Hyper-V, but one of my colleagues said that while it was better, it still wasn't fast enough when building code.  I'll give it another shot once the rest of the VM software I use supports it.

  • Anonymous
    October 27, 2008
    Just a quick update.  After my previous post, I actually stopped using virtualization for most cases,