Native Boot allows you to create a virtual hard disk (VHDX), install Windows to it, and then boot it up, either on your PC side-by-side with your existing installation, or on a new device.
A native-boot VHDX can be used as the running operating system on designated hardware without any other parent operating system. This differs from a scenario where a VHDX is connected to a virtual machine on a computer that has a parent operating system.
Native boot for Windows 10 or later requires the .vhdx format, not the .vhd format.
VHDXs can be applied to PCs or devices that have no other installations of Windows, without a virtual machine or hypervisor. (A hypervisor is a layer of software under the operating system that runs virtual computers.) This enables greater flexibility in workload distribution because a single set of tools can be used to manage images for virtual machines and designated hardware.
You can also deploy the VHDX to a PC that already has Windows installed on it, and use a boot menu to select between the existing version of Windows, or the version on the VHD.
To learn more about using VHDXs in an enterprise environment, see Understanding Virtual Hard Disks with Native Boot.
Prerequisites
- A technician PC with the Windows Assessment and Deployment Kit (Windows ADK) tools installed on it.
- A generalized Windows image (.WIM file). To learn more, see Sysprep (Generalize) a Windows installation.
- A bootable Windows PE drive. To learn more, see WinPE: Create USB Bootable drive.
- A destination PC or device on which to install the VHDX. This device requires 30 gigabytes (GB) or more of free disk space. You can install the VHDX to a device already running other operating system installations, or as the only operating system on a device.
Step 1: Create a VHDX from diskpart
On the technician PC:
-
From the Command Prompt, open Diskpart.
diskpart
-
Create and prepare a new VHDX. In this example, we create a 25 GB fixed-type VHDX.
create vdisk file=C:windows.vhdx maximum=25600 type=fixed
-
Attach the VHDX. This adds the VHDX as a disk to the storage controller on the host.
attach vdisk
-
Create a partition for the Windows files, format it, and assign it a drive letter. This drive letter will appear in File Explorer.
create partition primary format quick label=vhdx assign letter=v
-
Exit Diskpart
exit
Step 2: Apply a Windows image to the VHD
On your technician PC, apply a generalized Windows image to the primary partition of the VHDX that you created and attached in Step 1.
Dism /Apply-Image /ImageFile:install.wim /index:1 /ApplyDir:V:
Step 3: Detach the VHD, copy it to a new device, and attach it (optional)
You can deploy the VHDX to a device that already has a copy of Windows installed on it, or you can clean and prepare the destination PC’s hard drive to use the VHD.
Detach the VHDX and save it to a network share or storage drive
-
Use diskpart to detach the virtual disk from your technician PC.
diskpart select vdisk file=C:windows.vhdx detach vdisk exit
-
Copy the VHDX to a network share or removable storage drive. The following maps a drive letter to a network share, creates a directory for the VHD, and then copies the VHD.
net use n: servershare md N:VHDs copy C:windows.VHDX n:VHDs
Clean and prepare a new device for native boot
On your destination PC:
-
Use your bootable WinPE key to boot the destination PC to WinPE.
-
Clean and prepare the destination PC’s hard drive. Create a system partition (S), and a main partition (M) where the VHDX will be stored.
UEFI:
diskpart select disk 0 clean convert gpt rem == 1. System partition ========================= create partition efi size=100 format quick fs=fat32 label="System" assign letter="S" rem == 2. Microsoft Reserved (MSR) partition ======= create partition msr size=128 rem == 3. Main partition =========================== create partition primary format quick fs=ntfs label="Main" assign letter="M" exit
BIOS:
diskpart select disk 0 clean rem == 1. System partition ====================== create partition primary size=100 format quick fs=ntfs label="System" assign letter="S" active rem == 2. Main partition ======================== create partition primary format quick fs=ntfs label="Main" assign letter="M" exit
-
Connect to the network drive or storage location where you copied the VHDX in step 3.2.
net use N: servershare
-
Copy the VHDX from the network drive or storage location to the destination PC’s main partition.
copy N:VHDsWindows.vhdx M:
Attach the VHDX
-
While still booted into WinPE, attach your VHDX to the destination PC.
diskpart select vdisk file=M:windows.vhdx attach vdisk
-
Identify the attached VHDX’s volume letter. (Optional: Change it to another letter that makes more sense, for example V, and leave the diskpart command line open for the next step).
list volume select volume 3 assign letter=v
Step 4: Add a boot entry
-
From your destination PC, open Diskpart (if necessary) and identify the drive letters of the VHDX and the system partition, for example, V and S.
diskpart list volume exit
-
Add a boot entry to the device. You can add multiple VHDX files using this method.
UEFI:
V: cd v:windowssystem32 bcdboot v:windows /s S: /f UEFI
BIOS:
V: cd v:windowssystem32 bcdboot v:windows /s S: /f BIOS
-
Remove the WinPE USB key.
- How to Make a Discord Channel Read Only
- Top 3 Ways to Fix Dolby Digital Plus Not Working Issue after Windows 10 Upgrade
- How to Hide the Games You’re Playing on Steam
- How to Fix Outlook Error: The Operation Cannot Be Performed? [Partition Magic]
- How to Make a Program Open on a Certain Monitor?
Read also:
-
Restart the destination PC.
If there’s only one boot entry, the device immediately boots to Windows. If there’s more than one boot entry, you’ll see a boot menu where you can choose between the available versions of Windows on the device.
Understanding Virtual Hard Disks with Native Boot
BCDboot Command-Line Options
— Update: 11-03-2023 — us.suanoncolosence.com found an additional article How to create and set up new VHD or VHDX File in Windows 11/10 from the website www.thewindowsclub.com for the keyword create and set up new vhd or vhdx file in windows 10.
Today, we will see how to create and set up (initialized and formatted) a new VHD and VHDX virtual hard disk file in Windows 11/10 using Disk Management. But before we begin, we will see what is a VHD and VHDX.
What is VHD and VHDX
- VHD (Virtual Hard Disk) is a file format that 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 set up, 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.
Create a new VHD or VHDX file in Windows 11/10
- Press Windows key + R. In the Run dialog box, type diskmgmt.msc, hit Enter to open Disk Management.
- Click Action in the menu bar, and click Create VHD.
- On the dialog that pops up, click the Browse button.
- 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 Save.
- Enter a size (eg: “1 GB”) you want for the virtual hard disk.
- Select the radio button for VHD or VHDX for what virtual hard disk format you want.
- Select the radio button for Fixed size or Dynamically expanding for the virtual hard disk type you want.
- Click OK.
You have now successfully created a VHD or VHDX file.
How to set up new VHD or VHDX file via Disk Management
1. Open the new blank .vhd or .vhdx file you created.
This will add the new virtual hard disk as an unknown (not initialized) unallocated disk in Disk Management.
2. Click OK in the Couldn’t Mount File error message prompt.
3. Open Disk Management (Press Win + R. Type diskmgmt.msc in the box, hit Enter).
4. Right-click on the unknown disk (eg: “Disk 1”) for the unallocated virtual hard disk, and click Initialize Disk.
5. In the Initialize Disk dialog, select the radio button for MBR or GPT for the partition style you want for virtual hard disk, and click OK.
6. In the Disk Management, right-click the unallocated disk for the virtual hard disk, and click New Simple Volume.
7. In the New Simple Volume Wizard dialog, click Next.
8. Make sure the Simple volume size is the same size as Maximum disk space (eg: 1021), and click Next.
9. Select the radio button for Assign the following drive letter, select a drive letter (eg: “E”) you want in the drop menu for the virtual hard disk, and click Next.
If you only want to set up the virtual hard disk without mounting it right now, you can select the radio button for Do not assign a drive letter or drive path instead.
10. Select the radio button for Format this volume with the following settings, select the file system (eg: NTFS) you want for the virtual hard disk, type a volume label (eg: “Lab VHD”) you want for the mounted virtual hard disk name, and click Next.
- How to Fix Chrome Sync Bookmarks Not Working Issue
- How to Resolve Outlook Reminder Not Working Issue?
- How to Measure Your PC’s Power Consumption
- How to Fix the Windows Feedback Hub When It’s Not Working
- Windows admins frustrated by Quick Assist moving to Microsoft Store
Read more:
11. Click Finish.
You can now exit Disk Management.
You have successfully set up a VHD or VHDX file which you can now mount and unmount on any Windows 10 system.
We hope you find this tutorial on how to create and set up a new VHD or VHDX File in Windows 10.
How do I create a VHDX file in Windows 11/10?
To create a VHDX file in Windows 11/10, you need to open the Disk Management panel first. Then, click on the Action menu and select the Create VHD option. Next, click the Browse button, select a path where you want to save the VHDX file, enter a name, and click the Save button. Next, choose the file size and choose the VHDX format. Finally, select the hard disk type and click the OK button.
How to create VHD and VHDX?
As said earlier, it is required to use the Disk Management panel to create a VHD or VHDX file on Windows 11/10 PC. You can go to the Action section to select the Create VHD option. Then, choose a path, give it a name, and click on the Save button. Following that, you need to enter a size, and hard disk type and click the OK button to save all the changes.
All the best!
— Update: 19-03-2023 — us.suanoncolosence.com found an additional article Create a New VHD or VHDX File in Windows 10 from the website winaero.com for the keyword create and set up new vhd or vhdx file in windows 10.
How to Create a New VHD or VHDX File in Windows 10
Windows 10 supports virtual drives natively. It is able to recognize and use ISO, VHD and VHDX files. For ISO files, Windows 10 creates a virtual disk drive. For VHD and VHDX files, Windows 10 creates a new drive accessible via the This PC folder in File Explorer. Also, these files can be used in Hyper-V machines. Today we will review various methods that you can use to create a new VHD or VHDX file.
The Virtual Hard Disk (VHD) file format allows encapsulation of the hard disk into an individual file for use by the operating system as a virtual disk in all the same ways physical hard disks are used. These virtual disks are capable of hosting native file systems (NTFS, FAT, exFAT, and UDFS) while supporting standard disk and file operations. The maximum size of a VHD file is 2,040 GB.
VHDX is a new version of the VHD format which has a much larger storage capacity than the older VHD format. 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. It supports for virtual hard disk storage capacity of up to 64 TB.
Windows 10 supports two virtual disk types:
- Fixed—The VHD image file is pre-allocated on the backing store for the maximum size requested.
- Expandable—Also known as “dynamic”, “dynamically expandable”, and “sparse”, the VHD image file uses only as much space on the backing store as needed to store the actual data the virtual disk currently contains. When creating this type of virtual disk, the VHD API does not test for free space on the physical disk based on the maximum size requested, therefore it is possible to successfully create a dynamic virtual disk with a maximum size larger than the available physical disk free space.
There are a number of methods you can use to create a new VHD or VHDX file in Windows 10. After that, you can assign it to a virtual machine or mount to the running system.
To Create a New VHD or VHDX File in Windows 10
- Press the Win + X keys together the keyboard.
- From the menu, select Disk Management.
- In Disk Management, select Action > Create VHD from the menu.
- Click on the Browse button to specify the desired VHD(X) file location.
- Enter a file size you want to create a VHD file of.
- Select the file type (VHD or VHDX).
- Select Fixed size or Dynamically expanding according to what works best in your case.
- Click OK and you are done.
Voila, you just created a VHD file. The disk will appear in the Disk Management console.
There are alternative options that you can use to create a new VHD file.
Create VHD(X) File using Hyper-V Manager
- Open the Hyper-V Manager app (Win + R > type
virtmgmt.msc
into the Run box). - Select a server on the left.
- On the right, click on New under Actions, and select Hard Disk.
- Click Next in the virtual disk wizard dialog.
- Select VHD or VHDX for the disk format.
- Select Fixed size or Dynamically expanding for the disk type you want.
- Next, specify the directory path and the file name for your new VHD file.
- Select Create a new blank virtual hard disk and enter the desired disk size in GB.
- Verify that everything is correct, and click on Finish.
You are done.
Now, let’s look on how it can be done with PowerShell.
Note: These PowerShell commands work only when the Hyper-V feature is enabled.
Create New VHD(X) File Using PowerShell
- Open PowerShell as Administrator.
- Execute te following command to create a fixed size VHD file:
New-VHD -Path "Fullpathtovhdfile" -Fixed -SizeBytes
. - To create a dynamically expanding VHD, issue the command New-VHD -Path “Full path of .vhd or .vhdx location” -Dynamic -SizeBytes .
- Substitute
Fullpathtovhdfile
with the actual full path of the .vhd or .vhdx file where you want to store it. - Substitute with the maximum size (ex: “1GB”) you want for the .vhd or .vhdx file. This can be expressed as in MB, GB, or TB.
Also, you can use the DiskPart tool to create a new VHD(X) file in Windows 10. Here’s how.
Create New VHD or VHDX File with DiskPart
- Press Win + R shortcut keys on the keyboard to open the Run dialog.
- Type
diskpart
into the Run box and hit the Enter key. Confirm the UAC prompt. - Type the following command:
create vdisk file="Fullpathtovhdfile" maximum= type=fixed
. This will create a new fixed size VHD. - To create a dynamically expanding VHD/VHDX file, execute the command:
create vdisk file="Fullpathtovhdfile" maximum= type=expandable
. - Substitute
Fullpathtovhdfile
with the actual full path of the .vhd or .vhdx file for where you want to store it at. - Substitute with the maximum size you want for the .vhd or .vhdx file in megabytes. E.g. 1024 for 1GB.
You are done.
Regardless of the method you used to create a VHD file, you need to create a file system on it in order to store some data on it, e.g. install an operating system or just copy some files. Here is how it can be done.
To Create File System on VHD or VHDX File,
- Press the Win + X keys together on the keyboard. See the list of shortcuts with the Win key available in Windows 10.
- From the menu, select Disk Management.
- If you do not see you VHD in the list, then select Action > Attach VHD from the menu.
- Browse for you VHD file and click OK. Do not check the “read only” option.
- The VHD file will appear as a new drive in the list.
- Right-click the attached VHD file, and select Initialize Disk from the context menu.
- Select MBR or GPT for the partition style and click OK.
- Right-click the unallocated space on your virtual drive and select New Simple Volume...
- Select the partition size, file system, and specify the volume label for the new partition.
- Now your VHD file is ready for regular tasks.
Alternatively, you can create the file system for your drive with DiskPart.
Create File System on VHD or VHDX File with DiskPart
- Press Win + R shortcut keys on the keyboard to open the Run dialog.
- Type
diskpart
into the Run box and hit the Enter key. Confirm the UAC prompt. - In the diskpart prompt, type and run the command
select vdisk file="Full path of .vhd or .vhdx location"
. - Type and run the command
attach vdisk
. - Create a new partition on the VHD using the following command:
create partition primary
. - Format the partition using the command
format fs=FILE_SYSTEM_NAME label="disk label of your choice" quick
. - Substitute FILE_SYSTEM_NAME with either FAT, FAT32, or NTFS. NTFS is strongly recommended.
- Replace
"disk label of your choice"
with some meaningful name, e.g. “my first VHD”. - To make the partition you have created on VHD visible in File Explorer, issue the command
assign
. Windows will assign any available drive letter automatically to the partition. - Instead, you can execute the command
assign letter=
(e.g.assign letter=Z
) to make Windows assign a specific drive letter to the partition on your VHD.
You are done. The drive is now visible in File Explorer and is ready for use.
That’s it!
Source: https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/boot-to-vhd--native-boot--add-a-virtual-hard-disk-to-the-boot-menu