Resizing Virtual Hard Disks...Suh'mo!

So I've been building the mother of all Virtual Machines for showcasing Dynamics development using all the latest goodies of Visual Studio 2005, .NET 3.0 and Office 2007.

But I ran into a little problem, as I'd only setup the disk to be 16GB dynamic. Now, firstly, I thought dynamic meant it would just keep growing, past 16GB (I thought the 16GB was just there to satisfy an OS disk table requirement or something). Turns out, creating a 16GB dynamic disk means it stops at 16GB!!! Ok, don't know why it isn't implemented as a simple "limit" setting on the disk rather than a hard stop, but I got no time to complain!!! (watching a lot of Mr.T lately). So the first thing I did was consult the Virtual Machine mage, Andrew Dugdell, aka Dugie! From Dugie's blog, I discovered VHDMount (or its existence anyway).

This then got me onto Conrad Agramont's blog, and onto an article about using VHDMount to simply mount an existing VHD, create a new bigger VHD, then xcopy from one to the other. Easy, then I have a nice copy of my Dynamics VPC with more headroom!

The only thing I'll mention is that if you try to mount a VHD that has been created as a SCSI drive, Vista gets confused. VHDMount will fail with the following error:

"The VHD file is successfully plugged in as a virtual disk device. However, VHD mount was unable to mount all volumes on the disk. Use Disk Manager to mount the volumes."

Then Vista will pop up a system tray message with the following error, "Device driver software was not successfully installed":

And it will seem at that point that everything has gone fut! Don't stress, if you open up Computer Manager, go to the Device Manager node, you will notice under Disk Drives that the device has not been recognized. All you have to do is right-click on the icon, select Update Driver Software, click Browse my computer for driver software, select Let me pick from a list of device drivers on my computer, then select the MS Virtual Server Storage Devices driver... like the picture below:

So thanks to Dugie and Conrad, my mega VPC is back on track :)