Windows IT Pro is the leading independent community for IT professionals deploying Microsoft Windows server and client applications and technologies.
  
  
  Advanced Search 


December 2007

Mount and Dismount VHD Images on Command

RSS
Subscribe to Windows IT Pro | See More Tips Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

Executive Summary:

Microsoft Virtual Server 2005 R2 with SP1 comes with the VHD Mount (vhdmount.exe) utility. With this command-line tool, mounting and dismounting a Microsoft Virtual Hard Disk (VHD) image is easy.


If you’ve joined the virtualization revolution, there are times when you might need to quickly mount a Microsoft Virtual Hard Disk (VHD) image to see its contents, just like any ordinary hard disk. If you’re running Microsoft Virtual Server 2005 R2 with SP1, you already have a utility you can use: VHD Mount (vhdmount.exe).

VHD Mount comes installed in the C:\Program Files\Microsoft Virtual Server\Vhdmount folder. You can use this tool from the command line; the commands are pretty straightforward. To mount an image, follow the syntax

vhdmount.exe /m vhd_path drive

where vhd_path is the path to the .vhd file you want to mount and drive is the drive letter to which you want to assign the image. You need to specify the colon after the drive letter (e.g., F:).

By default, VHD Mount creates an undo disk for each mounted image, just like Microsoft Virtual PC and Virtual Server do. If you want to override this behavior and write directly to the mounted image, you can add the /f switch:

vhdmount.exe /m vhd_path drive /f

To dismount an image, you have two options. If you want to save any changes you’ve made to the VHD before dismounting, follow the syntax:

vhdmount.exe /u /c vhd_path

If you don’t want to save any changes you’ve made to the VHD before dismounting, use this syntax instead:

vhdmount.exe /u /d vhd_path

Note that you need administrative rights to run VHD Mount.

End of Article



Reader Comments

You must be a registered user or online subscriber to comment on this article. Please log on before posting a comment. Are you a new visitor? Register now




Top Viewed ArticlesView all articles
WinInfo Short Takes: Week of November 9, 2009

An often irreverent look at some of the week's other news, including some more Windows 7 sales momentum, some Sophos stupidity, Microsoft's cloud computing self-loathing, more whining from the browser makers, Zoho's "Fake Office," and much, much more ...

Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

Windows 7 Sets Sales Record

Microsoft CEO Steve Ballmer described Windows 7's first ten days of sales as "fantastic" while in Japan yesterday. ...


Related Articles Windows Server Virtualization Features

Virtual Machine Manager’s Significance

Tips for Virtual Server 2005

The Path from a Physical to Virtual World

Virtualization Whitepapers A Business Case for Backup & Recovery for The Virtualized Environment

Related Events Deep Dive into VMware vSphere

RUUP4IT? R2 Takes You Vertical and Virtual

Dev Tools United! Developers Benefit From Desktop & Server Virtualization Solutions

Check out our list of Free Email Newsletters!

Windows OSs eBooks Understanding and Leveraging Code Signing Technologies

A Guide to Windows Certification and Public Keys

SQL Server Administration for Oracle DBAs

Related Windows OSs Resources Introducing Left-Brain.com, the online IT bookstore
Looking for books, CDs, toolkits, eBooks? Prime your mind at Left-Brain.com

Discover Windows IT Pro eLearning Series!
Clear & detailed technical information and helpful how-to's, all in our trademark no-nonsense format


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro DevProConnections IT Job Hound
Left-Brain.com Technology Resource Directory asp.netPRO ITTV Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 © 2009 Penton Media, Inc. Terms of Use | Privacy Statement