Windows Guest OS Customization fails after the Windows VM is syspreped.
search cancel

Windows Guest OS Customization fails after the Windows VM is syspreped.

book

Article ID: 312095

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

Symptoms:

On Windows Server VMs such as Windows Server 2019, if the user runs sysprep.exe to generalize the guest OS and sets the Shutdown Options to "Shutdown", the Windows generalize will not complete until the guest OS boot up. Any Guest OS customization before the boot-up will fail because of the wrong Windows setup state. And in the %WINDIR%\Temp\vmware-imc\guestcust.log file, you see entries similar to:

  [DEBUG] select * from win32_networkadapter where Manufacturer != 'Microsoft' and ServiceName != 'VMnetAdapter' and manufacturer is not null and MACAddress is not null
  [DEBUG] Found 0 objects. Pointer 0. return code 2147217398(0x8004100a)


On Windows Client VMs such as Windows 10, Windows 11, after user runs the sysprep.exe to generalize the guest OS, Guest OS customization will always fail. Because after the generalize operation, the Windows OS is in oobe/audit mode and running the Guest OS customization in oobe/audit mode will cause error "Windows could not start the installation process" in Windows Client OS.


Environment

VMware vSphere ESXi 7.0.x
VMware vCenter Server 7.0.0

Resolution

Since the Guest OS customization will run sysprep to generalize and specialize the guest OS, user doesn't need to run sysprep by himself.
Please avoid to sysprep the Windows OS before customizing it on both Windows Server and Client VMs. And if user can't skip running sysprep before customizing it in some special scenario, please follow below resolutions.

  • For Windows Server OS, please run sysprep to generalize the guest OS with setting the Shutdown Options to "Reboot".
  • For Windows Client OS, user can manually complete the oobe after the generalize operation or sysprep the OS with an unattended file by which the oobe stage can be skipped, then the customization can work well in the Windows OS setup finished state.