Install VHD System

Installing a VHD System

VHD, short for Virtual Hard Disk, is a virtual technology developed by Microsoft. Its primary purpose is for use with Microsoft’s Hyper-V virtual machine, serving as the virtual machine file for installing virtual machines.

You might be wondering: Aren’t virtual machines only about VMWare? Where did Hyper-V suddenly come from?

In reality, VM is just one player in the virtual machine market—it’s just exceptionally good, overshadowing other virtual machine solutions. Hyper-V is a virtual machine software developed by Microsoft with functionality similar to VM. For Windows 10 Professional systems, this virtual machine comes built-in. However, for Windows 10 Home edition, this feature is not available.

We don’t actually need to use the Hyper-V virtual machine software, because VHD has a much more important feature: As a physical file, VHD can be used to boot a real physical machine.

Now you might ask: Why can’t the virtual machine files created by VMWare boot a physical machine?

The reason is simple: VMWare wasn’t developed by Microsoft, but VHD was! :)

Features of VHD

As a virtual machine file, VHD has the following characteristics:

1. Single-file type: Unlike VM virtual machines, a VHD file is a single file. That means one VHD file contains an entire Windows system, various software, hardware, and so on. In contrast, a VM-created virtual machine resides in a folder, and running it requires numerous files within that folder.

2. Differencing capability: This is a crucial feature of VHD systems and one of the main reasons we’re introducing them. For a VHD file with a system already installed, we can create its differencing child file. This child file is also a VHD file and can boot a virtual machine. It can be thought of as the “child” of the first VHD system. Initially, all files in this child are identical to those in its parent.

However, it’s important to emphasize that this child does not fully copy all files from its parent (which is evident from the creation speed of the differencing file—it’s created instantly, impossible for copying a system-sized file). Instead, it uses a method similar to “referencing.” When you check the properties of the child, you’ll see it’s only a few MB at first, but double-clicking it reveals all the files inside its parent.

A metaphor can help understand this parent-child relationship. The parent VHD is a piece of paper completely filled with writing (the “writing” represents files). The child VHD is a piece of glass placed on top of this paper. Through the glass, we can see all the files in the parent VHD. We can also write on the glass, meaning we can perform various operations within the child VHD system.

Clearly, writing on the glass (running the child VHD system) has no impact on the parent VHD system (the paper). If we accidentally write a virus on the glass, causing the child VHD system to crash, we can simply throw away that glass and replace it with a new one, obtaining a fresh system identical to the parent VHD!

This special property leads to the third major feature of VHD systems:

3. Instant backup, instant restore.

Instant backup: For a functioning parent VHD system, we can create a differencing child VHD system. From then on, we only use the child, keeping the parent “enshrined.” This is called instant backup.

Instant restore: If the child “dies,” we delete it and create a new child, effectively restoring the parent VHD system to its original state. However, any files we added to the dead child are also deleted along with it. This is a common drawback of system backups.

4. Creating a differencing system tree: In fact, we can give the parent VHD many children, then create differencing files for those children, forming grandchildren VHDs, great-grandchildren VHDs, and so on—a vast VHD family. Since each differencing layer is just a “sheet of glass,” they initially occupy very little disk space. Leveraging this property, we can create countless differencing systems on our physical machine, as if our computer had countless systems installed.

Many people use this feature to give each family member their own system, all of which are actually differencing subsystems.

However, for safety, I still recommend installing the VHD system inside a VM virtual machine and creating its differencing files, even if it seems odd—installing a virtual machine within a virtual machine (Russian nesting dolls). :)

Understanding VHD Systems

VHD is essentially a file with the extension .vhd or .vhdx. Among these, .vhdx is more advanced, and I recommend using the .vhdx format.

A .vhdx file is actually a compressed archive that contains all the necessary files for a system. When we click on a VHD file, a new partition appears in File Explorer, typically with the drive letter Z:. This means the operating system has attached the VHD file, treating it as a virtual disk. At this point, opening Disk Management reveals a new disk—the VHD virtual disk. We can perform various operations on this virtual disk just like a regular disk. When installing a system, we can directly choose to install the system files onto the VHD virtual disk.

Initial Installation of a VHD System

In VMWare, create a new virtual machine. The steps are the same as before, but instead of directly selecting the system ISO disc, choose “Install operating system later.” After creation, edit the virtual machine’s hardware, add the MicroPE ISO image, so the new virtual machine can boot from the PE system.

Once inside the PE system, edit the virtual machine settings again and add the Windows 10 ISO image. This completes the initial configuration of the virtual machine.

Installing a VHD System Using WinNTSetup

A key step in installing a VHD system is creating the VHD file. Once the VHD file is successfully configured and mounted as a virtual disk, the remaining steps for installing the operating system are not much different from the traditional method. First, use DG to initialize the VM’s virtual disk, allocating an EFI partition and a C drive partition.

1
2
3
4
5
6
1.点击winntsetup右下角的 VHD->创建
2.选择VHD文件的存放位置
3.选择类型为VHDX
4.虚拟磁盘大小25GB为最低要求.注意不要比自己的VM创建的硬盘还大就可以.
5.分区样式可以只选择GPT-UEFI,因为现代的电脑已经抛弃了BIOS-MBR了
6.选择 动态扩展,一路确定

Dynamic expansion: Uses only as much space as needed (the virtual disk only grows, never shrinks; deleting files inside the virtual disk does not free up actual disk space)

Fixed size: Directly occupies 25GB of space

3649ad52ed9dd996b2a4e153dd1b2766.png

1
2
3
4
5
1.选择安装映像文件的位置:与正常安装系统操作相同
2.选择可引导驱动器的位置:本质是让你选择ESP分区.点击下拉菜单可见两个绿色的EFI分区,一个是VM的虚拟磁盘里的EFI分区,一个是VHD虚拟磁盘的EFI分区.请记住,相对于VHD虚拟磁盘,需要把VM的虚拟磁盘看成一个真的磁盘.毕竟我们是在虚拟机里安装虚拟机:)
我们不能选择VHD虚拟磁盘的EFI分区作为引导分区.我们需要选择VM虚拟磁盘的EFI分区.
3.选择安装驱动器的位置:应选择VHD虚拟磁盘(一般是Z:盘)
4.安装即可

1

Think about it: Why can’t we select the EFI partition of the VHD virtual disk as the boot partition?

If we did, our goal would be for the UEFI firmware to scan and recognize this EFI partition. But where is this EFI partition actually located?

That’s right—it’s inside the .vhdx file!

Can we really expect the UEFI firmware to first recognize the .vhdx file, then mount the EFI partition inside it, and then recognize that partition?

UEFI currently does not have this capability.
So, how does a VHD system boot?

This is thanks to the Windows Boot Manager.

Although UEFI cannot read .vhdx files, the Windows Boot Manager can. The essence of this capability is that bootmgfw.efi can read .vhdx files. Through this EFI program, we can achieve VHD booting.

Creating VHD Differencing Subsystems

Now, the parent VHD system has been installed. Let’s start creating its descendants!

Many tools can create VHD differencing subsystems. Here, we recommend BOOTICE, a powerful lightweight tool.

Differencing systems must be created within a PE system!

1
2
3
4
1.打开bootice.点击 磁盘镜像->差分VHD
2.选择父文件位置及你想要的子文件位置.
3.选择保存文件类型为*.vhdx
4.创建

In your chosen directory, a new .vhdx file will appear. The author named it win10son1.vhdx.

898b520bef2426bdccd373967cbb0a74.png

At this point, a child VHD has been created.

Adding a BCD Boot Menu for the Child VHD

Although the child VHD has been created, it doesn’t have its own BCD boot menu. So, we need to manually create its boot menu.

Steps:

1
2
3
4
5
6
7
8
9
1.打开BOOTICE软件
2.点击 BCD编辑
3.给自己的VM虚拟机的虚拟硬盘的EFI分区分配一个盘符,使它可以在文件资源管理器里显示.你可以用DG做到这一点.
4.选择 其他BCD文件,点击 ... 浏览文件,选择你刚刚挂载的EFI分区,打开里面的BCD文件(具体步骤以前讲过,这里不再赘述)
5.点击 添加->新建VHD启动项
6.启动磁盘和启动分区全都选择"真实的"磁盘和分区.这里的"真实"指的是相对于VHD虚拟磁盘的"真实".也就是选择VM虚拟机的虚拟磁盘.你可以想一想这是为什么.
7.设备文件 这一项,需要填写你的子VHD文件所在的位置.由于上面两项已经选择了磁盘和分区,所以这里我们只需要写出相对路径即可.比如,笔者的子VHD在C盘根目录下,我吹需在这里填写 \win10son1.vhdx
8.你可以修改菜单标题为自己喜欢的名字.笔者改为win10son1
9.保存当前系统设置->保存全局设置

88e2eb6edc8bcd8743fde849b5ac37bd.png

Now, the BCD boot file for the child VHD is ready. You can restart the virtual machine and check if there are two options in the Windows Boot Manager menu.

6f4d5a3a9b6b7d7012d6e1f003c00a99.png

Note: After differencing, the parent VHD becomes unusable. That means we cannot boot the parent VHD system. It’s not that it’s impossible to boot, but if we do, the link between it and its child will break, causing the child to fail to boot properly. Therefore, for safety, we usually remove the parent VHD’s entry from the BCD menu to prevent accidental booting of the parent VHD system, which would render its differencing subsystems invalid.

Similarly, if a child VHD system has its own differencing subsystems, it effectively becomes a “parent” and cannot be booted either. If it is booted, the grandchild VHD will not be able to run.

VHD subsystem files can be copied. So, after creating one child VHD using BOOTICE, we can make many copies of it, each of which is a child VHD. We can add a BCD boot entry for each copy (though this can be tedious). The author once created 10 child VHDs at once, all of which ran normally in a VM virtual machine.

e77fce7b6386bbcc2f3a6a43818df806.gif

Booting into a VHD System

Based on the nature of VHD systems, we can infer some characteristics:

1. The .vhdx file of the running VHD system should be read-only within that VHD system.

411827475f872bd14ab51bb47544ba8d.png

2. The size of this .vhdx file should display as the maximum size of the VHD virtual disk, since it has been virtualized as the system drive. The author’s is 25GB.

9a365864a3be5b4bbfc33bb8160e624b.png

3. The parent file of a child VHD should also be read-only within the child VHD system.

Common VHD Issues

Sometimes, due to various reasons, a VHD system may fail to boot. Here are some common issues:

1. Scenario: I created one parent VHD and several child VHDs, but some VHD systems boot while others don’t. My BCD file is correct. Error code: VHD BOOT HOST VOLUME NOT ENOUGH SPACE

904968a39a8b1140e4513d0fa85ecf95.png

Cause analysis: This is likely due to improperly shutting down the virtual machine.

During testing, it’s easy to make the mistake of immediately shutting down the virtual machine after seeing the VHD system boot successfully, to proceed with the next test. When shutting down immediately, we often use the “Shut Down (O)” option from the dropdown menu. This operation is essentially like “pulling the plug” on the virtual machine—a hard power-off. This causes a serious issue: the VHD virtual disk is not properly unmounted. As a result, the 25GB .vhdx file seen inside the VHD system actually “becomes” 25GB in size. If the system is shut down normally, the VHD virtual disk is properly unmounted, and the .vhdx file returns to its original size (usually a few hundred MB initially, growing with use).

So, if your disk is only 60GB and you always perform a “hard power-off,” after booting two VHD systems, the VM’s disk will already be using 50GB. Booting a third new VHD system still requires 25GB, and the remaining 10GB is clearly insufficient. Therefore, you need to manually “release” these unmounted VHD virtual disks. The specific method is to boot into a working system or PE system, double-click to open the unmounted VHD virtual disk, and then close it, which completes the unmounting.

2. Scenario: VHD subsystem fails to boot.

Analysis: Recall whether you booted the parent system after creating the subsystem. If you did, the subsystem will fail to boot because this breaks the differencing chain.

This concludes the introduction to VHD systems. Please forgive any shortcomings, and experts, feel free to go easy on me :)


Install VHD System
https://en.lvlele.top/010-install-vhd-system/
Author
Lvlele 吕了了
Posted on
June 4, 2026
Licensed under