Mounting Vista Backups

Windows Vista has a new backup utility called “Backup Status and Configuration”. This tool replaces previous operating systems’ NTBACKUP software, which can be found in Windows 2000/XP/2003. You can read more about Vista’s new backup tool in my “Using Backup Status and Configuration in Vista”, “Restore NTBACKUP Backups from Windows XP to Windows Vista” and “Installing Windows XP NTBACKUP on Windows Vista” articles.

One of the cool features of the Vista backup tool is the new feature called “CompletePC Backup”. Windows Complete PC Backup creates a backup image, which contains copies of your programs, system settings, and files. The backup image is then stored in a separate location from the original programs, settings, and files. You can use this backup image to restore the contents of your computer if your hard disk or entire computer ever stops working.
Windows Vista’s CompletePC Backup allows users to backup entire partitions, and stores these backups as VHD files. While there is currently no support for booting these VHD files, they are easily mountable using either VirtualPC 2007, or Virtual Server 2005 R2 SP1, both of which are free downloads from Microsoft.
Thanks to a tip from Virtual PC Guy on MSDN blogs, there is now an easy way to add right click mounting of these VHD files directly to Windows Explorer in either XP or Vista. Although not a new tip, I wanted to share it with my readers after getting a few questions about this topic. So here goes.
In order to start you will first have to download and install Microsoft’s Virtual Server 2005 R2 SP1. You do NOT need to fully install VS on your computer, all you need is a component found in it called VHDmount.
Click here to download Virtual Server 2005 R2 SP1.
Note: You need the SP1 version of VS 2005, as the previous version does not include VHDmount.
After downloading the file, double-click it to begin the installation process. At this point you can either install the full product, with in turn will allow you to create, run and manage virtual machines on your computer. Or, if you don’t want to install the full VS product, you will need to begin a custom installation.
To perform a custom installation select Custom in the installation type screen, and on the next screen unselect all the components except VHDmount.
BTW, you can easily install VHDmount by using this procedure:

  1. First, prepare the MSI installation file by typing the following command in the folder where setup.exe is located:
​setup.exe /c /t d:\
  1. Next, type:
​msiexec.exe /i "Virtual Server 2005 Install.msi" /qn ADDLOCAL=VHDMount

Once you have installed either the full Virtual Server or just the VHDmount component, you need to merge the following registry file into your XP or Vista registry:

Warning!

This document contains instructions for editing the registry. If you make any error while editing the registry, you can potentially cause Windows to fail or be unable to boot, requiring you to reinstall Windows. Edit the registry at your own risk. Always back up the registry before making any changes. If you do not feel comfortable editing the registry, do not attempt these instructions. Instead, seek the help of a trained computer specialist.

​Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Virtual.Machine.HD]
@="Virtual Hard Disk"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Virtual.Machine.HD\shell]
@="Plug in"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Virtual.Machine.HD\shell\Plug in]
@="&Plug in"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Virtual.Machine.HD\shell\Plug in\command]
@="\"C:\\Program Files\\Microsoft Virtual Server\\Vhdmount\\vhdmount.exe\" /p \"%1\""
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Virtual.Machine.HD\shell\Unplug (discard changes)]
@="Unplug (&discard changes)"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Virtual.Machine.HD\shell\Unplug (discard changes)\command]
@="\"C:\\Program Files\\Microsoft Virtual Server\\Vhdmount\\vhdmount.exe\" /u /d \"%1\""
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Virtual.Machine.HD\shell\Unplug (commit changes)]
@="Unplug (&commit changes)"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Virtual.Machine.HD\shell\Unplug (commit changes)\command]
@="\"C:\\Program Files\\Microsoft Virtual Server\\Vhdmount\\vhdmount.exe\" /u /c \"%1\""
[HKEY_CLASSES_ROOT\.vhd]
@="Virtual.Machine.HD"

Note: You will need to change the path for vhdmount.exe if you did not install to the default location on C:\.

Two notes about using this with Windows Vista:

  1. For some reason, double-clicking on the VHD file does not work. You will need to right-click it and select “Plug in”.
  2. VHDmount needs to run with administrative privileges. In order to get this to work with User Account Control (or UAC) enabled, you will need to browse to vhdmount.exe, right-click on it, select Properties, and on the Compatibility tab check the Run this program as an administrator checkbox. Another method is to simply disable UAC (read more about it on my Vista section).

This registry file will add a Plug in and Unplug option to the right-click context menu in Windows Explorer for VHD files. The moment you right-click a VHD file you’ll be able to either mount it, or unmount it if it is already mounted.

 
Mounting the file will add the VHD file as a virtual drive that shows up in Windows Explorer, very similar to plugging in a USB disk-on-key or portable drive.
 
After the disk has been successfully mounted, it will receive a drive letter which you can use just like any other local or network-mapped drive. However, in some cases the disk will not receive a drive letter, and that’s when you’ll need to assign one manually.
Open Computer Management from the My Computer context menu or from the Administrative Tools folder. Scroll down to the Storage >  Disk Management console. Note that the new mounted disk appears without any drive letter. Right-click on it and select Change Drive Letters and Paths.
 
Click Change and select a drive letter. You can even use an NTFS Mount point if you want to preserver letters for other uses.
The new disk will appear in the Windows Explorer view.
 
While this tip is specifically related to mounting VHD files created by the CompletePC Backup tool of Windows Vista, anyone with a quick mind will easily understand the benefits of it for mounting regular VHD files used by various virtualization software.

Related Articles

Got a question? Post it on our Windows Vista Forums!