How to Attach/Detach VHDs in Windows 7

Again, yet another article (third one this time) concerning the VHD support in Windows 7.

The question arises: what if you wanted access to the VHD from another Windows 7 system? For example, say you wanted a file off of your Windows 7 VHD on your standard Windows 7 installation. Would you have to reboot, copy the file to the normal installation, and reboot? Absolutely not.

It is actually quite easy to “mount” a VHD in Windows 7 (regardless of what’s inside, files or a Windows 7) as though it were a standard hard drive or partition, and then “unmount” it afterwards if you so desired.

Attaching a VHD

1. Now, as for mounting a VHD (or “attaching” a VHD, as Microsoft calls it). Go to the Start Menu (or Desktop) and right click “My Computer” and click “Manage.” This is the easiest way to access Computer Management, but it can also be accessed via the Administrative Tools as “Computer Management.”

screenshot.1 600x4291 How to Attach/Detach VHDs in Windows 7

Viewing Disk Management

2. Now click on “Disk Management” under “Storage” in the sidebar. This will present you with a list of partitions on your computer. To attach a VHD, either go to “Action > Attach VHD” or right click “Disk Management” and select “Attach VHD.”

screenshot.2 600x4291 How to Attach/Detach VHDs in Windows 7

Attaching the VHD

3. This will present us with a new window titled “Attach Virtual Hard Disk.” If you would prefer to make the partition read-only, meaning that files cannot be modified, only read and/or copied (copy only applies to a writeable partition), then check the “Read-only” box. Otherwise, leave the box alone (empty). Simply type the location of your VHD or use the browse function to find it. Click OK.

screenshot.31 How to Attach/Detach VHDs in Windows 7

Specifying the Location of the VHD

4. The VHD should now be available in Explorer.

Detaching a VHD

1. Right click the button associated with your VHD and either go to “Action > All Tasks > Detach VHD” or right click the button and select “Detach VHD.”

screenshot.4 600x4291 How to Attach/Detach VHDs in Windows 7

Detaching the VHD

2. This will create a new window titled “Detach Virtual Hard Disk.” It will present you with the location of the VHD and ask if you would like to delete it. If you do not want any files on the VHD deleted (or the VHD itself), do not check the deletion option. Detaching it the normal way (without deleting it) will not delete the VHD and will allow you to re-attach it or boot from it later. Make your decision and click OK.

screenshot.51 How to Attach/Detach VHDs in Windows 7

Viewing the Detachment Confirmation

3. The VHD should now have disappeared from Disk Management and Explorer.