Create Iso From Vhd

Windows VHD Boot Plugin

  1. Ventoy supports multiple image types such as iso/wim/img/vhd(x). Ventoy will then search through the directories and subdirectories to identify the available disk images. The images will then be listed on your boot menu and you will choose the one that you wish to use.
  2. I’m not going to go into the details of the script except to explain that it will extract a server version from the ISO file, create a VHD or VHDX file based on the installation media and insert an unattend.xml file. With a little planning you could create a system for cranking out new virtual machines based on a variety of unattend.xml files.
  3. Create VHD/VHDX in Windows Server. Note: You can create and mount VHD/VHDX using this method on Windows Server 2008, 2012, 2016 and Windows clients such as; Windows 8, 10. Before getting started, plan which drive to use for VHD and VHD size. Open Run (win+r) and type Diskmgmt.msc then hit enter. When the Disk Management opened, click on.

Ventoy use this plugin to boot VHD(x) files with Windows 7+ in it.
Both Legacy BIOS and UEFI are supported. Both fixed and dynamic VHD(x) are supported.

  • How to use

Download ventoy_vhdboot.img file from https://github.com/ventoy/vhdiso/releases
Put the file under ventoy directory in the ventoy partition of the USB stick, that is /ventoy/ventoy_vhdboot.img and that's all.

The high-level workflow to create a generalized Windows VHD using an ISO is: Prepare the source VM using an ISO image: Create a new, blank, fixed-size VHD in Hyper-V Manager. Use that VHD to create a new virtual machine. Mount your ISO image on the DVD drive of the new VM. Start the VM, and install the Windows operating system. The Disk Management tool in Windows provides everything you need to create VHD files and work with them. To access it, press Windows Key + R to open the Run dialog, type diskmgmt.msc into it, and press Enter. On Windows 8 or 8.1, you can also right-click in the bottom-left corner of your screen or press Windows Key + X and click Disk Management.

  • Attention
  1. There is some compatibility problem in bootmgr, so I provide different versions ventoy_vhdboot.img for you to test.
  2. Put the file in ventoy partition which hold the ISO files, don't put it in the 32MB VTOYEFI partition.
  3. You need to create the ventoy directory manually, because there is no such directory by default.
  4. For Windows 10 v1803 and previous versions, the partition storing VHD(X) files must be formatted as NTFS file system.
  5. For Windows 10 v1809+, in addition to NTFS, VHD(X) files can also be stored in exFAT partition in theory (NTFS is still recommended).
    You can refer to: http://bbs.c3.wuyou.net/forum.php?mod=viewthread&tid=414354&mobile=no
  6. Better to use traditional method to confirm that the VHD(x) file can be booted normally before use Ventoy to boot it.
  • Why not out-of-box support

This feature was not integrated by Ventoy. The main considerations are:
1. bootmgr, etfsboot.com ... These files in ventoy_vhdboot.img are NOT open source, they are directly extracted from Windows ISO file.
2. Easy to update ventoy_vhdboot.img separately
3. Easy to customize ventoy_vhdboot.img


  • Boot Windows VHD(x) at local disk by Ventoy

The manual above is for copy the VHD(x) file to the USB drive and boot with Ventoy. You can also use a custom boot menu to boot the VHD(x) file at local disk by Ventoy.
Please refer Menu Extension Plugin for details about the custom boot menu.
Add a menu like follows to ventoy_grub.cfg, only need to change my_vhd_path to the absolute path of the actual file (from the root of that partition).

In this example, my_vhd_path is set to /VhdDir/Win10.vhd you can change it to your customized path (e.g. set my_vhd_path='/images/Win10H2.vhdx').
You don't need to specify which HD the file is on. It will use search command to enumerate all the HDs to find the file.
Attention that the following formats are INVALID:
set my_vhd_path='(hd1,1)/VhdDir/Win10.vhd'
set my_vhd_path='E:VhdDirWin10.vhd'
set my_vhd_path='VhdDirWin10.vhd'

Before starting: Your system must support virtualization.

What is the benefit of a VHD (Virtual Hard Disk) vs VM (Virtual Machine)? Full access to physical hardware, giving your OS better performance compared to a virtual machine. Non-messy dual-booting is also available.

This guide will teach you how to create and run a Windows virtual hard disk to install Windows 10.

Create the VHD

Launch Disk Management > R-Click on [START] > Disk Management

Action > Create VHD

Specify the virtual hard disk location of the machine:

In my case, I’ll select my 4TB Storage drive and for name, I’ll call it Windows10.

Output should be similar to: D:/Windows10.vhd

Virtual hard disk size:

I’ll make my VHD 50GB. Make sure to select GB or the size will be in MB

Virtual Hard Disk Format:

I’ll leave it as a VHD because we have a machine specified as 50GB. VHDX specifies a machine larger than 2040 GB.

Virtual hard disk type:

Fixed Size (Recommended)

I don’t want this VHD to take more space than the one that was allocated for it.

At the very bottom, you will see a progress bar and when it reaches completion, a new Disk will appear with unallocated space.

Initialize Disk

R-Click on your new disk. In my case, Disk 2 > Initialize Disk.

Here we have the option to select MBR or GPT and since I have a newer system, I’ll select GPT (Guid Partition Table) > Ok

Our Disk is now online.

How To Convert Vhdx To Iso

Create a Windows 10 ISO

You will need to download the Windows 10 Installation Media Creation Tool from here.

Launch the tool as soon as it is done downloading.

Create Installation Media

Accept the Disclaimer

The recommended options will be set for you. If you wish to change the language or architecture, uncheck use the recommended options for this PC.

Next, select:

USB flash drive if you are using a USB or ISO file if you intend to burn it to a DVD.

I will be making an ISO and mounting the Installation Media to a temporary partition.

Select your location and name. In my case, D:/Downloads/Win10.iso

Once it reaches 100%, your ISO should be ready for mounting or burning to a DVD.

Click Finish.

Create a Temporary Partition

I will be creating a temporary partition and running the Windows 10 Installation Media from there.

Launch Disk Management > R-Click on a Disk (in my case, I’ll be using the D drive. You need to choose the disk that has the most storage space) > Shrink Volume > 50000 MB (Equivalent of 50GB) > Shrink

When it is finished, you should see 48.83GB Unallocated. Right click > New Simple Volume > Next > Next > Choose any Drive letter > Next >

Format this Volume with the following settings:

FAT32, Default allocation, volume label: Win10Boot and leave quick format checked.

Once the process completes, you’ll be greeted with your formatted partition.

Navigate to the location of your Windows ISO and double click it to mount it. Alternatively, R-Click it > Mount

Make Iso From Vhd

The ISO will be mounted and you will be automatically taken to > DVD Drive: ESD-ISO

[CTRL][A] to select all [CTRL][C] to copy

Navigate to your temporary partition, double click it to enter and [CTRL][V] to paste the contents.

Installing Windows 10 on a VHD

While holding [SHIFT] , click on Restart and you’ll be taken to the Windows Recovery Environment.

Choose an option > Use a Device

It can be a bit confusing but in my case the partition I created for the Windows Install Media will be called UEFI OS

You’ll be presented with the Windows Setup.

Before proceeding any further, we need to mount our VHD which is not mounted by default.

Simultaneously, press [SHIFT] + [F10] and this will bring the command prompt or cmd.

# Type:

Diskpart

# The following command will list all of our volumes to make sure we have the correct Drive letter.

list vol

# In my case the D:/Storage Drive has become C:/Storage. It’s time to select the location of our VHD

select vdisk file=”C:Windows10.vhd”

# Let’s attach the VHD with the following command:

attach vdisk

# You can now close the command prompt and click next on the Windows Setup screen. Select Install Now.

Create

If you wish to specify a different edition of Windows, select I don’t have a product key.

I’ll be installing Windows 10 Pro > Next > Accept License terms > Custom

It is important to choose the correct drive. In my case, it is Drive 2 Unallocated Space 49.9 GB > Next

Windows 10 will start the installation process.

Create Iso From Vhd File

When it finishes and your computer reboots, you’ll be able to choose which operating system you want to boot into.

Update: I’ve noticed absolutely no performance hit using this method.

Create Iso From Vhd

It will take awhile while it sets up things and then it might reboot. This is the perfectly normal behavior of a first-time Installation.

Make Bootable Iso From Vhd

I hope you enjoyed this guide!

Comments are closed.