Mounting vhd files
Categories
I meant to post about this last month, but it slipped by. Microsoft have released (deep breath) Virtual Server 2005 R2 Service Pack 1. It's got a whole heap of features, and probably loads of improvements over previous versions - I can't say I really know.
All I'm interested in is the rather nifty ability it gives you to mount vhd files as drives. Yep, you can now browse and modify the contents of your virtual machine hard drives without booting up the vm itself. How cool is that?
Oh, and of course, vhd is the file format used by Vista's backup, so I guess you can browse those too (and retrieve data quickly and easily?)
And did I mention that it automatically creates a temporary undo disk for you?
It's a all a bit prosaic in that it's just a command line app, and one that's not very well documented, either. Trust this post over the usage instructions. And you've got to love the fact that it comes with an API, even if that API doesn't provide all the support of the command line app (doesn't allow you to specify deleting or committing the undo disk changes; doesn't provide support for the ALL parameter to unplug all virtual drives), or that it won't support an even more useful shell context menu handler without having to write dodgy and bound-to-be-error-prone state management code (i.e. it doesn't tell you which drive is running what vhd files). So it's handy there's a poor man's version ready for you, eh?
So what if you don't want to install Virtual Server? Perhaps you have Virtual PC already installed, or you're just not interested in having it installed? Well, just kick off the install, select customise and disable everything except vhdmount. Or if you're feeling particularly command line oriented, try msiexec /i "Virtual Server 2005 Install.msi" /qn ADDLOCAL=VHDMount.
Just something else to add to your box of tricks.
PS. Bonus tip - turn on tracing.