Playing with the final version of VHDMount

Along with the recent release of Virtual Server 2005 R2 SP1 – we now have access to the final version of VHDMount to play with.  With those of you who are unfamiliar with this tool – it allows you to mount a virtual hard disk on a physical computer just like it were a separate physical tool.

The final version of VHDMount brings two notable changes from the beta 2 version:

  1. It now has officially signed drivers – which means that it works without any driver problems or confirmation prompts (very nice).
  2. It now automatically attaches a temporary undo disk to the virtual hard disk when you mount it, and asks you to commit or delete changes when you are done.

VHDMount is a command line tool that takes a number of parameters:

  • /p

    When used in the form VHDMount.exe /p VHDFileName VHDMount will “plug in” the virtual hard disk, without mounting any volumes. 

    Note – Windows XP and Windows Vista will automatically mount volumes on the disk and assign drive letters.  For Windows Server 2003 you will then need to go into the disk management tool to mount the volumes.

  • /m

    When used in the form VHDMount.exe /m VHDFileName X VHDMount will “plug in” the virtual hard disk, and mount the first volume at drive letter ‘X’.

    Note: Windows XP does not support using the /m option.  Windows Vista will automatically assign drive letters – and then change the drive letter for the first volume to the value specified in this command. 

  • /u /d

    When used in the form VHDMount.exe /u /d VHDFileName VHDMount will “unplug” the specified virtual hard disk, and delete any changes that were made.

    Note: It is possible to unplug and delete changes for all mounted virtual hard disks by running  VHDMount.exe /u /d All

  • /u /c

    When used in the form VHDMount.exe /u /c VHDFileName VHDMount will “unplug” the specified virtual hard disk, and commit any changes that were made.

    Note: It is possible to unplug and commit changes for all mounted virtual hard disks by running  VHDMount.exe /u /c All

  • /p /f | /m /f

    When used in the form VHDMount.exe /p /f VHDFileName or VHDMount.exe /m /f VHDFileName X VHDMount will perform the same action as is performed for VHDMount.exe /p VHDFileName or VHDMount.exe /m VHDFileName X only it will not create a temporary undo disk – and all changes will be made directly to the virtual hard disk.

  • /u

    When used in the form VHDMount.exe /u VHDFileName VHDMount will “unplug” the specified virtual hard disk, if it was plugged in using the /f option.

    Note: It is possible to unplug all mounted virtual hard disks by running  VHDMount.exe /u All

  • /q

    When used in the form VHDMount.exe /q VHDFileName VHDMount will display any information about mounted volumes on this virtual hard disk.

    Note: It is possible to display information about all mounted virtual hard disks by running  VHDMount.exe /q All

This is a very useful little tool – and I am going to be doing a number of posts on it in the coming days – so I hope you all have a chance to check it out.

Cheers,
Ben