14 Nov 2008

Windows 7 and the VHD mounting bug

As previously posted, I've upgraded my Dev laptop to run Windows 7 M3. The main reason for this was that I wanted to be able to mount Virtual Hard Disks as actual drives. But after the upgrade from Vista I was getting an error message whenever I tried to mount a VHD:


I contacted the Windows 7 team and they were intrigued. It turns out that it isn't actually a problem with the VHD functionality, but instead a driver hasn't been installed correctly from Windows Update. The guys were saying it looked very much like the installation had begun for this driver, then stopped and cancelled for some reason.

So they got me to check out my Device Manager and I was missing the Microsoft VHD driver under Storage Devices, but had 2 unknown devices under base devices. I was instructed to delete said unknowns and try mounting another VHD. This time a new Device appeared under Base Devices called Microsoft ISO VHD something (I forget the last bit, it was another acronym). Ok so this is an improvement but still not right, according to the Microsoft guys. So next we updated the driver for this new device manually, as Windows Update wasn't connecting for some reason. After going to Disk Drives and selecting the only compatible device, a Microsoft VHD driver, we installed it and hey presto I now have the rather sexy functionality of being able to mount VHDs :)

One point to note, is that VHDs do not stay mounted after a restart or shutdown of the system.

So thanks to the guys over on the Windows 7 team, you rock! :)

2 comments:

Yong Jie said...

I had a similar problem, but the error message that I got was "The requested operation cannot be performed on the virtual disk object, because it is not in a state that permits it".

A Google search didn't reveal anything useful, however, it seems that the driver did not install correctly. So I removed the "Microsoft VHD HBA" device under "Storage controllers", attempted to re-attach the VHD via Disk Management. And voila! The driver installation was started and the problem was solved.

mousio2010 said...

I found a "Microsoft ISO VHBA" under "Storage controllers" and removed it. Then only after a reboot could I attach a VHD (triggering the driver installation).

Many thanks for the tips; I hope this helps as well…