Windows 10: Create and Set Up New VHD or VHDX File in Windows 10

Discus and support Create and Set Up New VHD or VHDX File in Windows 10 in Windows 10 Tutorials to solve the problem; 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)... Discussion in 'Windows 10 Tutorials' started by Mark Beckitt, Jul 12, 2018.

  1. 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 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.

    You can choose to have a fixed size or dynamically expanding VHD or VHDX file.
    • Fixed size = This type of disk provides better performance. The virtual hard disk file is allocated to its maximum size when the virtual hard disk is created.
    • Dynamically expanding = This type of disk provides better use of physical storage space. The virtual hard disk file grows to its maximum size as data is written to the virtual hard disk.
    Once you have the new .vhd or .vhdx file created and setup, you can copy or move it to any Windows 10 PC you want to mount it on.

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

    This tutorial will show you how to create and set up (initialized and formatted) a new VHD and VHDX virtual hard disk file in Windows 10.

    *note You must be signed in as an administrator to be able to create and set up a VHD and VHDX file.


    CONTENTS:
    • Option One: Create New VHD or VHDX file in Disk Management
    • Option Two: Create New VHD or VHDX file in Hyper-V Manager
    • Option Three: Create New VHD or VHDX file in PowerShell
    • Option Four: Create New VHD or VHDX file in Command Prompt
    • Option Five: Set Up New VHD or VHDX file in Disk Management
    • Option Six: Set Up New VHD or VHDX file in Command Prompt or PowerShell




    OPTION ONE [/i] Create New 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 Create VHD. (see screenshot below)

    Create and Set Up New VHD or VHDX File in Windows 10 [​IMG]

    3. Click/tap on the Browse button. (see screenshots below)

    4. Navigate to and select and open the location (folder or drive) where you want to create and save the .vhd or .vhdx file at, type a file name you want, and click/tap on Save.

    5. Enter a size (ex: "1 GB") you want for the virtual hard disk.

    6. Select (dot) VHD or VHDX for what virtual hard disk format you want.

    7. Select (dot) Fixed size or Dynamically expanding for the virtual hard disk type you want.

    8. Click/tap on OK.

    9. Do Option Five (Disk Management) or Option Six (command) for how you would like to set up this new .vhd or .vhdx file.


    Create and Set Up New VHD or VHDX File in Windows 10 [​IMG]






    OPTION TWO [/i] Create New VHD or VHDX file in Hyper-V Manager
    1. Open Hyper-V Manager (virtmgmt.msc).

    2. Click/tap on a virtual machine server (ex: "BRINKW10DESKTOP") in the left pane, click/tap on New in the Actions right pane and click/tap on Hard Disk. (see screenshot below)

    Create and Set Up New VHD or VHDX File in Windows 10 [​IMG]

    3. Click/tap on Next. (see screenshot below)

    Create and Set Up New VHD or VHDX File in Windows 10 [​IMG]

    4. Select (dot) VHD or VHDX for what virtual hard disk format you want, and click/tap on Next. (see screenshot below)

    Create and Set Up New VHD or VHDX File in Windows 10 [​IMG]

    5. Select (dot) Fixed size or Dynamically expanding for the virtual hard disk type you want, and click/tap on Next. (see screenshot below)

    Create and Set Up New VHD or VHDX File in Windows 10 [​IMG]

    6. Enter a name you want for the .vhd or .vhdx file, browse to and select the location for where you want to create and save the .vhd or .vhdx file at, and click/tap on Next. (see screenshot below)

    Create and Set Up New VHD or VHDX File in Windows 10 [​IMG]

    7. Select (dot) Create a new blank virtual hard disk, enter a size (ex: "1 GB") you want for the virtual hard disk, and click/tap on Next. (see screenshot below)

    Create and Set Up New VHD or VHDX File in Windows 10 [​IMG]

    8. Verify everything is correct, and click/tap on Finish when ready. (see screenshot below)

    Create and Set Up New VHD or VHDX File in Windows 10 [​IMG]

    9. Do Option Five (Disk Management) or Option Six (command) for how you would like to set up this new .vhd or .vhdx file.





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

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

    1. Open an elevated PowerShell.

    2. Type the command below for what type of .vhd or .vhdx file you want to create into the elevated PowerShell, and press Enter. (see screenshot below)
    (create new fixed VHD or VHDX file)
    *Arrow New-VHD -Path "Full path of .vhd or .vhdx location" -Fixed -SizeBytes <size>

    OR

    (create new dynamic VHD or VHDX file)
    *Arrow New-VHD -Path "Full path of .vhd or .vhdx location" -Dynamic -SizeBytes <size>


    *note Substitute Full path of .vhd or .vhdx file in the command above with the actual full path of the .vhd or .vhdx file for where you want to create and save it at.

    Substitute <size> in the command above with the maximum size (ex: "1GB") you want for the .vhd or .vhdx file. This can be expressed as in MB, GB, or TB.

    For example: New-VHD -Path "D:\VHD\Example.vhdx" -Fixed -SizeBytes 1GB



    Create and Set Up New VHD or VHDX File in Windows 10 [​IMG]

    3. Do Option Five (Disk Management) or Option Six (command) for how you would like to set up this new .vhd or .vhdx file.





    OPTION FOUR [/i] Create New VHD or VHDX file in Command Prompt
    *note For more details and usage options for the create vdisk command, see: Create vdisk | Microsoft Docs
    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 for what type of .vhd or .vhdx file you want to create into the elevated command prompt, and press Enter.
    (create new fixed VHD or VHDX file)
    *Arrow create vdisk file="Full path of .vhd or .vhdx location" maximum=<size> type=fixed

    OR

    (create new dynamic VHD or VHDX file)
    *Arrow create vdisk file="Full path of .vhd or .vhdx location" maximum=<size> type=expandable


    *note Substitute Full path of .vhd or .vhdx file in the command above with the actual full path of the .vhd or .vhdx file for where you want to create and save it at.

    Substitute <size> in the command above with the maximum size (ex: "1024") in megabytes (1GB = 1024MB) you want for the .vhd or .vhdx file.

    For example: create vdisk file="D:\VHD\Example.vhdx" maximum=1024 type=fixed



    Create and Set Up New VHD or VHDX File in Windows 10 [​IMG]

    4. Do Option Five (Disk Management) or Option Six (command) for how you would like to set up this new .vhd or .vhdx file.





    OPTION FIVE [/i] Set Up New VHD or VHDX file in Disk Management
    1. Open the new blank .vhd or .vhdx file created using Option One (Disk Management), Option Two (Hyper-V Manager), Option Three (PowerShell), or Option Four (command prompt). (see screenshot below)

    *note This will add the new virtual hard disk as an unknown (not initialized) unallocated disk in Disk Management.

    Create and Set Up New VHD or VHDX File in Windows 10 [​IMG]

    2. Click/tap on OK in the Couldn't Mount File error message. (see screenshot below)

    Create and Set Up New VHD or VHDX File in Windows 10 [​IMG]

    3. Open Disk Management (diskmgmt.msc).

    4. Right click on the unknown disk (ex: "Disk 3") for the unallocated virtual hard disk, and click/tap on Initialize Disk. (see screenshot below)

    Create and Set Up New VHD or VHDX File in Windows 10 [​IMG]

    5. In the Initialize Disk dialog, select (dot) MBR or GPT for the partition style you want for virtual hard disk, and click/tap on OK. (see screenshot below)

    Create and Set Up New VHD or VHDX File in Windows 10 [​IMG]

    6. In the Disk Management, right click or press and hold on the unallocated disk for the virtual hard disk, and click/tap on New Simple Volume. (see screenshot below)

    Create and Set Up New VHD or VHDX File in Windows 10 [​IMG]

    7. In the New Simple Volume Wizard dialog, click/tap on Next. (see screenshot below)

    Create and Set Up New VHD or VHDX File in Windows 10 [​IMG]

    8. Make sure the Simple volume size is the same size as Maximum disk space (ex: 1021), and click/tap on Next. (see screenshot below)

    Create and Set Up New VHD or VHDX File in Windows 10 [​IMG]

    9. Select (dot) Assign the following drive letter, select a drive letter (ex: "F") you want in the drop menu for the virtual hard disk, and click/tap on Next. (see screenshot below)

    *note If you only want to set up the virtual hard disk without mounting it right now, you can select (dot) Do not assign a drive letter or drive path instead.

    Create and Set Up New VHD or VHDX File in Windows 10 [​IMG]

    10. Select (dot) Format this volume with the following settings, select the mounted virtual hard disk name, and click/tap on Next. (see screenshot below)

    Create and Set Up New VHD or VHDX File in Windows 10 [​IMG]

    11. Click/tap on Finish. (see screenshot below)

    Create and Set Up New VHD or VHDX File in Windows 10 [​IMG]

    12. You can now close Disk Management if you like. (see screenshot below)

    Create and Set Up New VHD or VHDX File in Windows 10 [​IMG]

    13. You can now mount and unmount this .vhd or .vhdx file on any Windows 10 PC you like. (see screenshot below)

    Create and Set Up New VHD or VHDX File in Windows 10 [​IMG]






    OPTION SIX [/i] Set Up New VHD or VHDX file in Command Prompt or PowerShell
    1. Open an elevated PowerShell console window.

    2. Type diskpart into the console window, and press Enter. (see screenshot below step 8)

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

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

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

    4. Copy and paste attach vdisk into the console window, and press Enter.

    5. Copy and paste create partition primary into the console window, and press Enter.

    6. Type the command below for the file system and friendly name you want for the virtual hard disk, and press Enter.
    (To format virtual hard disk with FAT file system)
    *Arrow format fs=FAT label="FriendlyName" quick

    OR

    (To format virtual hard disk with FAT32 file system)
    *Arrow format fs=FAT32 label="FriendlyName" quick

    OR

    (To format virtual hard disk with NTFS file system)
    *Arrow format fs=NTFS label="FriendlyName" quick


    *note Substitute Friendly Name in the command above with what you want for the mounted virtual hard disk name.

    For example: format fs=NTFS label="Example VHDX" quick


    7. Type the command below for the drive letter you want assigned to the virtual hard disk, and press Enter.
    (To let Windows automatically assign an available drive letter to virtual hard disk)
    *Arrow assign

    OR

    (To assign a specific drive letter to virtual hard disk)
    *Arrow assign letter=<Drive Letter>


    *note Substitute <Drive Letter> in the command above with the actual drive letter (ex: "F") you want assigned to this mounted virtual hard disk.

    For example: assign letter=F

    8. You can now close the console window if you like. (see screenshot below)

    Create and Set Up New VHD or VHDX File in Windows 10 [​IMG]

    9. You can now mount and unmount this .vhd or .vhdx file on any Windows 10 PC you like. (see screenshot below)

    Create and Set Up New VHD or VHDX File in Windows 10 [​IMG]


    That's it,
    Shawn


    Related Tutorials

    :)
     
    Mark Beckitt, Jul 12, 2018
    #1
  2. Brink Win User

    Create Elevated Task to Auto-Mount VHD or VHDX File at Startup

    Correct. It will prompt for the BitLocker password to unlock it once you are signed in and on your desktop.

    Create BitLocker Encrypted Container File with VHD or VHDX in Windows
     
    Brink, Oct 27, 2019
    #2
  3. tracit99 Win User
    Hyper-V - Create and Use VHD of Windows 10 with Disk2VHD  


    Kari, have you tried this tutorial lately? I am getting an error at step 3.2 when I try to mount the created vhdx file.


    Create and Set Up New VHD or VHDX File in Windows 10 [​IMG]


    I am using Windows 14393.953 on a UEFI/GPT configuration. It shows to be offline in Disk Management.


    Create and Set Up New VHD or VHDX File in Windows 10 [​IMG]


    Thought maybe vhdx file didn't create properly so I tried creating twice more with the same results.
     
    tracit99, Oct 27, 2019
    #3
  4. Create and Set Up New VHD or VHDX File in Windows 10

    Mount or Unmount VHD or VHDX File in Windows 10


    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 MCreate and Set Up New VHD or VHDX File in Windows 10 :) 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, Oct 27, 2019
    #4
  5. tfwul Win User
    Create Elevated Task to Auto-Mount VHD or VHDX File at Startup

    Thanks a lot for this splendid manual.

    Wonder what will happen when the VHD is Bitlocker encrypted.
    See tutorial: "How to Create BitLocker Encrypted Container File with a VHD or VHDX File in Windows"
    Will it start and but prompt user for the credentials?

    Thanks.
     
    tfwul, Oct 27, 2019
    #5
  6. How to install vhdx image onto win 10 new computer


    Hello. I'm also trying to boot to a VHDX file from a USB drive.

    I successfully did the steps above (for x64). However when I reboot, the VHDX is no longer attached! Is there a way to attach the VHDX prior to selecting it from the boot menu?
     
    Day Trooper, Oct 27, 2019
    #6
Thema:

Create and Set Up New VHD or VHDX File in Windows 10

Loading...
  1. Create and Set Up New VHD or VHDX File in Windows 10 - Similar Threads - Create Set VHD

  2. Bitdefender VHD/VHDX compared to other 3rd party software

    in AntiVirus, Firewalls and System Security
    Bitdefender VHD/VHDX compared to other 3rd party software: I've spent an awful lot of time searching on Internet for a decent (and recent) comparison review on Bitdefender container encryption (VHD/VHDX) versus other 3rd party software such as VeraCrypt, AxCrypt, BestCrypt, etc. Except for a wiki document I haven't found anything....
  3. 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...
  4. How to create and set up new VHD or VHDX File in Windows 10

    in Windows 10 News
    How to create and set up new VHD or VHDX File in Windows 10: [ATTACH] [ATTACH]Today, we will see how to create and set up (initialized and formatted) a new VHD and VHDX virtual hard disk file in Windows 10 using Disk Management. But before we begin, we will see what is a VHD and [...] This post How to create and set up new VHD or VHDX...
  5. How to BitLocker encrypt a VHD or VHDX Container file in Windows 10

    in Windows 10 News
    How to BitLocker encrypt a VHD or VHDX Container file in Windows 10: [ATTACH] [ATTACH]You can use BitLocker to encrypt a VHD or VHDX (Virtual Hard Disk) file mounted as a drive. In this post, we will show you how to create a portable BitLocker encrypted container file using a mounted VHD or VHDX [...] This post How to BitLocker encrypt a VHD...
  6. how to resize a vhd file?

    in Windows 10 Network and Sharing
    how to resize a vhd file?: so I was experimenting with vhd files and I wanted to resize a vhd file so that I could add in more partitions. basically, I just wanted to put two vhd files together as a partition but can't so I copied one of the vhd files using VirtualBox and then extend the copy and...
  7. Creating a New File Folder in Windows 10

    in Windows 10 Network and Sharing
    Creating a New File Folder in Windows 10: After the recent update, I can't seem to create a new file folder. Normally I just right click on the display and new folder options appear with other options, but now it's missing? How do I get it done now?...…….....
  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 BitLocker Encrypted Container File with VHD or VHDX in Windows

    in Windows 10 Tutorials
    Create BitLocker Encrypted Container File with VHD or VHDX in Windows: How to: Create BitLocker Encrypted Container File with VHD or VHDX in Windows How to Create BitLocker Encrypted Container File with a VHD or VHDX File in Windows You can use BitLocker Drive Encryption to help protect your files on an entire drive. BitLocker can help...
  10. Mount or Unmount VHD or VHDX File in Windows 10

    in Windows 10 Tutorials
    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...