Windows 11 Image, How to Make it Right?

One comment

If you’re not aware of, Microsoft released Windows 11 image with some special requirements to be stricter followed. Check it out on the following link for better details: Windows 11 Specifications

Basically you’ll need:

  • TPM (Trusted Platform Module), version 2.0
  • Disk Encryption

Ok… so if you’re using VMware Horizon and need to install a VDI Image for your customer and having all VMs with the same vTPM chip and encryption data seems not to be a great idea, ins’t it? So how can you overcome this?

Follow me on the steps-by-steps I created to help you out during this task

Note: Created based on VMware approved method to create Golden Image + without vTPM, accordingly documented on https://kb.vmware.com/s/article/88320

Download Windows ADK / PE add-on

You will need to download the following softwares to create your image:

  • Windows ADK
  • Windows PE add-on for the Windows ADK

Link: https://docs.microsoft.com/en-us/windows-hardware/get-started/adk-install

Create Windows Virtual Machine to Build WinPE Image (Windows Server is recommended)

You need to create a Virtual Machine to be used as Assessment and Deployment Kit for creating your Windows 11 WinPE image

Suggested VM creation:

  • Windows Server 2019 / 2022
  • 2vCPU
  • 4 GB RAM
  • 40 GB Disk

Note: You can use a Windows 10 / 11 to install Windows ADK as well. I recommend using a Windows Server in order to have it working to future configuration we may have, like this documented in here:  https://techzone.vmware.com/using-automation-create-optimized-windows-images-vmware-horizon-vms

Windows Assessment and Deployment Kit (ADK) – Install

After installing virtual machine, install Windows Assessment and Deployment Kit (ADK) following the pictures below:

Run ADKSetup as Administrator

Source: Created by the Author

Install the Windows Assessment and Deployment Kit

Source: Created by the Author

Click Next

Source: Created by the Author

Click Accept

Source: Created by the Author

Select the following features accordingly picture:

Source: Created by the Author

Installing Features

Source: Created by the Author

Don’t need to launch Getting Started. You can Close it

Source: Created by the Author

Windows Preinstallation Environment (PE) ADK Add-on – Install

Now install Windows Preinstallation Environment (PE) ADK Add-on on the same virtual machine, following the pictures below:

Run ADKWinPeSetup as Administrator

Source: Created by the Author

Select install the Windows Assessment and Deployment Kit Windows Preinstallation Environment Add-ons

Source: Created by the Author

Click on Next

Source: Created by the Author

Accept License Agreement

Source: Created by the Author

Select the following feature accordingly picture:

Source: Created by the Author

Installing features

Source: Created by the Author

Press Close after installation is completed

Source: Created by the Author

Configuring Virtual Machine

You’ll need to create 3 directories as it follows:


C:\test\mount\    – used as the mount directory of WinPE image
C:\test\drivers\  – (optional) contains the drivers files
C:\test\scripts\  – contains the scripts

Folders created into Virtual Machine

Source: Created by the Author

Open Deployment and Imaging Tools Environment running as administrator:

Opening Deployment and Imaging Tools Environment

Source: Created by the Author

Once open, type the following command to create C:\test\winpe as working directory of WinPE.

copype amd64 c:\test\winpe

Set Working Directory

Source: Created by the Author

Execute this command to mount WinPE image in directory C:\test\mount\:

dism /Mount-Image /ImageFile:C:\test\winpe\media\sources\boot.wim /index:1 /MountDir:C:\test\mount\

Mount Operation Completed Successfully

Source: Created by the Author

Note: In case you have problems and need to unmount images, you can use the following commands (only if you need to unmount):

dism /Unmount-Wim /Mountdir:C:\test\mount\ /commit

or

dism /Unmount-Image /MountDir:C:\test\mount\ /discard

or

dism.exe /Cleanup-Mountpoints

Download Script files from KB or get them from my GitHub account and add them into c:\test\scripts:

https://github.com/valcesia/Windows/tree/main/Horizon/Windows11

Note: I strongly recommend not using Unattend.xml file for this image creation, so you can see how process will work.

Folder structure created on your Windows Server

Source: Created by the Author

Execute the following commands:

cd c:\test\scripts 
copy startnet.cmd C:\test\mount\Windows\System32\
copy deploy.cmd C:\test\mount\
copy CreatePartitions-UEFI.txt C:\test\mount\

Create PVSCSI driver files

Mounted ISO on Virtual Machine

Source: Created by the Author
  • Execute the following command (check whether you have your VMware Tools ISO into E: drive, which is my case in here):
copy "E:\Program Files\VMware\VMware Tools\Drivers\pvscsi\Win10\amd64\" C:\test\drivers\

Copied files after command successfully run

Source: Created by the Author

Files structure on Windows Server

Source: Created by the Author
  • Add VMware PVSCSI driver or other drivers to WinPE image by executing this command:
dism /image:C:\test\mount\ /add-driver /driver:C:\test\drivers\ /Recurse

Driver package successfully installed

Source: Created by the Author
  • Commit the changes and unmount the image, then create the WinPE ISO fille:
dism /Unmount-Image /Mountdir:C:\test\mount\ /commit

Image Servicing and Management Tool operation completed

Source: Created by the Author
MakeWinPEMedia /ISO C:\test\winpe C:\test\WinPE_amd64.iso

Create WinPE Media as a final Step

Source: Created by the Author

Save WinPE_amd64.iso file to be used into your Windows 11 VM.

Create a Virtual Machine on your VMware Workstation / VMware Fusion

Let’s create now a virtual machine to be our Windows 11 Image and use this VM into your VMware Horizon environment.

Note: If you didn’t, download Windows 11 image file from Microsoft Software Download:

Select the Windows 11 Download Media from Microsoft Software Downloads page

Source: From Microsoft Site
Source: From Microsoft Site

After you download it, let’s create a virtual machine using your VMware Workstation / Fusion.

Click on New

Source: Created by the Author

Click or Drag your Windows 11 ISO image downloaded from Microsoft page

Source: Created by the Author
Source: Created by the Author

Create it as Windows 10 and later x64

Source: Created by the Author

Select Firmware Type as UEFI

Source: Created by the Author

Important: Click on Customize Settings before moving on. We need to make some adjustments

Source: Created by the Author

Save as Windows 11 Image

Source: Created by the Author

Let’s make the following changes:

  • Configure Virtual Machine to 4 GB (4096 MB)
Source: Created by the Author
  • Reduce the Virtual Disk size to 20 GB (enough for testing purpose)
Source: Created by the Author
  • Add Device
Source: Created by the Author
  • Add another CD/DVD Drive (Yeah, you read it right!)
Source: Created by the Author
  1. Add WinPE Image on CD/DVD 1 (the one you created before)
  2. Add Windows 11 image on CD/DVD 2
Source: Created by the Author
Source: Created by the Author
Source: Created by the Author

After that, start up your virtual machine

Source: Created by the Author

If everything works, you’ll see information to Press any key to boot from CD or DVD

Source: Created by the Author

Press any key

You can select the best Windows 11 image for your desire. For now, let’s move on using Windows 11 Pro (Index 6).

Source: Created by the Author

After pressing 6 on your keyboard, Windows 11 will start install using DISM (Deployment Image Servicing and Management tool

Source: Created by the Author

Your virtual machine will reboot and start installing Windows 11 for you

Source: Created by the Author

Note: You can use Unattended.xml file which is present at VMware KB (https://kb.vmware.com/s/article/88320). If that’s the case, you’ll need to use a FromBase64String Powershell cmdlet to know which password you’re setting this up. Be aware of this!

# Decoding Base64 Password to Plain Text
$Base64 = "dgBtAHcAYQByAGUAMQAwADAAJQBPAEsA"
[System.Text.Encoding]::Unicode.GetString([System.Convert]::FromBase64String($Base64))

From this point on, you just need to configure your virtual machine using the username / password, country / region, etc.

Source: Created by the Author

After you have your image done. You can configure the following ones using Windows 11 requirements, which are written on this URL:  https://docs.microsoft.com/en-us/windows/whats-new/windows-11-requirements .

  • Processor: 1 gigahertz (GHz) or faster with two or more cores on a compatible 64-bit processor or system on a chip (SoC).
  • RAM: 4 gigabytes (GB) or greater.
  • Storage: 64 GB* or greater available storage is required to install Windows 11.
    • Extra storage space might be required to download updates and enable specific features.
  • Graphics card: Compatible with DirectX 12 or later, with a WDDM 2.0 driver.
  • System firmware: UEFI, Secure Boot capable.
  • TPM: Trusted Platform Module (TPM) version 2.0.
  • Display: High definition (720p) display, 9″ or greater monitor, 8 bits per color channel.
  • Internet connection: Internet connectivity is necessary to perform updates, and to download and use some features.
    • Windows 11 Home edition requires an Internet connection and a Microsoft Account to complete device setup on first use.

I wish this helps you on your Windows 11 Image creation!

Enjoy the ride, cheers!

1 comments on “Windows 11 Image, How to Make it Right?”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.