CWC- Creation, Updation, Deletion of MCS machine catalog using Azure resource location fails

CWC- Creation, Updation, Deletion of MCS machine catalog using Azure resource location fails

book

Article ID: CTX222848

calendar_today

Updated On:

Description

Creating a new Machine catalog or Updating, Deleting an existing Machine Catalog operation does not succeed. The operation just hangs without any progress. Running "Host Connection" test and "Resources" test fails with the error message "Contact Citrix Support".

The below error is seen in the event logs on the Delivery Controller and in the actions pane within Studio:

Otherwise unhandled exception in WCF call : System.TimeoutException: This request operation sent to sb://ctxwsp-XXXX-weu4.servicebus.windows.net/hclhost-xxxxxxxxxxxxxxxxxxxxxxxxxxxx did not receive a reply within the configured timeout (00:04:59.9980275).  The time allotted to this operation may have been a portion of a longer timeout.  This may be because the service is still processing the operation or because the service was unable to send a reply message.  Please consider increasing the operation timeout (by casting the channel/proxy to IContextChannel and setting the OperationTimeout property) and ensure that the service is able to connect to the client.

CDF Trace on the Delivery controller shows that there is an exception when trying to enumerate the Azure StorageAccount details:

Citrix.Fma.Sdk.CommonCmdlets.TaskTerminatingError TerminatingError=Error: creating virtual machine failed. Exception=System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at Citrix.AzureRmPlugin.StorageEnumerator.StorageAccountProxy..ctor(AzureStorageAccount storageAccount)
   at Citrix.AzureRmPlugin.StorageEnumerator.<>c.<.ctor>b__4_1(AzureStorageAccount sa)
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Citrix.AzureRmPlugin.StorageEnumerator..ctor(AzureCloud cloud, String provSchemeId)
   at Citrix.AzureRmPlugin.MachineAllocator.GetMainStorageAccountFromAzure(AzureCloud cloud, String provSchemeId)
   at Citrix.AzureRmPlugin.MachineAllocator.GetMainStorageAccount(AzureCloud cloud, String provSchemeId)
   at Citrix.AzureRmPlugin.MachineAllocator.AllocateUtilityMachine(AzureCloud cloud, ProvisioningSettings provisioningSettings, CustomProperties customProperties)
   at Citrix.AzureRmPlugin.MachineCreationAPI.AzureRmPlugin.CreateMachine(ConnectionSettings connectionSettings, HostingSettings hostingSettings, ProvisioningSettings provisioningSettings, MachineCreationRequest machineCreationRequest)";"Citrix.MachineCreation.Sdk.WorkflowStatus WorkflowStatus=Terminated";"System.String MasterImage=/image.folder/rg-CitrixCloud.resourcegroup/citrixcloudsa.storageaccount/vhds.container/ExampleImage.vhd.vhd";"System.String HostingUnitName=CitrixCloudStandard";"System.Guid HostingUnitUid=xxxxxxxxxxxxxxxxxxxxxxxxxxxx";"Citrix.MachineCreation.Sdk.NewProvisioningSchemeState TaskState=FailedToCreateImagePreparationVm";"System.String TaskStateInformation=Terminated";" TaskProgress=null";"System.Int32 DiskSize=32";"string ToString()";"bool Equals(System.Object obj)";"int GetHashCode()";"type GetType()"]
 

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

Log onto Azure portal for the subscription associated with XenDesktop
Navigate to one of the Resource Groups associated with MCS they will have the following naming scheme

citrix-xd-<Provisioning-scheme-id>-<random-string>

Select the Storage Account and then Tags.

Compare the tags listed to the screenshot below

TagsScreenshot

Key: CitrixMainStorageAccount
Value: <resource-group-name>/<storage-account-name> 

Key: CitrixMachineCount
Value: Number of MCS created machines in the catalogue 

Key: CitrixProvisioningSchemeId
​Value:  Provisioning Scheme ID associated with the MCS catalogue

Key: CitrixResource
​Value: Internal

Key: CitrixSchemaVersion
​Value: 1

Adding the missing tag manually.

Repeat the steps for all Resource Groups associated with MCS
 

Problem Cause

MCS storageaccount on Azure was missing the tags required for MCS to work correctly. These tags should be added automatically by studio when a catalog is created. For deeper root cause, you may need to check Azure logs to see if something is preventing the resource group from being tagged.
 

Additional Information

https://www.citrix.com/blogs/2016/09/12/using-xenapp-xendesktop-in-azure-resource-manager/