mo.notono.us

Thursday, May 24, 2007

Mounting a Virtual Hard Drive (VHD) as a Disk Drive or Folder

Virtual Server 2005 R2 SP1 Beta 2 (who named this thing?) has a utility called VhdMount which lets you mount a virtual hard drive file as a disk on your physical machine.  This comes in handy when say, you know you have a file in one vpc (A), but you’re already in another vpc (B) and you don’t want to shut down B, start up A, copy from A to the host, shut down A, start up B, and copy from the host to B.  (And it’s not as if you can add the vhd for A to B at runtime; that would be too convenient.)

In theory, once you have Virtual Server 2005 (R2 SP1 Beta 2) installed, mounting a vhd should be as easy as calling the following from a command line:

“C:\program files\microsoft virtual server\vhdmount\vhdmount.exe” /m VHDFileName [DriveLetter]

However, it’s not quite that easy:  because the device driver is in beta, it’s not signed and can’t be installed automatically (at least not in XP and Vista).  So after you (attempt to) mount the vhd, you have to perform some additional steps outlined here:

http://community.bartdesmet.net/blogs/bart/archive/2006/09/02/4385.aspx

(The article also describes how you can install the VhdMount utility only, and not the full Virtual Server.)

These steps are a pain, since they have to be done EVERY TIME you mount a drive, but they’re still better than the A-B dance listed above.  Supposedly, the steps are supposed to become unnecessary when the service pack finally ships, as the drivers will then be signed.  Supposedly.  Also, to lessen some of the pain, you can add a registry entry to mount a vhd by double-clicking, as described by Virtual PC Guy here:  http://blogs.msdn.com/virtual_pc_guy/archive/2006/09/01/734435.aspx

(Virtual PC Guy also acknowledges the painful steps you have to go through in XP (and Vista):  http://blogs.msdn.com/virtual_pc_guy/archive/2006/09/05/740763.aspx)

Labels:

0 Comments:

Post a Comment

<< Home