Virtual PC Guy's Blog

-- Ben Armstrong, Virtualization Program Manager

Talking about core virtualization at Microsoft (Hyper-V, Virtual PC and Virtual Server).

Welcome to MSDN Blogs Sign in | Join | Help

Double clicking on a VHD to mount it

Virtual Server 2005 R2 SP1 Beta 2 includes 'vhdmount' - a tool to allow you to mount a virtual hard disk directly on your host operating system.  While vhdmount is provided as a command line tool - a very small amount of work will allow you to mount VHDs by just double clicking on them.  By creating a .reg file with the following contents:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Virtual.Machine.HD]

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Virtual.Machine.HD\shell]
@="Mount"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Virtual.Machine.HD\shell\Dismount]

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Virtual.Machine.HD\shell\Dismount\command]
@="\"C:\\Program Files\\Microsoft Virtual Server\\Vhdmount\\vhdmount.exe\" /u \"%1\""

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Virtual.Machine.HD\shell\Mount]

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Virtual.Machine.HD\shell\Mount\command]
@="\"C:\\Program Files\\Microsoft Virtual Server\\Vhdmount\\vhdmount.exe\" /p \"%1\""

[HKEY_CLASSES_ROOT\.vhd]
@="Virtual.Machine.HD"

And then double clicking on the .reg file (to load it into your registry) you will be able to double click a VHD to mount it, and right click on it to dismount it.

Cool...

Cheers,
Ben

Published Friday, September 01, 2006 5:29 PM by Virtual PC Guy

Comments

# re: Double clicking on a VHD to mount it

Awesome tip, thanks a lot
Saturday, September 02, 2006 4:49 PM by Thomas

# NICE: Double clicking on a VHD to mount it

Very Nice.
Saturday, September 02, 2006 6:49 PM by Andrew Dugdell

# customize the Microsoft virtual server

I want to customize the Microsoft virtual server, what i want is the admin gui page it shows I want to customize that like I want to create 4 VirtualMachine at a time by running a VB script ,can u provide that script to me which take input  for creating many VMs at atime.

please provide me the script. thanks
mithu_manoj@yahoo.com
Monday, September 04, 2006 1:41 AM by manoj

# re: Double clicking on a VHD to mount it

Hi,
how is it possible to use vhdmount with WinXP SP2?
Monday, September 04, 2006 9:47 AM by Goospy

# re: Double clicking on a VHD to mount it

Very nice, this. Look forward to drv being signed
Wednesday, September 27, 2006 6:28 PM by Gorm
New Comments to this post are disabled
 
Page view tracker