A few weeks ago I presented to the San Diego .NET User Group. Let me say I really like their new meeting location at Intuit, and below my post those of you who attended my presentation will find a copy of my slides.
The title of the presentation is of course a play on an old saying about being adrift at sea “Water, water everywhere, but not a drop to drink.” It occurred to me that there was a parallel to this situation and beta software. After all while you may here about all sorts of new features within beta software, for most corporate developers; deploying solutions that leverage these technologies isn’t always possible. In fact for some the organizations are so short term focused that even working with these technologies may be difficult, since I’ve seen developer’s install beta software on their primary work system, corrupt it and as a result the organization starts to take a ‘no beta’ approach to reviewing new technology.
Given that even a few weeks ago, the beta 1 release of Visual Studio 2010 was starting show its age I wanted a presentation that would better explain to developers some best practices when working with Beta and Community Technology Preview (CTP) software. After all while part of the session was to look at some of the new features of Visual Studio 2010, I wanted attendees to come away with some best practices in terms of working with the array of beta products that Microsoft is making available in this release wave. Unlike beta 1 or earlier CTP versions from Microsoft, my experience is that when you get to Beta 2 or RC you have something that’s usable for more than just planning. In fact I really believe that if you are developing a new solution and looking at 3-6 months for a release timeframe you should be using the Beta 2 technology and considering leveraging a ‘Go Live’ license if you are ready before the product releases.
Every few years the product groups align such that whether it is a new OS plus a new Office plus a new Visual Studio or a new version of SQL Server or new versions of a bunch of other products that what you get from Redmond is a wave of new products. Most of these products spend some overlapping time in beta release, for example Visual Studio Beta 1 came out while Windows 7 was in RC, and since coming out there has been a CTP of Office 2010. This week we’ll see Windows 7 launch (it’s release was back in August) and soon we should see a beta 2 for Visual Studio 2010 (no later than the PDC)(http://visualstudiomagazine.com/Blogs/RDN-Express/2009/09/VS2010-and-.NET-4-Beta-2-Expected-Soon.aspx), and of course updates to the Office 2010 pre-release versions (isn’t there a SharePoint conference coming up, not to mention PDC… there ought to be something prior to the holidays. http://www.mssharepointconference.com/Pages/default.aspx)
So at this rate if you want to try an keep up and work with the new technology you probably are thinking VPC. As most of us are aware, over the past few years virtual machines have been to Beta software what the Internet was to networked computing. However, the one disadvantage of VPC was that of performance. The fact is things like Windows 7 Beta and Visual Studio 2010 Beta 1 run agonizingly slow on VPC. Here you are trying to follow best practice and not risk corrupting your core system, but as a result working with the technology borders on impossible. Fortunately Windows 7 took a huge step toward resolving this issue with BootToVHD.
Boot to VHD makes allows you to set up a virtual machine and then during the boot process select it as the boot partition instead of your primary OS. As you might imagine this implementation is closer to another way of handling multiple operating systems on a singly physical system’s hardware – multiple partitions. What’s really being virtualized however is the partition. In the past you would tell the physical hard drive that the a given percentage of it’s space was to be treated as logically separated from the rest of the hard drive. There are several disadvantages to these physical partitions, including the ability to resize them, the fact they lock in a percentage of the hard drive even if you won’t use that much space, the fact that refreshing them isn’t easy. Let’s face it there were enough issues that VPC was easily the solution of choice.
A VHD for those unfamiliar with the acronym is a Virtual Hard Drive, and it is the format used by VPC (but not VMWare) to represent a virtual machine’s disk drive. The advantages are many, I can set the drive to expand only as space is required. Once I’ve pointed my boot options to a VHD file, I can swap it out for a different VHD file and the operating system is none the wiser. This alone allows me to create a baseline image, prep it and then when I need to I can replace my VHD to quickly start on a clean system.
However, it gets better – as noted by Scott Hanselman there is a CScript tool which will allow you to create that Baseline image using the tools from the Windows 7 Automated Installation Kit (AIK). The focus of the slides below is to leverage information I found in 3 different blog posts (two from Scott and one from Michael Waterman. While I identify how to find Scott’s posts via Bing in the slides, I don’t mention Michael’s excellent PDF document specifically. The order I worked with them was to first read Scott’s posts which helped me get a baseline, and I then download the PDF file from Michael Waterman located at the bottom of his blog post here: http://blogs.technet.com/michw/archive/2009/08/01/windows-native-vhd-boot-deployment-scenarios.aspx Of course Michael’s document goes at if from the lowest level and as you’ll learn from Scott’s postings, teh Wim2VHD script makes this unnecessary.
While Michael’s post and PDF go through the details of manually creating a VHD to support the Native VHD Boot scenario they are still great reference. Plus there is one take-away remaining from his post/pdf; the use of the tool DISM.exe. To quote from his PDF: “The tool we will use is new to Windows 7 and is called the DISM tool, which stands for ‘Deployment Image Servicing and Management’.” This tool allows you to retrieve the names of the images which are available on your DVD. This becomes important as you’ll see with the enclosed instructions in order to tell the Wim2VHD.wsf.
The net result as I point out in the slides, is that although images created to support Boot to VHD aren’t as portable as those which are truly virtual a new image can be spun up in under an hour as opposed to a lengthy set up, and by following another tip – don’t activate the image until you need to it becomes possible to quickly spin up, test and replace images. Rather than run through everything else, with regard to the advantages and disadvantages of VHD images for native boot, let me give you a link to the slides here: NetUGSeptPresentation.pdf (479.09 KB)
and mention my configuration. I’m running a Dell laptop as my primary development machine. On it I have a reasonably nice solid state hard drive. Which means when I configured my laptop I chose disk speed over space. I’ve had the laptop about 10 months and let I’m as certain as ever I made the correct choice due to another enabling technology. The drive on my laptop is limited, however, I purchased a relatively inexpensive external WD hard drive. The 1TB WD My Book series supports e-Sata connectivity. For those that aren’t aware it essentially provides the access speed of an internal drive (not quite but about 3x USB or Firewire speeds). This means I can and do place multiple different images out on the external drive. Just like the laptop the external drive is portable, I just need to have electrical for two devices instead of two. If you have eSata and you are still using USB for a primary external drive you are missing out on usable access speeds.
At any rate, feel free to dig through the slides and get a feel on what is coming in Visual Studio 2010 and more importantly how to leverage today’s technology to allow you to quickly and safely leverage all of the Beta software coming from Microsoft as the next release wave of new technology rolls into use.