Windows 10: Mount or Unmount VHD or VHDX File in Windows 10

Discus and support Mount or Unmount VHD or VHDX File in Windows 10 in Windows 10 Tutorials to solve the problem; How to: Mount or Unmount VHD or VHDX File in Windows 10 How to Mount or Unmount VHD and VHDX File in Windows 10 VHD (Virtual Hard Disk) is a file... Discussion in 'Windows 10 Tutorials' started by Old Novice, Mar 30, 2017.

  1. Mount or Unmount VHD or VHDX File in Windows 10


    How to: Mount or Unmount VHD or VHDX File in Windows 10

    How to Mount or Unmount VHD and VHDX File in Windows 10


    VHD (Virtual Hard Disk) is a file format which represents a virtual hard disk drive (HDD). It may contain what is found on a physical HDD, such as disk partitions and a file system, which in turn can contain files and folders. It is typically used as the hard disk of a virtual machine.

    VHDX is a Hyper-V virtual hard disk file format. VHDX has a much larger 64 TB storage capacity than the older VHD format 2TB limit. It also provides data corruption protection during power failures and optimizes structural alignments of dynamic and differencing disks to prevent performance degradation on new, large-sector physical disks.

    When you mount a .vhd or .vhdx file, it will be added as a drive in This PC to open it from.

    This tutorial will show you different ways on how to natively mount or unmount VHD and VHDX virtual hard disk files in Windows 10.

    *note You must be signed in as an administrator to be able to mount and unmount VHD and VHDX files.

    VHD and VHDX files cannot be mounted from removable media that isn't formatted with ReFS file system.



    CONTENTS:

    EXAMPLE: Mounted VHDX file in This PC

    Mount or Unmount VHD or VHDX File in Windows 10 [​IMG]






    OPTION ONE [/i] Directly Mount VHD or VHDX file
    1. Do step 2 or step 3 below for what you would like to do.

    2. Double click/tap on the .vhd or .vhdx file.

    3. Right click or press and hold on the .vhd or .vhdx file, and click/tap on Mount. (see screenshot below)

    Mount or Unmount VHD or VHDX File in Windows 10 [​IMG]






    OPTION TWO [/i] Mount VHD or VHDX file in Disk Management
    1. Open Disk Management (diskmgmt.msc).

    2. Click/tap on Action in the menu bar, and click/tap on Attach VHD. (see screenshot below)

    Mount or Unmount VHD or VHDX File in Windows 10 [​IMG]

    3. Click/tap on Browse, navigate to and select the .vhd or .vhdx file, click/tap on Open, check or uncheck Read-only, and click/tap on OK. (see screenshots below)

    Mount or Unmount VHD or VHDX File in Windows 10 [​IMG]

    4. You can now close Disk Management if you like.





    OPTION THREE [/i] Mount VHD or VHDX file in Windows PowerShell
    *note For more details and options for the Mount-VHD cmdlet, see: Microsoft Docs: Mount-VHD

    This command is only available after installing the Hyper-V Management Tools or Hyper-V feature.

    1. Open an elevated Windows PowerShell.

    2. Type the command below into the elevated Windows PowerShell, and press Enter. (see screenshot below)
    *Arrow Mount-VHD -Path "Full path of .vhd or .vhdx file"

    *note Substitute Full path of .vhd or .vhdx file in the command with the actual full path of the .vhd or .vhdx file you want to mount.

    For example: Mount-VHD -Path "C:\Users\Brink\Desktop\Non-Insider W10.vhdx"



    Mount or Unmount VHD or VHDX File in Windows 10 [​IMG]

    3. You can now close the elevated Windows PowerShell if you like.





    OPTION FOUR [/i] Mount VHD or VHDX file in Command Prompt
    1. Open an elevated command prompt.

    2. Type diskpart into the elevated command prompt, and press Enter. (see screenshot below)

    3. Type the command below into the elevated command prompt, and press Enter.
    *Arrow select vdisk file="Full path of .vhd or .vhdx file"

    *note Substitute Full path of .vhd or .vhdx file in the command with the actual full path of the .vhd or .vhdx file you want to mount.

    For example: select vdisk file="D:\VHD\Example.vhdx"

    4. Type attach vdisk into the elevated command prompt, and press Enter.

    5. You can now close the elevated command prompt if you like.


    Mount or Unmount VHD or VHDX File in Windows 10 [​IMG]






    OPTION FIVE [/i] Unmount VHD or VHDX file using Eject
    1. Open This PC in File Explorer.

    2. Right click or press and hold on the drive for the mounted .vhd or .vhdx file, and click/tap on Eject. (see screenshot below)

    Mount or Unmount VHD or VHDX File in Windows 10 [​IMG]






    OPTION SIX [/i] Unmount All VHD and VHDX files by Restarting Computer
    1. Restart the computer to automatically unmount all VHD and VHDX files at once.





    OPTION SEVEN [/i] Unmount VHD or VHDX file in Disk Management
    1. Open Disk Management (diskmgmt.msc).

    2. Right click or press and hold on the Disk # for the mounted .vhd or .vhdx file, and click/tap on Detach VHD. (see screenshot below)

    Mount or Unmount VHD or VHDX File in Windows 10 [​IMG]

    3. Click/tap on OK to confirm. (see screenshot below)

    Mount or Unmount VHD or VHDX File in Windows 10 [​IMG]

    4. You can now close Disk Management if you like.





    OPTION EIGHT [/i] Unmount VHD or VHDX file in Windows PowerShell
    *note For more details and options for the Dismount-VHD cmdlet, see: Microsoft Docs: Dismount-VHD

    This command is only available after installing the Hyper-V Management Tools or Hyper-V

    1. Open an elevated Windows PowerShell.

    2. Type the commands below one at a time into the elevated Windows PowerShell, and press Enter after each command. Make note of the Disk # and/or file path of the .vhd or .vhdx file you want to unmount. (see screenshot below)
    *Arrow diskpart

    *Arrow list vdisk

    *Arrow exit


    Mount or Unmount VHD or VHDX File in Windows 10 [​IMG]


    3. Do step 4 (disk #) or step 5 (path) for how you want to unmount the .vhd or .vhdx file.



    4. Use Disk # in PowerShell to Unmount VHD or VHDX file
    A) Type the command below into the elevated Windows PowerShell, press Enter, and go to step 6 below. (see screenshot below)

    *Arrow Dismount-VHD -DiskNumber #

    *note Substitute # in the command above with actual disk number (ex: 2) from step 2 above.

    For example: Dismount-VHD -DiskNumber 2



    Mount or Unmount VHD or VHDX File in Windows 10 [​IMG]



    5. Use File Path in PowerShell to Unmount VHD or VHDX file
    A) Type the command below into the elevated Windows PowerShell, press Enter, and go to step 6 below. (see screenshot below)

    *Arrow Dismount-VHD -Path "Full path of .vhd or .vhdx file"

    *note Substitute Full path of .vhd or .vhdx file in the command above with actual full file path from step 2 above.

    For example: Dismount-VHD -Path "C:\Users\Brink\Desktop\Non-Insider W10.vhdx"



    Mount or Unmount VHD or VHDX File in Windows 10 [​IMG]

    6. You can now close Windows PowerShell if you like.





    OPTION NINE [/i] Unmount VHD or VHDX file in Command Prompt
    1. Open an elevated command prompt.

    2. Type diskpart into the elevated command prompt, and press Enter. (see screenshot below)

    3. Type list vdisk into the elevated command prompt, press Enter, and make note of the attached VHD or VHDX file path (ex: "D:\VHD\Example.vhdx") you want to unmount.

    4. Type the command below into the elevated command prompt, and press Enter.
    *Arrow select vdisk file="Full path of .vhd or .vhdx file"

    *note Substitute Full path of .vhd or .vhdx file in the command with the actual full path of the .vhd or .vhdx file from step 3 you want to unmount.

    For example: select vdisk file="D:\VHD\Example.vhdx"

    5. Type detach vdisk into the elevated command prompt, and press Enter.

    6. You can now close the elevated command prompt if you like.


    Mount or Unmount VHD or VHDX File in Windows 10 [​IMG]


    That's it,
    Shawn


    Related Tutorials

    :)
     
    Old Novice, Mar 30, 2017
    #1
  2. Greg Carmack - Windows MVP, Mar 30, 2017
    #2
  3. BulldogXX Win User
    Restoring files from system image

    A .vhdx extension means the image was originally created by Microsoft's Hyper-V image utility. The 'x' means it's a second generation image, but that's irrelevent here.

    The procedure has three parts:

    • mount the image
    • copy the files you want to copy
    • unmount the image.

    You should sign in to an account with Administrator permissions to do this.

    Follow these directions: Disk Management -
    How to Mount and Unmount VHD Images
     
    BulldogXX, Mar 30, 2017
    #3
  4. Brink
    Brink New Member

    Mount or Unmount VHD or VHDX File in Windows 10

    Brink, Mar 30, 2017
    #4
  5. Hi, and thanks for your reply.

    There is no problem with File Backups. It is the System Image Backup .vhdx file which I am trying to view, using it to mount a VHD (Drive M*Smile which appears empty to File Manager. As you suggested I had a good look at the W7 tutorial for file mounting, and explored some of its links, but to no avail.

    I also tried to mount the VHD with Diskpart from elevated command prompt: Diskpart; select vdisk file=filename.vhdx; attach vdisk. There was no need to assign a drive letter as Windows remembered it, which is annoying. M: was again empty.

    Then, Windows PowerShell: Mount-VHD -Path "[location of vhd]". This cmdlet failed with error message "Mount-VHD is not recognised as the name of a cmdlet ...". Googling this, I found this could be due to the absence of a Hyper-V module for Windows PowerShell. Now, I know that Hyper-V Virtualization does not come with W10 Home but does with W10 Pro. Could my problem be related? Could it be that the image file is vdhx rather than vdh which I assume was the format in W7? I am out of my depth here, and don't want to experiment without advice.

    Out of interest I checked UEFI Bios and found Virtualisation Technology to be disabled, and Hyper-V missing from the Programs and Features list in Control Panel. With some trepidation I tried Enabling Virtualisation. Programs and Features list was unchanged, as was the PowerShell outcome and the zero content of M: after attaching via Disk Management. I returned Virtualisation to Disabled.

    Drive M:'s properties show its partition type to be GUID, not MBR.

    Grateful for any further thoughts. Thanks.
     
    Old Novice, Apr 1, 2017
    #5
  6. Brink
    Brink New Member
    Just to verify, are you sure that you are trying to mount the correct largest VHD from the system image?
     
    Brink, Apr 1, 2017
    #6
  7. Yes. There are three .vhdx files in the image backup folder:

    <GUID Filename.vhdx>: (C: Drive, I assume) 75,845,632 KB The one I've been using.
    <GUID Filename.vhdx>: (Windows Recovery, I assume) 526,336 KB
    Esp.vhdx: (EFI System Partition) 110,592 KB
    However, this morning I discovered some new information which I think might be helpful. My initial backup drive was a Seagate 2TB Expansion Drive in use for over a year, but never really tested except for checking the backup files were readable in File Manager, but not the image files. A couple of weeks ago I dropped this drive and Windows Backup would no longer accept it, and it didn't pass the Long Generic test by SeaTools for Windows, although chkdsk /scan reported no problems with the files or file structure, so I hope they might be recoverable. I replaced the drive with a Seagate 2 TB Backup Plus Slim which I first checked with chkdsk and Seatools for Windows. The above file sizes come from the new drive.

    This morning I tried to attach a VHD using the .vdhx file from the old drive, and it worked!

    While this might point to a fault in the new drive, I wonder if it matters that the old drive is 4096 bits/sector and the new drive 512. I think I recall reading somewhere that W7 would automatically change from .vhd files to .vhdx if the drive were 4096. Could there be some confusion in my machine due to this change affecting the Attach process?

    I hope this is not a red herring.
     
    Old Novice, Apr 2, 2017
    #7
  8. Brink
    Brink New Member

    Mount or Unmount VHD or VHDX File in Windows 10

    Dropping the drive does indeed sound like the cause of a drive error affecting this.

    You might see if you are able to run Check Disk on the drive using the Repair drive option (if available) to see if that may help to with any bad sectors to hopefully be able to copy and read the .vhdx file from it afterwards.
     
    Brink, Apr 2, 2017
    #8
  9. Hi Brink
    Firstly, apologies that my last post was ambiguous. It was the old drive I had dropped that I was able to mount from and its replacement that I'm having trouble with.

    I did run chkdsk on both drives again, including the /f option on the new drive. Even though the dropped (old) drive is unaccepted by Windows Backup its existing files appear to be OK. So I succeeded in copying an old backup .vhdx file from the old drive to a new folder on the new drive. I could successfully mount the file from the old drive (to VHD N*Smile, but not its copy from the new drive (to VHD M*Smile; when trying to view M: from File Manager, I was still getting zero contents. It was while staring perplexedly at the Disk Management screen that I realised what was wrong, and I am very red-faced about it.

    In previous posts I mentioned that after initially assigning the drive letter M, future attempted attachments using the same file were automatically attached as M. I had just been accepting that, I guess without bothering to look carefully at the screen. It turned out that M had been assigned to the wrong VHD partition - the one at the right-hand side of the graphical display - and I had not picked it up. After correcting that everything works fine and I no longer have a problem. I also discovered that I can remove that ongoing association with the drive letter if, before detaching, I right click the (correct) VHD partition, choose the Change Drive Letter option and click Remove. I still think it would be helpful if you added a bit about this in this tutorial.

    So I do apologise for taking up your time; the upside of the exercise for me has been that I have learnt a lot and am now a member of 10 Forums.

    Regards and best wishes.
     
    Old Novice, Apr 4, 2017
    #9
  10. Brink
    Brink New Member
    That's great news Old Novice. I'm glad you got it sorted. *Smile

    No need to apologize. It happens to all of us.
     
    Brink, Apr 4, 2018
    #10
Thema:

Mount or Unmount VHD or VHDX File in Windows 10

Loading...
  1. Mount or Unmount VHD or VHDX File in Windows 10 - Similar Threads - Mount Unmount VHD

  2. I cannot mount VHDX File

    in Windows 10 Installation and Upgrade
    I cannot mount VHDX File: I've created an image file with Windows Backup on an external drive. When I right-click on the file and try "Mount", I get "Couldn't mount file" and a long statement about initializing, partitions, etc.Using disk management does not help either. I'm able to attach the file,...
  3. Trying to exclude Read-Only Mounted VHD\VHDX drives mounted in a directory

    in AntiVirus, Firewalls and System Security
    Trying to exclude Read-Only Mounted VHD\VHDX drives mounted in a directory: Disks are mounted read-only in C:\FADIA-T\VHDM\folder\0\ I've added exclusions for C:\FADIA-T\VHDM\*\*\*\* Using MPCmdRun.exe -CheckExclusion -path "C:\FADIA-T\VHDM\folder\ Using MPCmdRun.exe -CheckExclusion -path "C:\FADIA-T\VHDM\folder\0 each shows excluded...
  4. Error in mounting VHDX file

    in Windows 10 Network and Sharing
    Error in mounting VHDX file: Hi, I have Created a VHDX file Ihave stored so many important files in it today when i try to open it is saying Make sure the file is in an NTFS volume and isn't in a compressed folder or volume [IMG] i have seen in properties when i try to unchuck the compress...
  5. How to Mount or Unmount VHD or VHDX (Virtual Hard Disk) File in Windows 10

    in Windows 10 News
    How to Mount or Unmount VHD or VHDX (Virtual Hard Disk) File in Windows 10: [ATTACH] [ATTACH]In this post, we will show you different ways using which you can natively mount or unmount VHD and VHDX virtual hard disk files in Windows 10. VHD and VHDX files cannot be mounted from removable media that isn’t formatted [...] This post How to Mount or...
  6. Mount a VHD? How?

    in Windows 10 Drivers and Hardware
    Mount a VHD? How?: I used VirtualBox to create a 640MB VHD (virtual hard disk) named 'Palemoon portable (Linux).vhd'. (Note that the VHD is not a VDI.) I need to format it, but first, I need to mount it. But when I attempt to mount it (as Administrator) via Disk Managment's 'Action' 'Attach...
  7. Bitlocker VHD not mounting

    in Windows 10 Network and Sharing
    Bitlocker VHD not mounting: When I try to mount my bitlocker-encrypted VHD file, I get the following error message: Couldn't Mount File, Make sure the file is in NTFS volume and isn't a compressed folder or volume When I previously and successfully mounted the vhd, I was prompted for the BitLocker...
  8. Auto-Mount VHD or VHDX File at Startup in Windows 10

    in Windows 10 Tutorials
    Auto-Mount VHD or VHDX File at Startup in Windows 10: How to: Auto-Mount VHD or VHDX File at Startup in Windows 10 How to Auto-Mount VHD or VHDX File at Startup in Windows 10 VHD (Virtual Hard Disk) is a file format which represents a virtual hard disk drive (HDD). It may contain what is found on a physical HDD, such as...
  9. Create and Set Up New VHD or VHDX File in Windows 10

    in Windows 10 Tutorials
    Create and Set Up New VHD or VHDX File in Windows 10: How to: Create and Set Up New VHD or VHDX File in Windows 10 How to Create and Set Up New VHD or VHDX File in Windows 10 VHD (Virtual Hard Disk) is a file format which represents a virtual hard disk drive (HDD). It may contain what is found on a physical HDD, such as...
  10. Mount or Unmount ISO and IMG file in Windows 10

    in Windows 10 Tutorials
    Mount or Unmount ISO and IMG file in Windows 10: How to: Mount or Unmount ISO and IMG file in Windows 10 How to Mount or Unmount ISO and IMG Files in Windows 10 [img] Information An ISO or IMG file, also called a disc image, is a single file that’s a copy of an entire data CD or DVD. When you mount an .ISO or...

Users found this page by searching for:

  1. how to unmount a file in W10 virtual drive?

    ,
  2. win 10 mount vhd

    ,
  3. mount vhd from network share windows 10

    ,
  4. VHD or VHDX File - Mount and Attach in Windows 10,
  5. unmount vhd post windows installation on vhd using dsm