I recently got an MSDN Universal subscription via the Microsoft Empower for ISV program ($375 for MSDN Universal), which comes with only all Windows OSes, Visual Studio, SQL Server, Biztalk, Office, and lots of other software. One such program is Microsoft's Virtual PC 2004, which lets you create any number of virtual machines (VMs) each of which acts like its own computer.
Since I'm currently working on 3 different projects (one in .NET 1.1 & SQL Server 2000, one in .NET 2.0 & MySQL, and one in ASP.NET 2.0 & SQL Server 2005), I wanted to have separate development environments for each project to reduce the likelihood of cross-environment contamination (SQL 2000 affecting SQL 2005, .NET 2.0 messing up .NET 1.1, etc.). Not to mention that keeps it cleaner.
Three big benefits for developers from Virtual PC (along with other VM solutions like VMWare and Virtual Server) are
So for me, I'll start by creating a base VM with XP Pro SP2, Firefox, and Office. No dev tools yet. Using that XP Pro VM as a base, I'm then going to make at least three different VMs: one with .NET 1.1 & SQL 2000, one with .NET 2.0 and MySQL, and one with .NET 2.0 and SQL 2005.
When you create a VM based on an existing one, the advantage is you don't have to install anything that's already in the base VM (e.g., I won't have to install XP Pro, Firefox, or Office for my three dev environments). The decision you have to make is whether you want to just make a plain ol' copy of your base VM, or create a new "differencing disk" VM.
Making a copy of a base VM is easy and performs well. You're literally making a copy of the VM files. The downside is it can take up a lot of disk space. To make a copy of a VM:
Congratulations, you've made a copy of a VM! Now you can back this VM up (by just backing up the VHD file), install beta software on it, lots of fun stuff. It's "virtually" hassle-free. ;)
The other way to make a copy of a VM is to create a "differencing disk." The big disadvantage with copying a VM like we did above is that it can take up a lot of space. XP Pro and Office can make a 2gb .VHD file. Copy that .VHD file four more times and you've now got 10 gigs of space taken up.
A differencing disk VHD only stores what's different between itself and the base VHD. So if you create a differencing disk and only install a small program, the VHD file is going to be small, too. The downside is differencing disks can perform more slowly (although that seems to be debated), and if you change anything in a VHD you'll break any differencing disks based on it.
Rather than reinvent the wheel, I'll link to a few good articles on differencing disks. BTW, some sites refer to VMs created in Virtual PC 2004 as VPCs (Virtual PCs).
http://blogs.msdn.com/donsmith/archive/2005/06/16/429700.aspxhttp://weblogs.asp.net/cumpsd/archive/2005/03/08/389738.aspxhttp://andrewconnell.com/blog/articles/UseVirtualPCsDifferencingDisksToYourAdvantage.aspx
And a special bonus link: Top Ten Tips for Virtual PC 2004
And two more links to Griffin Caprio's thoughts on VMs: Why he likes VMs and Just in time development. And dammit Griffin you should turn on SEO-friendly URLs. :)
Powered by: newtelligence dasBlog 2.0.7226.0
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.
© Copyright 2009, Ben Strackany
E-mail