I decided to try out the new Windows 7 feature of native boot to VHD. With the public drop of the SharePoint 2010 Beta, I decided I wanted to keep my development stuff completely separate from my normal computer usage. The native boot to VHD seemed like a good fit. Somewhere down the line I’ll put together a proper set of virtual images for playing around with SharePoint 2010 but I thought it’d be nice to see how it runs on bare metal.
Anyway, from browsing around, I figured this would be a piece of cake. Boy was I wrong. I started off with Scott Hanselman’s excellent article. I booted from the Win7 install DVD, followed the bouncing code ball and created a virtual disk. This was the point I first ran into problems. Somehow, I couldn’t figure out how to “exit and go back to the setup window”. I ended up rebooting a few times and learning a bit about DISKPART via the help command. On it’s own, that’s not a bad thing but I was trying to do something else, not learn about command line disk tools. Anyway, I eventually figured out how to get the vdisk attached and recognized by setup but it just wouldn’t work. After a bit of browsing and reading, I found one line in a Windows 7 Hacker article on doing this that stated that trying to do a fresh install to the VHD just won’t work. You’d think I’d have expected this since pretty much every article went from DISKPART to using an existing image (in a variety of ways).
So now I had to come up with an image. As most people know by now, Windows Virtual PC doesn’t support 64-bit guest OSes. I already knew that and had been playing with Sun VirtualBox in preparation for my full farm simulation images. For some reason, VirtualBox disk images have a .vdi extension instead of .vhd. I haven’t had time to research why this is, but I didn’t want to take any chances so I created the vhd using Windows 7 Disk Management, then added it to the VirtualBox media manager and proceeded to install Windows 7. Easy peasy.
Now that I had an image, I needed to add it to the Boot Manager. Since I’d read all those articles on doing this, it was fairly simple. Using the Hanselman article referenced above (I’d printed it out), I followed the steps in an administrator command prompt then rebooted. Voila! I had two choices now and happily chose my new dev image.
BAM! BSOD! Crap…
In my haste to get this working, I hadn’t really thought through what I was doing and forgot to do the sysprep on the image before trying to native boot. Since the hardware was real now and radically different from the virtualized hardware, it just didn’t work. It took me awhile to figure this out though, especially since I couldn’t read the BSOD before reboot. I did manage to get a partial read of it through good timing with my BlackBerry camera but it said something about a virus which didn’t really help.
So, back to the image in VirtualBox and time to do a sysprep. Fire that up and get a fatal error. Google to the rescue again. This time I had to turn off the Windows Media Player Networking Service. Did that, set it running and soon enough I had a sysprepped image. Tried the native boot, and lo and behold it’s working! Yay me…
Unfortunately, this took an entire evening so I didn’t have time to get to the SharePoint 2010 Installation. At any rate, although I blew a lot of time on this, it was mostly my fault for trying to be different. If you’re looking to do this for yourself, there’s only a few things you really need to do:
- create an image and sysprep it (use VirtualBox, VMWare or the Windows AIK)
- BCDEDIT the boot menu
- use it!
I can hardly wait to play with the SharePoint 2010 beta – news on that shortly…
- Dave