Saturday, September 02, 2006 6:55 PM bart

Offline VHD file mounting on the host operating system with Virtual Server 2005 R2 SP1 Beta 2


A couple of days ago Virtual Server 2005 R2 SP1 Beta 2 was released to Microsoft Connect. The SP1 release of Virtual Server 2005 has a lot of exciting features, a little list:

  • AMD Virtualization Technology (AVT) compatibility
  • Volume Shadow Service support
  • Offline VHD mounting
  • Active Directory integration and management features
  • Hardware-assisted virtualization with Intel Virtualization Technology
  • Whitepaper on Virtual Server host clustering
  • Larger default size of 127 GB for dynamically expanding virtual hard disks
  • Virtual SCSI fix for Linux guests

Without doubt worth to check it out (and not to forget: it's free). In this post however I'll be looking at one feature: the Offline VHD mounting which allows you to take a VHD file and mount it as a drive in Windows without having to launch Virtual Server or Virtual PC. This allows you to manage (service) the disk offline. But there's more: because Vista's CompletePC Backup creates VHD disks, it can also be used to service an image of a Vista pc offline.

Installing Virtual Server 2005 R2 SP1 Beta 2

Below you'll find the instructions to do offline VHD mounting on Windows Vista build 5472. The steps should be applicable to future releases too. For Windows XP and Windows Server 2003 users, the steps are the same except for the layout of some messages (such as the driver installation dialog) and the lack of UAC prompts.

The first step is to set up Virtual Server 2005 R2 SP1 Beta 2 which you can download via if you're participating in the beta program (check the site for "Available connections"). Choose a Custom installation and make sure the VHD Mount feature is checked:

The remainder of the setup should be well-known and straightforward. Make sure you have installed IIS prior to the installation of Virtual Server 2005 because the setup will install the administration website. During the setup you'll see two driver installation messages. Choose to install the driver whenever the systems asks:

When setup has completed, you'll get to see the familiar Installation Summary page. As explained in my previous post you'll need to "run as administrator" IE to get the Administration Website up and running.

Offline VHD mounting step-by-step

On to the VHD mounting stuff. Open a command prompt and navigate to %programfiles%\Microsoft Virtual Server\Vhdmount. Now execute vhdmount.exe as shown below, specifying the vhd file and the driver letter to be used to mount the file:

On Windows Vista, this will fail however due to security restrictions for unsigned drivers:

To solve this issue, go to the Computer Management MMC (right click Computer in the Start menu and choose Manage). In the Device Manager, you should see a Disk drive device called "Microsoft Virtual Server Storage Device01":

 Right click this device, go to Properties, tab Driver and choose Update Driver:

Now choose 'Browse the computer for driver software':

Now point to the Vhdmount folder that contains the driver software:

The system will ask to confirm the installation again (choose Install) and finally the driver installation will succeed:

Now the window with the vhdmount.exe executiong should indicate a successful mount. In my case, the VHD had more than one partition so the vhdmount.exe tool complains it wasn't able to mount every volume on the virtual hard disk.

In the Device Manager you'll see two devices being added to the system, a "SCSI disk device" and the corresponding "storage device":

Through Disk Management you can now see the disk. In case the mount failed (on XP it will because drive-letter mounting isn't supported through vhdmount.exe on that platform), you can assign drive letters over here (see Windows Help for more information):

Of course in Windows Explorer you'll see the drive too:

So, that's it. You can now access the drive and make the desired changes (or grab the files you need). Notice that (unless your host computer is in the same domain as the computer that's living on the VHD file) the ACLs will display unknown SIDs. Only built-in accounts and groups will be recognized (these have a fixed SID):

To dismount and unplug the VHD disk run vhdmount.exe /u All (or specify the VHD file name you want to unplug):

An overview of the vhdmount.exe command:

Command line utility to mount a Virtual Hard Drive (VHD) file as a virtual disk device.

VHDMOUNT /m VHDFileName [DriveLetter]
VHDMOUNT /u VHDFileName | All
VHDMOUNT /q VHDFileName | All

/p           Plugs in the specified VHD file as a virtual disk device without
             mounting the volume.
/m           Plugs in the specified VHD file as a virtual disk device and
             mounts the volume.
/u           Unplugs the virtual disk device for the specified VHDFileName.
/q           Returns the disk name of the mounted virtual disk device for
             the specified VHDFileName.

VHDFileName  VHD file name including full path.
DriveLetter  Optional parameter for /m option. If drive letter is specified
             the volumes are mounted starting at the spefied drive letter.
             If drive letter is not specified it is automatically assigned.
All          Applies the operation on all mounted virtual disk devices.
             This parameter is applicable for /u and /q.

Happy mounting! | Digg It | Technorati | Blinklist | Furl | reddit | DotNetKicks

Filed under:


# Virtual Server 2005 R2 SP1 - VHDMount.exe can mount VHD files as volumes

Thursday, October 26, 2006 11:48 AM by James's Blog

# Preparing for Vista Backup and Restore - Part 2

Monday, January 15, 2007 11:58 AM by Building Better Software - One Line At A Time

Happy New Year! Last time we finished with using CompletePC to backup the OS partitions/drives as well


Thursday, March 22, 2007 9:11 AM by Andrea SOLDANO

Lo sapevo ... era da un pò che ci pensavo ... mi è bastato cercare su google utilizzando

# Windows Vista Crash without BSOD

Thursday, May 17, 2007 8:34 AM by Erwyn van der Meer

I just experienced my first Windows Vista crash that didn't even display a Blue Screen Of Death (BSOD).


Sunday, March 09, 2008 7:20 AM by Andrea Soldano Blogs


# Mount VHD Image « Kuntzz styles.

Saturday, May 31, 2008 1:00 AM by Mount VHD Image « Kuntzz styles.

Pingback from  Mount VHD Image « Kuntzz styles.

# Vista Business: Restore does not see the backup files. | keyongtech

Pingback from  Vista Business: Restore does not see the backup files. | keyongtech

# Vista Restore??? | keyongtech

Sunday, January 18, 2009 9:12 AM by Vista Restore??? | keyongtech

Pingback from  Vista Restore??? | keyongtech

# Mounting a VHD in Server 2008 (NOT R2) or Vista - IT Certification Forums

Pingback from  Mounting a VHD in Server 2008 (NOT R2) or Vista - IT Certification Forums

# CompletePC Backup & VHDs direkt in Vista mounten | My Blog

Thursday, September 04, 2014 9:49 AM by CompletePC Backup & VHDs direkt in Vista mounten | My Blog

Pingback from  CompletePC Backup & VHDs direkt in Vista mounten | My Blog