Catalog Creation (MCS), Preparation of Master VM Image Fails With Exception ID XDDS:7BE07C6A

Catalog Creation (MCS), Preparation of Master VM Image Fails With Exception ID XDDS:7BE07C6A

book

Article ID: CTX202656

calendar_today

Updated On:

Description

Creation of a new MCS catalog fails with the following Image Preparation timeout exception:

Citrix.Console.Models.Exceptions.ProvisioningTaskException Preparation of the Master VM Image failed. Make sure the selected image has a supported OS (for example, Windows 7) and the correct version of the VDA (7.0 or later) installed.
at Citrix.Console.PowerShellSdk.ProvisioningSchemeService.BackgroundTasks.ProvisioningSchemeTask.CheckForTerminatingError(SdkProvisioningSchemeAction sdkProvisioningSchemeAction)
at Citrix.Console.PowerShellSdk.ProvisioningSchemeService.BackgroundTasks.ProvisioningSchemeTask.WaitForProvisioningSchemeActionCompletion(Guid taskId, Action`1 actionResultsObtained)
at Citrix.Console.PowerShellSdk.ProvisioningSchemeService.BackgroundTasks.ProvisioningSchemeCreationTask.StartProvisioningAction()
at Citrix.Console.PowerShellSdk.ProvisioningSchemeService.BackgroundTasks.ProvisioningSchemeCreationTask.RunTask()
at Citrix.Console.PowerShellSdk.BackgroundTaskService.BackgroundTask.Task.Run()

DesktopStudio_ErrorId : UnknownError
ErrorCategory : NotSpecified
ErrorID : ImagePreparationFinalizationFailedCompletely
TaskErrorInformation : Terminated
InternalErrorMessage : Image Preparation timed out, image preparation failed.
DesktopStudio_PowerShellHistory : Create Machine Catalog 'test'

CDF Trace collected from the Delivery Controller at the time of the failure also shows that the exception occurs after the default image preparation timeout. CDF Trace can be analyzed to confirm the following sequence:

  • ImagePreparation stage has DefaultPreparationTimeout of 20 minutes by default
  • After this timeout is reached, ActivationStatusCheck aborts the wait, powers off the Preparation VM via the underlying Hosting Infrastructure, and it’s then deleted via NewProvisioningSchemeLogic
  • Image preparation stage does not completed within 00:20:00, aborting wait
  • ReadImagePreparationDiskCallback is unable to retrieve the Image Preparation status file, indicating that something went terribly wrong with our Preparation VM.
  • Further investigation and troubleshooting will need to occur directly from the Preparation VM, to understand why it’s not shutting itself down.
PS: Please collect CDF traces from all the DDCs simultaneously while reproducing the MCS Catalog creation failure error. Trace files from a partial set of the DDCs may not be sufficient to track the problem.

Environment

Caution! Using Registry Editor incorrectly can cause serious problems that might require you to reinstall your operating system. Citrix cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk. Be sure to back up the registry before you edit it.

Resolution

Logging can be enabled to understand the sequence of events happening within the Preparation VM.

1. First increase the Preparation timeout for the purposes of troubleshooting using the following PowerShell command from one of the Delivery Controllers:
       Set-ProvServiceConfigurationData -Name ImageManagementPrep_PreparationTimeout -Value 60 
2. Create the following registry entries on Master VM to enable required logging:
        HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\MachineIdentityServiceAgent
        Name: LOGGING  (REG_DWORD)
        Value : 1
        HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\PVSVMAgent
        Name: LOGGING  (REG_DWORD)
        Value : 1
2. Restart the VM for the registry changes to take effect
3. Start MCS catalog creation.
4. Login to Preparation VM after the Prep VM has been created on the hypervisor .
5. Go to C:\ and look for the log files : ImagePrep.log and PvsVmagentlog.txt

Analyzing these two logs will help to narrow down the cause of the failure.  If the log files show "Drive is Write Protected" exception for Image preparation , please follow the recommendations below :

1. Check for Antivirus on the Master image : uninstall and test .
2. Check for any monitoring tools on master image like Lumension , Digital Guardian etc : Uninstall and test.
3. Remove Bitlocker encryption tool if present.
4. Move the Master image and the machine AD accounts (in case using existing accounts) to an OU with blocked inheritance and no GPOs linked if there are any as there can be disk write protection policies.

As a best practice , also look at Firewall and any storage related alerts on the hypervisor datastore .

PS: Once the cause is identified the above mentioned registry keys on the master VM can be set to 0 to turn off logging and also the same powershell command can be run to set the Preparation timeout back to 20 mins which is the default,


Problem Cause

ReadImagePreparationDiskCallback is unable to retrieve the Image Preparation status file and,The drive is write protected .

Issue/Introduction

Catalog Creation fails on the exception ID XDDS:7BE07C6A. TerminatingError=No Image Preparation results found, suggesting no suitable VDA or other serious failure in the Master VM. Image preparation failed.