Mounting a Virtual Hard Disk in Windows 7

LeeTutorretired
CERTIFIED EXPERT
Published:
You might be wondering what purpose you would have for mounting a Virtual Hard Disk. If you use virtual machine software, such as Microsoft's Virtual Pc 2007 or VMware's Virtual Server, then that is an obvious use. However, let it be noted that the Windows 7 Backup tool will create a Virtual Hard Disk file when it backs up your entire computer. The normal usage of such a backup file is just to go into the Backup and Restore applet in Control Panel and restore your entire computer from such a file. However, after you mount a VHD file, you can instead just use Windows Explorer to copy and paste (or drag and drop) individual files and folders from the VHD drive to your system drive. No need to restore the entire image of the drive!

Here are the instructions for mounting a VHD: open up Computer Management by typing COMPMGMT.MSC in the search dialog box at the bottom of the Start Menu and hit Ctrl-Shift-Enter to run as Administrator. Then in the Computer Management window that opens up, right click on Disk Management and choose Attach VHD.
 Attach VHD in Computer Management
In the dialog box that opens up, enter the path to the VHD and click OK
 Attach VHD dialog box
The drive will mount and display in Disk Management. You can easily distinguish that it is mounted VHD because it will be colored blue.
 Disk Management
To dismount, Right-Click the disk and select Detach VHD. Click OK to detach.
 Detach VHD
1
4,457 Views
LeeTutorretired
CERTIFIED EXPERT

Comments (2)

Top Expert 2010

Commented:
Great job Lee!

For developers have a look here: http://msdn.microsoft.com/en-us/library/dd323684(VS.85).aspx

You can implement VHD into your applications also if they decide to update these functions you may see that it will be possible to map .ISO as standard hard drive using this same approach in the article or in your own applications. They already have implemented the feature but it's only for internal use as of right now.
i have a windows 7 machine that created a disk image on a server 2003 shared drive. how can i delete this image.

Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.

Get access with a 7-day free trial.
You Belong in the World's Smartest IT Community