Creating MCS dedicated desktop failed with error: "No Image Preparation results found."

Creating MCS dedicated desktop failed with error: "No Image Preparation results found."

book

Article ID: CTX476119

calendar_today

Updated On:

Description

1. The customer has Microsoft Intune pre-deployed within the MCS VM template. When provisioning MCS dedicated desktop from this template, DDC reporting following error:
############################################################################################################ 
Exception:
    DesktopStudio_ErrorId : ProvisioningTaskError
    ErrorCategory : NotSpecified
    ErrorID : ImagePreparationFinalizationFailedCompletely
    TaskErrorInformation : No Image Preparation results found. There may be no suitable VDA installed, or some other serious failure in the Master VM. Image preparation failed.
    InternalErrorMessage : No Image Preparation results found. There may be no suitable VDA installed, or some other serious failure in the Master VM. Image preparation failed.
    DesktopStudio_PowerShellHistory : Create Machine Catalog '<Machine Catalog Name>'
    11/4/2022 4:00:25 PM
############################################################################################################
2. After enabling the VDA log with the steps in CTX140734, we can also found more detailed info about this failure in "image-prep.log":
############################################################################################################
Started Image Prep, arg count 20
Read arguments, OS Rearm True, Office Rearm True, Third Party True, RequirePvd False, RequireWbc False, BuildPvd False, EnableDHCP True, AppScanning False, AppScanResultsFilePath 
Reporting status to 'C:\Program Files\Citrix\PvsVm\Service\PersistedData\PreparationStatus.xml'.
No prior existence of status file detected. Clean prep execution.
Exception in Image preparation. System.IO.IOException: The media is write protected.

   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access)
   at Citrix.MachineCreation.ImagePreparation.ImagePreparation.Main(String[] args)
Completed image preparation
############################################################################################################

3. The template can provision MCS desktops before they integrate Microsoft Intune into this MCS VM template. After consulting Microsoft Engineer, they told us that Microsoft Intune does not support cloning the VM managed by Microsoft Intune. (cloning the MCS template and creating MCS desktops). For more details, check the MS document:
https://learn.microsoft.com/en-us/mem/intune/fundamentals/windows-10-virtual-machines

Environment

Citrix is not responsible for and does not endorse or accept any responsibility for the contents or your use of these third party Web sites. Citrix is providing these links to you only as a convenience, and the inclusion of any link does not imply endorsement by Citrix of the linked Web site. It is your responsibility to take precautions to ensure that whatever Web site you use is free of viruses or other harmful items.

Resolution

The suggestion from Microsoft is provisioning MCS desktop first, then add the desktop to Microsoft Intune management via group policy with the steps in this article:
https://learn.microsoft.com/en-us/windows/client-management/enroll-a-windows-10-device-automatically-using-group-policy

Problem Cause

Microsoft Intune does not support cloning the VM managed by Microsoft Intune. But when creating MCS desktops we have to clone it from a template.

Issue/Introduction

Creating MCS dedicated desktop failed with error: "No Image Preparation results found.", "System.IO.IOException: The media is write protected."

Additional Information

MS KB regarding this issue:
https://learn.microsoft.com/en-us/mem/intune/fundamentals/windows-10-virtual-machines

solution:
​​​​​​​https://learn.microsoft.com/en-us/windows/client-management/enroll-a-windows-10-device-automatically-using-group-policy