Step 3: Create a Base Image
Create your first Windows image to be deployed to clients. There are several ways to get a VHDx image, select the best option for you.
What you'll need
- Host Provisioning Client installer
- Option 1: Windows ISO installation media
- Option 2: Virtualization system (like Hyper-V, Proxmox, Vmware)
- Option 3: Physical machine with Windows installed
Make a VHDx file
Host Provisioning supports VHDx files for the disks deployed to clients. Choose the best method that suits your environment to create a VHDx.
Option 1: Convert a WIM file to a VHDx
Convert to VHDx a WIM Windows installation media, use Powershell and the module WindowsImageTools.
Install the Windows Image Tools module that contains the tools for the conversion.
Install-Module -Name WindowsImageTools
Extract the ISO Windows installation media, for example in C:\WinSource. You'll need the install.wim file usually found in sources directory.
The install.wim file can contain several images, get the index with the Windows edition you want to use, you can see the included images with the cmdlet Get-WindowsImage
.
Get-WindowsImage -ImagePath C:\WinSource\sources\install.wim
Launch the Convert-Wim2VHD
cmdlet with the mandatory options and the size and type of layout.
Set the maximum size the dynamic VHDx will be able to grow. Set the size according to the edition and your requirements. You can modify the maximum size later at any time.
Set the desired DiskLayout
depending on the target computers (UEFI or BIOS for legacy computers).
Convert-Wim2VHD -Path c:\Windows11.vhdx -SourcePath C:\WinSource\sources\install.wim -Dynamic -NoRecoveryTools -NativeBoot -DiskLayout UEFI -Index 6 -Size 90GB
Use the options Dynamic
, NoRecoveryTools
and NativeBoot
parameters.
The final VHDx file is a sysprepped operating system with no software installed. You'll need to take some additional steps to finish your base image after you complete this getting started wizard.
Option 2: Use a Virtualization solution
Create a Virtual Machine using your preferred virtualization solution. Install the operating system and your software.
Make sure to install the Host Provisioning Client.
Hyper-V
Hyper-V natively can use VHDx and no additional conversions will be needed. Hyper-V is available on Windows Server or Windows PRO client editions.
Proxmox
You can convert a qcow2 VM to VHDx format using qemu-img. This tool is already installed in proxmox. This example converts a VM with a disk sourceimg.qcow2, the VHDx disk will be placed in the same directory as the VM.
qemu-img convert -f qcow2 -O vhdx sourceimg.qcow2 -o subformat=dynamic dstimage.vhdx
VMWare
You can convert a vmdk VM to VHDx format using qemu-img. You will need to retrieve the VM disk to your local computer, install the qemu-img tool in your PC and run the tool.
qemu-img convert -f vmdk -O vhdx sourceimg.vmdk -o subformat=dynamic dstimage.vhdx
You can install qemu-img in Windows or Linux. It is compatible with Hyper-V, KVM, VMware, VirtualBox, and Xen virtualization solutions.
If you are using other virtualization platforms, make sure there are tools available to convert the virtual machine to VHDx.
Option 3: Physical to VHDx
In a physical computer, install the operating system and your software.
Make sure to install the Host Provisioning Client.
Use a Physical-to-Virtual tool to convert your physical disk to a VHDx file, for example Disk2vhd.
Select the target file as VHDx, and only convert the operating system partition (and an additional data partition if exists). The system partition will be created on deployment.