I'm facing some obstacles while trying to create and deploy a golden image for my AVD hosts. I start by using a Standard D2als v6 Gen2 VM with the image win11-25h2-avd-m365. After installing the necessary applications, I run the sysprep command with /oobe /generalize /shutdown, which seems to work correctly. However, when I capture the image and attempt to deploy a new VM, it fails. The diagnostic screenshot shows an error titled "Administrator: ERROR HANDLER."
I've checked the setuperr.log from sysprep and found multiple errors related to the BCD, such as BiUpdateEfiEntry and BiExportBcdObjects failures. I've tried several commands to fix the BCD issues before running sysprep, but nothing seems to be resolving the problem. Has anyone else faced this issue or found a solution?
4 Answers
You definitely need to use Trusted Launch VMs for full support. I suggest trying to run sysprep with the /mode:vm switch to potentially sidestep the bad +uefi error you're encountering.
I'm curious why you're using the Windows 11 25H2 AVD M365 image. Personally, I use the enterprise multi-session version instead. Have you considered switching to an Intel SKU? Though it shouldn't matter, I've seen some issues with AMD in the past.
Are you sure you're using the same generation for both the golden image and the VM you're trying to clone? For instance, if your image is Gen2, then your deployment should also be Gen2. Also, ensure that you're checking the trusted launch settings and the version of the gallery image you've created.
Have you thought about using Packer to automate the image building process? It could really help speed things up and streamline your workflow.

Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures