auto-mount VHD Disks

On Server 2008 R2 and newer, VHD files can be mounted using Windows Disk Management MMC (diskmgmt.msc):


You can mount a VHD using the “Action” Menu:


But as soon as the Server gets restarted, you need to re-mound the VHD File manually. Microsoft provides no way to do this automatically using onboard tools. So you have the following choice:

  1. either create a batch script that calls fsutil.exe to mount the VHD file on startup
  2. or to use the cool and easy VHDattach Tool:

This tools allows you to open existing VHD files and select “auto-mount” (see screenshot):


I mounted a Backup Exec Dedup Store as VHD file. For my example, it was necessary to re-configure the Dedup Service to Delayed start in services.msc.

Boot directly from vhd File

Yes I knew about mounting vhd files as drive in Windows 8/2012, and ISO files can also be mounted directly in windows explorer. But here’s a very easy way to mount AND directly add the vhd image into BCD boot menu to boot up from:

(1) Copy the Extracted VHD file to C:\BootVHD\Server2012.vhd

(2) Mount the copied VHD file as a virtual Drive Letter

  • Right-click on the “Command Prompt” shortcut and select “Run as Administrator”
  • run “DISKPART.EXE” from the Command Prompt
  • At the “DISKPART>” prompt type the following commands, pressing Enter after each:
  • SELECT VDISK FILE=”C:\BootVHD\Server2012.vhd”
  • EXIT

(3) Wait for the VHD file to be mounted as new Drive Letter.  When completed, this new drive letter will display in “My Computer” and “Windows Explorer”

(4) Add a new OS Boot Menu Choice for Windows Server 2012

  • Right-click on the “Command Prompt” shortcut and select “Run as Administrator”
  • Run “BCDBOOT <mounted_drive_letter>:\WINDOWS” from the Command Prompt

(5) Reboot and select “Windows Server 2012” for the OS Boot Menu displayed