Server 2008 Hyper-V: Alternative to VHDMOUNT

Ravikanth Chaganti's VBS script to mount a VHD does seem to work, with one caveat. But first things first: How do you install it? There are two files - VHDMOUNT.VBS, which you need to place at the root of your C: drive, and HV-REG.REG, which you need to double-click one time in order to add the Registry entries necessary to add the "Mount" and "Dismount" options to the VHD file type context menu.

Two notes: First, be sure to get the March 20 update to VHDMOUNT.VBS, as it has some improved error-trapping. Second, if you're allergic to adding files to the root of a hard drive, as I am, some judicious tweaking of the REG file will let you put VHDMOUNT.VBS wherever you want.

Once you've placed the script and run the REG file, right-clicking a VHD now shows two new context menu options. With some trepidation, I chose "Mount" and got a success message from the script, followed by a taskbar message informing me that a storage miniport driver was being installed. However, no new drives showed up in Explorer. Durn!

A trip to the Computer Management console's Disk Management tool showed that the disk was there, but offline. After manually bringing it online, it showed up in Explorer (hurrah!), and file copies to and from the VHD worked just fine. When I was done, I right-clicked the VHD (NOT the drive letter, by the way) and chose "Dismount." No trip to Computer Management was necessary for this operation: the VHD was dismounted and its associated drives disappeared from the Explorer window. I have dropped Ravikanth a message inquiring about the offline issue to see if he has any ideas as to how to make this automatic. Meanwhile, his method is a lot simpler than jumping through all the hoops necessary to get VHDMOUNT to work on a system that doesn't already have VS2005. So, kudos to him for coming up with something that Microsoft should have.

Join the Network World communities on Facebook and LinkedIn to comment on topics that are top of mind.
Take IDG’s 2020 IT Salary Survey: You’ll provide important data and have a chance to win $500.