Attach a VHD File in Windows XP

Recently, we posted a three-part series on using a VHD in Windows 7 to create a secure, portable file for storing your data (Create a Portable, Secure File Store in Windows 7 – Part I, Create a Portable, Secure File Store in Windows 7 – Part II, and Create a Portable, Secure File Store in Windows 7 – Part III).

If you also use Windows XP on another computer, you can transfer that VHD file to the XP computer and mount it without having to run Virtual PC or Microsoft Virtual Server. You can install only a component of Microsoft Virtual Server and run a command from the command line.

NOTE: If you have applied a password to your VHD file using BitLocker in Windows 7, as discussed in the third part of the series mentioned above, you CANNOT access your VHD file in Windows XP. You will be asked to format the drive.

Download Microsoft Virtual Server from

http://www.microsoft.com/downloads/details.aspx?FamilyId=BC49C7C8-4840-4E67-8DC4-1E6E218ACCE4&displaylang=en.

Start installing Microsoft Virtual Server by double-clicking on the setup.exe file. The initial Microsoft Virtual Server 2005 R2 SP1 Setup screen displays. Click the button next to Install Microsoft Virtual Server 2005 R2 SP1.

MS Virtual Server initial setup screen

The License Agreement displays. Select the I accept the terms in the license agreement radio button and click Next.

MS Virtual Server license agreement

The Customer Information screen displays. Enter your User Name and Organization. The Product Key is automatically entered. Click Next.

Entering User Name and Organization

On the Setup Type screen, select the Custom radio button and click Next.

Choosing the Setup Type

On the Custom Setup screen, click on the button next to the first feature in the list, Virtual Server Service, and select This feature will not be available from the pop-up menu.

Specifying a feature to not be available

Do the same thing for all the features except the VHD Mount feature. The Custom Setup screen should look like the following image. Click Next.

06_deselecting_all_but_vhd_mount

The VHD Mount feature is ready to be installed. Click Install.

Setup is ready to install

The progress of the installation process displays.

Installation progress

When the Setup Complete screen displays, click Finish.

Setup is complete

In Windows Explorer, navigate to the C:\Program Files\Microsoft Virtual Server directory. In the right pane, hold down the Shift key while right-clicking on the Vhdmount directory. Select Open Command Line Here from the pop-up menu.

Open command line here

At the command prompt, enter the following line.

vhdmount /p /f <path to VHD file>

Replace “<path to VHD file>” with the location of the VHD file you want to attach. Press Enter. You should see a message indicating the Virtual Hard Disk was successfully plugged in.

NOTE: For information about the parameters for the vhdmount command, type vhdmount at the prompt and press Enter. A list of available parameters with descriptions displays.

11_command_to_mount_vhd_file

In Windows Explorer, your VHD file displays as a hard drive with a drive letter.

VHD file displaying as a hard drive in Windows Explorer

To detach your VHD file, enter the following line at the command prompt:

vhdmount /u <path to VHD file>

Again, replace “<path to VHD file>” with the location of your VHD file.

If you still have Windows Explorer open and your VHD selected, you will receive an error when you try to detach the VHD file. You must either select a different drive, or close Windows Explorer.

Failed to unplug the Virtual Hard Disk

Once the VHD file is no longer being used, you can enter the detach command again and you should see a message indicating that the virtual hard disk has been successfully unplugged.

VHD file successfully unplugged

This component of Microsoft Virtual Server is useful if you transfer files between a Windows 7 computer and a Windows XP computer. You can keep all your files in one portable file and easily access them on both operating systems.

by Lori Kaufman

More posts from the Windows XP Tips Category

Using your old computer as a print server

What is the Difference Between Primary and Logical Partition?

you need permission to perform this action

Fix “You need permission to perform this action” error

review update history

Troubleshoot Windows Update Fails to Install Updates

Popular Posts This Month

event id

Fix Windows 8 App Opens Then Closes

runas command

5 Windows Alternatives to the Linux sudo Command

5 Utilities for Changing DNS Servers in Windows Reviewed

windows defender

Windows Defender vs. Security Essentials vs Safety Scanner

Comments [4]

  1. oneshot719 says:

    Gizmo Drive allows users to mount ISO, BIN, CUE, NRG, and VHD files using a Virtual CD-ROM drive. This essentially means that the program emulates a physical DVD/CD drive that you can load images onto.

    http://arainia.com/software/gizmo/overview.php?nI

  2. Lori says:

    Thanks for the tip. I looked at it and it looks like a useful tool. Microsoft Virtual Server does not work in Windows 2000 and Gizmo does.

  3. [...] on Thursday, July 8th 2010    8Jul Recently, we posted an article, Attach a VHD File in Windows XP, describing the use of a component in Microsoft Virtual Server to attach a VHD file in Windows XP [...]

  4. Shpoople says:

    Needs the installer cracked in order to run it on XP home. See win2kgaming.site90.com/phpBB2/viewtopic.php?f=4&t=715.

Leave a Reply