次の方法で共有


VHDMount without VHDMount

To mount a VHD file onto your file system, you either ran some very complicated VB (or PowerShell) Script or you used VHDMount.exe that came with Virtual Server.  If you’re running Windows 7 (or Windows Server 2008 R2), you can now use Diskpart.

So, from an elevated command prompt, run Diskpart.

Select the VHD in question:

sel vdisk file="c:\users\daven\desktop\xp professional.vhd"

Then attach it to your system:

attach vdisk

image 

That’s it.  Pretty easy.

Dave

Share this post : Technet! del.icio.us it! digg it! live it! reddit! technorati!

Comments

  • Anonymous
    January 01, 2003
    I can only agree with you Joe - I've been asking for the same thing for years...

  • Anonymous
    January 01, 2003
    In "disk management" look at "actions->more actions" - you can do the same thing with the GUI! - I am on Win7 build 7000, still - I suppose it is still there on newer builds too!

  • Anonymous
    January 01, 2003
    take a look at Portlock SMART Suite for windows.  No installation required. allows you to mount an ISO with a program called Portlock Drive Explorer. I had no problems accomplishing this on Win 7. Theres a free trial for download

  • Anonymous
    January 19, 2009
    Now if they would just include a built-in ISO mount utility with Windows 7.

  • Anonymous
    February 04, 2009
    Dave, Can you mount differencing disks with this? Yeah, I know, I should get 2008 R2 up and running.  Will do soon. Aidan.

  • Anonymous
    May 10, 2009
    Thank you Soooooooo Much for this tip Gotta Love Diskpart!

  • Anonymous
    May 28, 2009
    Way cool - thanks for this Dave!

  • Anonymous
    June 11, 2009
    Nice one Dave, however it looks like it does not support RAW or EFS filesystems which I believe Vhdmount did.  Bummer

  • Anonymous
    October 28, 2009
    Hi, did you have heard about Gizmo drive? It does many of the things that you are discussing here. It's a very handy tool and it's free. http://arainia.com/software/gizmo/overview.php?nID=4

  • Anonymous
    November 09, 2009
    How to make .bat file to attach vhd every time I boot a system?

  • Anonymous
    November 19, 2009
    This post reminds me why I love the internet-thanks a million.

  • Anonymous
    January 19, 2010
    Thanks a lot! Saved me lots of time :)

  • Anonymous
    February 16, 2010
    Joe (& others) you may want to check out ImDisk for working with disk virtual drives,  not sure if it works with Windows 7 or not, but it allows you to mount ISO image files and other 'raw' image files (.bin, .ima, .img, .dsk & more) as virtual drives using the right click context menu, it handles raw images produced from entire physical drives or just images produced from individual partitions (FAT/FAT12/FAT32/NTFS possibly a few more not surethough).  You can get it here: http://www.ltr-data.se/opencode.html#ImDisk

  • Anonymous
    May 06, 2010
    You don't need to do it this way at all!  It is super easy to do using diskmgmt.msc or through manage computer --> disk management.  Once the console is finished loading, click the Action menu, choose Attach VHD, browse to your vhd file and viola! You may need to initialize the disk after it mounts. See, super easy!

  • Anonymous
    August 24, 2010
    The comment has been removed

  • Anonymous
    July 16, 2011
    quisiera saber como desinstalar mi vhd en windows 7 lo elimine y ahora no lo puedo encontrar para sacarlo no me di cuenta me ayudarian gracias

  • Anonymous
    October 05, 2011
    Man, this is awesome! thanks!

  • Anonymous
    July 20, 2014
    For read-only mounts of dynamic VHDs on XP:

    http://www.youtube.com/watch?v=_2xhl_WBzRI

  • Anonymous
    September 24, 2014
    That's really helpful - thank you!

  • Anonymous
    March 04, 2015
    some good suggestions here.... no-one's mentioned 'vhd attach' (yet!)

    re kb 973282

    'Although VHDs appear when you click the Safely Remove Hardware option, you must use the Disk Management Microsoft Management Console (MMC) snap-in to detach VHDs.'

    First thing is fix safely remove for VHD's - http://goo.gl/yUoUJX
    (This is to remove vhd's from 'safely remove list') - additionally (for better identification in devmgmt.msc) FriendlyName can be amended using same process

    VHD Attach is nice because it works. It works faster than diskpart.

    I'm running win 7 native virtualization - I have a DAW, a playground for tweaking away, and a power station for all my MM needs - no dev.station yet.

    All builds are self contained VHDs. Sleep still supported. backup is a simply filecopy!

    Re portable apps, I store these in a localbigstore.vhd (250gb).

    The challenge is loading this BEFORE the kernel!!!

    VHD Attach performs well (as I've said)...

    One thing I'd LOVE TO KNOW ... VHD ATTACH options include adding a 'detach drive' context for drives.

    It's great (you don't have to hunt the vhd down, you just interact with the 'shell objects' in my comp...

    ALAS!! the detach drive context menu entry is for all drives... this is an obvious no no...

    solutions more than welcome, alas highly unlikely.

  • Anonymous
    November 10, 2015
    Can you attach the disk as Read only? I'm sure you can, I'll go and have a look...

  • Anonymous
    February 06, 2016
    Kris, yes! sure you already know, simply append 'readonly' in the attach comand, eg 'attach vdisk readonly'