Geeks With Blogs
Joel Ross

A reader recently (well, recently when I first starting writing this!) asked me to expound upon how I use Virtual PC for development, and I'm more than happy to do so.

I made the switch to Virtual PC for development early last year, so I've worked through quite a few of the issues I ran into, and I'll talk about those, as well as highlight some of the issues that I'm still struggling with, and how I've been able to work around them so far.

The first thing I did was build a base image that had everything on it that I thought I would need. I installed things such as Office, Visual Studio, and MSDN documentation. I used Windows 2003 for a variety of reasons, but the fact that it supports multiple websites and is the environment that I deploy most of the projects I work on were the main factors in my decision.

I didn't start out using Virtual PC. I started doing all development on my laptop, mixing and mashing client environments and hoping there were no conflicts. Well, there were, and that's what led me to Virtual PC in the first place. I say this because that's how I got a list of the software I wanted on my virtual drives. I made a list of all software I had on my machine, went through and eliminated the software I didn't need (another downfall of doing it all on one machine!), and divided it up. I had three lists: Base machine, virtual disk, or both.

So I made one virtual disk with all of the software on it I wanted and configured everything like I wanted - things such as font colors in Visual Studio (I like my strings to be in red, my XML opposite of what is default, etc.), my shortcuts, including setting up TaskSwitchXP and SlickRun with the settings I want. Then I install the latest patches.

After everything was configured like I wanted, I shut it down, and made a copy of it. That copy is what I used for my first client development environment. I renamed it so that I didnt' have naming conflicts, and then I installed the software I needed for their environment (Source OffSite and a VPN client, for the first one I did) and then start using it. Anything I changed that was also on the base, I kept track of as a task to perform on my base image. Any software I started using that I couldn't live without went on a list to be installed on the base.

So what happens when I have a new client that I need a new VPC for? Well, I open up the base, apply any patches, and then work my way through the list I made while using the first VPC. Then I shut it down, and copy it. Then I go through the same process as above.

Why do I copy instead of using differencing disks? First, the patching is key to me. I want to be able to apply patches to my base and not have to do it to every image I base off of that. I know I could have multiple layers of differencing disks, but that just seemsĀ problematic for me to maintain. I'd rather patch and copy, and be ready to go. I don't really use differencing disks at all - I've heard they can grow to be as big as regular disks over time, so I don't see the need. Also, I'm not doing this to test environments, I'm doing it to have isolated environments. Therefore, there's no need for me to use them.

If I was using VMWare on a regular basis, I would go through the same process, except at the end, I'd convert it to a VMWare disk and use it that way. Why start in VPC? Because I can easily convert to VMWare if I need to, but I can't go back the other way.

If you're using VPC or VMWare, what do you do differently, and why?

Technorati Tags: | |

Posted on Thursday, March 2, 2006 9:37 PM | Back to top

Comments on this post: How I Use Virtual PC (or VMWare) For Development

# re: How I Use Virtual PC (or VMWare) For Development
Requesting Gravatar...
How is the preformance of the Virtual Machines? What are the specs of your laptop?

I attempted to use VirtualPC but to me those machines seemed very sluggish. I should probably try it again now that I have more RAM.
Left by JuanBarbatos on Mar 03, 2006 6:43 AM

# re: How I Use Virtual PC (or VMWare) For Development
Requesting Gravatar...
My laptop has a 1.4 or 1.6 GHz Pentium M processor (which runs like a 3 GHz P4 processor) with 2 GB RAM. The performance is pretty good actually. I routinely have two VPCs running at the same time. I dedidate 512 MB to each one, and that leaves me 1 GB for my base machine.

It does get a little sluggish if I am compiling large projects in each one.

But to be honest, VMWare is faster than Virtual PC. If it seems slow to you in Virtual PC, try converting your hard disks to VMWare disks (there's a free tool to do that) and run it in VMWare Player (another free tool from VMWare).
Left by Joel Ross on Mar 03, 2006 6:56 AM

# re: How I Use Virtual PC (or VMWare) For Development
Requesting Gravatar...
I pretty much work exactly like you, except I am using VMware exclusively. My regular development machine has 2 GB of ram, which works just fine. My tablet pc which I use for occasional development when I am away from my regular computer has only 1.5 GB of ram, which isn't as nice but is sufficient.

The only challenge I have working with VMs for development is that some of my projects are mobile apps, and getting USB ActiveSync connections going can sometimes be a challenge. But it is well worth the effort. Setting up a development environment for a new project is a snap, and I feel confident that if wanted to pave over my computer and start fresh, it wouldn't take me days to get everything set up the way I want.
Left by Avonelle Lovhaug on Mar 03, 2006 9:28 AM

# re: How I Use Virtual PC (or VMWare) For Development
Requesting Gravatar...
The only time I've used VMWare is for USB support, and it wasn't too bad to get working - although, I wasn't trying to do ActiveSync stuff - it was a barcode reader and had a driver that emulated the USB device as a serial device.

I feel exactly the same way about repaving my laptop. Even if I don't get all of my software installed on my base machine, all I really need is Outlook, FeedDemon, and Virtual PC. Then I'm ready to roll!
Left by Joel Ross on Mar 03, 2006 9:36 AM

# re: How I Use Virtual PC (or VMWare) For Development
Requesting Gravatar...
Joel, I'm glad you brought this up again. You and I have discussed this before in the past and I'm a firm believer that we should all develop this way. While I'm an advid VMware freak I can see the same usefulness in VPC. I'm glad to see others harnessing the power of virtualization for their development environments. :-)
Left by Eric Hammersley on Mar 04, 2006 10:54 PM

# re: How I Use Virtual PC (or VMWare) For Development
Requesting Gravatar...
Eric, you were actually one of the reasons I used VMWare, and to be honest, I'm not sure why I don't use VMWare exclusively. It's faster than VPC, but I think there's something in the back of my mind that says I should use VPC, partly because I work for a Microsoft partner, and partly because I know I can get VPC upgrades for free, where as I would have to pay for VMWare upgrades (although, from 5.0 to 5.5 is free).
Left by Joel Ross on Mar 05, 2006 5:23 AM

Your comment:
 (will show your gravatar)

Copyright © Joel Ross | Powered by: