Search This Blog

Tuesday, June 24, 2025

Windows Server 2022 VMware Setup and Prep for Sysprep



To ensure Windows Server 2022 Datacenter on VMware fully supports Sysprep, your VM needs to meet a few critical requirements related to firmware, configuration, and image integrity.

Here’s a step-by-step guide to prepare your VM for successful Sysprep execution:


1. Create VM with the Correct Settings

When creating the VM in vSphere or Workstation:

Firmware

  • Firmware: Set to UEFI (not BIOS).
    • In vSphere: VM Options > Boot Options > Firmware = UEFI
    • Disable Secure Boot unless you have a specific need for it.

Guest OS

  • Choose Windows Server 2022 or later (64-bit) for proper driver support.

Virtual Hardware

  • At least hardware version 14 or later is recommended.

2. Install Windows Server 2022 Properly

  • Use a clean ISO install (not a customized or heavily preconfigured image).
  • During install, Windows Setup should automatically create a proper EFI system partition (ESP) formatted as FAT32.

3. Avoid Common Pitfalls

Do NOT:

  • Switch firmware (BIOS ↔ UEFI) after install.
  • Install or leave Windows Store apps or provisioning packages.
  • Leave pending updates or rollbacks before Sysprep.

4. Verify Before Running Sysprep

Run this checklist inside the OS:

Confirm UEFI Mode

 (Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control").PEFirmwareType

# Should return: 2 (UEFI)    

 Check EFI Partition

diskpart

list disk

select disk 0

list partition

  • You should see a FAT32 partition labeled "System" (usually ~100MB).

 Validate BCD

bcdedit /enum all

  • Confirm entries like bootmgr, default, and proper device paths.

5. Run Sysprep Properly

From an elevated Command Prompt:

cd %windir%\System32\Sysprep

sysprep.exe /generalize /oobe /shutdown /mode:vm

Use /mode:vm for VMs—this tells Sysprep not to remove VM-specific drivers.


6. If You’re Using Templates (Optional)

  • Shut down the VM after Sysprep completes.
  • Take a snapshot or convert it to a template in vCenter.
  • When deploying from template, customize using Guest Customization Specification in VMware.

 

As of June 2025, Windows Server 2022 is officially supported on the following VMware ESXi versions:


Supported ESXi Versions for Windows Server 2022 (as Guest OS)

vSphere 7.x

  • ESXi 7.0 Update 2 (Build 17867351 and later)

    • Official support for Windows Server 2022 was added with this release.

vSphere 8.x

  • ESXi 8.0 GA and all updates

    • Fully supports Windows Server 2022 as a guest OS.

    • Offers improved performance, better hardware support, and security features (e.g., TPM 2.0 passthrough for Secure Boot/VDI).


Reference

VMware’s Compatibility Guide (https://www.vmware.com/resources/compatibility/search.php) confirms guest OS support per release.

Search keywords:

  • Product: ESXi

  • Guest OS: Windows Server 2022


Additional Notes

  • VM Hardware Version: Use version 19 or later (recommended for ESXi 8.x) for full feature support (e.g., vTPM, secure boot, UEFI).

  • VMware Tools: Ensure the latest version is installed for best driver and integration support.

  • Cluster Features: DRS, HA, and snapshots are supported.

No comments:

Post a Comment