A Microsoft desktop and app virtualization service that runs on Azure. Previously known as Windows Virtual Desktop.
Hello, @Dharmendar Parmar ! What you've described closely aligns with how you would create a golden image however I want to make sure that no steps have been overlooked.
How do I create a golden image for Azure Virtual Desktop?
This is based on the following guide that walks you through how to use the Azure portal to create a custom image to use for your Azure Virtual Desktop session hosts:
https://learn.microsoft.com/en-us/azure/virtual-desktop/set-up-golden-image
The order of operations are as follows:
- Make sure the OS you choose is supported (see recommendations).
- Make sure the VM used for taking the image does not have the "Login with Azure AD" flag.
(You noted this in step 3). - Create a base VM for your chosen image and take your first snapshot.
- Update the OS and cleanup as needed (temporary files, etc.). Disable antivirus before running sysprep and note that Unified Write Filter (UWF) is not supported.
(You completed this as step 1 and 2). - Do not join your golden image VM to a host pool. The image will conflict with the existing VM's configuration, and the new VM won't work.
(You completed this as step 4). - Reboot the VM.
- Clean up temp files in system storage, optimize drivers/defrag, and remove any user profiles.
- Generalize the VM by running sysprep.
(You completed this in step 5). - Capture the VM (either in shared image gallery or as a managed image).
(You completed this in step 6).
Troubleshooting:
- Don't capture a VM that already exists in your host pools. The image will conflict with the existing VM's configuration, and the new VM won't work.
- Make sure to remove the VM from the domain before running sysprep.
- Delete the base VM once you've captured the image from it.
- After you've captured your image, don't use the same VM you captured again. Instead, create a new base VM from the last snapshot you created. You'll need to periodically update and patch this new VM on a regular basis.
- Don't create a new base VM from an existing custom image. It is better to start with a brand-new source VM.
If you are still having issues, let us know in the comments and we can continue to troubleshoot this.
I hope this has been helpful! Your feedback is important so please take a moment to accept answers. Thank you for helping to improve Microsoft Q&A!