In the first part of this blog [CloudBursting XenApp / XenDesktop in Azure 1/2] I showed you how to use Citrix Studio console to add a hosting connection to Azure from your local Delivery Controller, to create a Machine Catalog and provision Virtual Machines directly in Azure.

In another blog [Cloudify my Lab with Microsoft Azure (reload)] I showed you how to link your on premise datacenter to Azure leveraging Netscaler Cloudbridge (Site to Site IPSec VPN)

Having installed a router to have the proper network flow going from and to Azure Network the architecture is as follow :

Having setup everything according to the two previous blogs, I prepared a Windows Server 2016 template VM, domain joined with the VDA installed, here is how I installed the VDA :

Click Next

Next

Next

Enter the Delivery Controller FQDN, click Next

Check, uncheck what you want, click on Next

Next

And then click on Install

Finish and reboot your VM

One this is done, Reboot the template VM in Azure and make sure the installation is complete. Then shut the VM down using the Azure portal :

 

Now the VM is stopped, we can process to the Machine Catalog creation, it assumes your Datacenter is already link to Azure through a VPN and the Hosting to Azure configuration is done in the Studio console.

Right click on the Machine Catalog node and chose Create Machine Catalog

 

A wizard pops-up to guide you through the process, click on Next

As I deployed a Windows 2016 templates, I’m gonna chose the Server OS Machine Catalog, click Next

I chose my Azure Resources, click Next

Select the vhd disk of the template VM, click Next

A warning because the virtual machine needs to be stopped using the Stop button in Azure web portal.

I’m cheap, I go for a Standard storage 🙂 click on Next

Chose the VM model that suits your needs, click on Next

Configure the Write Back Cache options, click on Next

Same thing for the network, click on Next

Active Directory accounts to be created, click on Next

A summary of what has been configured, click on Next

Building the machine…

It took some time to create all these VMs, now the Machine Catalog is ready.

Now the VMs are provisioned in Azure, we can move on and create a Delivery Group to assign these VIrtual Machines. Quick step to do so, as follow :

Quick check if the VDA is registered :

Now I do have a RDSH 2016 Azure in my Storefront :

 

Here is the desktop launched through the Netscaler Gateway :

Keep in mind, for now, in this blog post, my Azure Desktop is hosted in Azure and all the HDX traffic go through the Site to Site IPSec tunnel to get out through the Netscaler Gateway in my datacenter / lab.

In a next blog post I will setup a Netscaler in Aure to be able to use the optimal gateway and gettting the connection out from the Netscaler Gateway that will be in Azure if the remote desktop accessed is in Azure / Using the on-prem Netscaler Gateway when the remote desktop is on-prem.

Here are a list of some error I ran into while doing these experience between my lab and Azure :

I still don’t know why I got this error,I’m still looking to find a solution

Error Id: XDDS:0DAA3833
 
Exception:
    Citrix.Console.Models.Exceptions.ProvisioningTaskException An error occurred while preparing the image.
       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 : ProvisioningTaskError
    ErrorCategory : NotSpecified
    ErrorID : FailedToCreateImagePreparationVm
    TaskErrorInformation : Terminated
    InternalErrorMessage : Error: creating virtual machine failed. Exception=Microsoft.Rest.Azure.CloudException: Long running operation failed with status 'Failed'.
       at Microsoft.Rest.Azure.AzureClientExtensions.<GetLongRunningOperationResultAsync>d__1`2.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Microsoft.Rest.Azure.AzureClientExtensions.<GetLongRunningOperationResultAsync>d__0`1.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Microsoft.Rest.Azure.AzureClientExtensions.<GetPutOrPatchOperationResultAsync>d__4`1.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Microsoft.Azure.Management.Compute.VirtualMachinesOperations.<CreateOrUpdateWithHttpMessagesAsync>d__7.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Microsoft.Azure.Management.Compute.VirtualMachinesOperationsExtensions.<CreateOrUpdateAsync>d__5.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Microsoft.Azure.Management.Compute.VirtualMachinesOperationsExtensions.CreateOrUpdate(IVirtualMachinesOperations operations, String resourceGroupName, String vmName, VirtualMachine parameters)
       at Citrix.AzureFacade.AzureThrottle.<>c__DisplayClass12_0.<RetryOnTransientFaults>b__0()
       at Citrix.AzureFacade.AzureThrottle.<>c__DisplayClass13_0.<RetryOnTransientFaults>b__0()
       at Citrix.AzureFacade.SlidingWindowThrottle.Execute(Func`1 doWork)
       at Citrix.AzureFacade.AzureThrottle.RetryUntilTimeout(Func`1 doWork, Nullable`1 retryInterval, Nullable`1 timeout)
       at Citrix.AzureFacade.Management.VirtualMachineManager.Create(AzureResourceGroup resourceGroup, String machineName, AzureMachineSize machineSize, AzureVirtualHardDisk osVhd, IList`1 dataDisks, AzureNetworkInterface networkInterface, IDictionary`2 metadata, String licenseType)
       at Citrix.AzureRmPlugin.MachineCreationAPI.AzureRmPlugin.CreateMachines(ConnectionSettings connectionSettings, HostingSettings hostingSettings, ProvisioningSettings provisioningSettings, IList`1 machineCreationRequests)

 

That error is weird, happened some times while creating a new Machine Catalog, under investigation too

Error Id: XDDS:CA403DD4
 
Exception:
    Citrix.Console.Models.Exceptions.ObjectNotFoundException A VM catalog matching the name entered does not exist.
       at Citrix.Console.PowerShellInteraction.CmdletExecutionMethods.CreateException[T](ICommonLog logger, ExecutionResults`1 results, ICmdletExecutionHost host)
       at Citrix.Console.PowerShellInteraction.CmdletExecutionMethods.Execute[T](ISdkCmdlet`1 sdkCmd, ICmdletExecutionHost host, Boolean allowFailover)
       at Citrix.Console.PowerShellSdk.ProvisioningSchemeService.BackgroundTasks.MachineProvisioningTask.RunTask()
       at Citrix.Console.PowerShellSdk.BackgroundTaskService.BackgroundTask.Task.Run()
 
    DesktopStudio_ErrorId : ProvisioningSchemeNotFound
    Sdk Error Message : The specified ProvisioningScheme could not be located.
    Sdk Error ID : Citrix.XDPowerShell.MachineCreationStatus.ProvisioningSchemeNotFound,Citrix.MachineCreation.Sdk.Commands.NewProvVMCommand
    ErrorCategory : ObjectNotFound
    DesktopStudio_PowerShellHistory : Create Machine Catalog 'Azure Desktop'
    26/01/2017 22:16:42
 
    Get-LogSite  -AdminAddress "dc01.metal.inc:80"
    Start-LogHighLevelOperation  -AdminAddress "dc01.metal.inc:80" -Source "Studio" -StartTime "26/01/2017 21:13:28" -Text "Create Machine Catalog `'Azure Desktop`'"
    New-BrokerCatalog  -AdminAddress "dc02.metal.inc:80" -AllocationType "Random" -Description "Azure Desktop" -IsRemotePC $False -LoggingId "f4d4b74d-0192-4288-82bb-db08b61a9319" -MinimumFunctionalLevel "L7_9" -Name "Azure Desktop" -PersistUserChanges "Discard" -ProvisioningType "MCS" -Scope @() -SessionSupport "MultiSession" -ZoneUid "a961509c-0797-40d2-9bb5-f8d5f1727b1b"
    New-AcctIdentityPool  -AdminAddress "dc02.metal.inc:80" -AllowUnicode -Domain "METAL.INC" -IdentityPoolName "Azure Desktop" -LoggingId "f4d4b74d-0192-4288-82bb-db08b61a9319" -NamingScheme "XA##" -NamingSchemeType "Numeric" -OU "OU=Workstations,OU=Metal,DC=METAL,DC=INC" -Scope @()
    Set-BrokerCatalogMetadata  -AdminAddress "dc02.metal.inc:80" -CatalogId 25 -LoggingId "f4d4b74d-0192-4288-82bb-db08b61a9319" -Name "Citrix_DesktopStudio_IdentityPoolUid" -Value "de23246c-8fac-4c55-8cd2-ce6efe5ba509"
    Test-ProvSchemeNameAvailable  -AdminAddress "dc02.metal.inc:80" -ProvisioningSchemeName @("Azure Desktop")
    New-ProvScheme  -AdminAddress "dc03.metal.inc:80" -CleanOnBoot -CustomProperties "<CustomProperties xmlns=`"http://schemas.citrix.com/2014/xd/machinecreation`" xmlns:xsi=`"http://www.w3.org/2001/XMLSchema-instance`"><Property xsi:type=`"StringProperty`" Name=`"StorageAccountType`" Value=`"Standard_LRS`" /><Property xsi:type=`"StringProperty`" Name=`"LicenseType`" Value=`"Windows_Server`" /></CustomProperties>" -HostingUnitName "AzureNetwork" -IdentityPoolName "Azure Desktop" -InitialBatchSizeHint 1 -LoggingId "f4d4b74d-0192-4288-82bb-db08b61a9319" -MasterImageVM "XDHyp:\HostingUnits\AzureNetwork\image.folder\ArchyCloudBridge.resourcegroup\archycloudbridgedisks777.storageaccount\vhds.container\XA00020170126172010.vhd.vhd" -NetworkMapping @{"0"="XDHyp:\HostingUnits\AzureNetwork\\virtualprivatecloud.folder\ArchyCloudBridge.resourcegroup\ArchyCloudBridgeNETWORK.virtualprivatecloud\default.network"} -ProvisioningSchemeName "Azure Desktop" -RunAsynchronously -Scope @() -SecurityGroup @() -ServiceOffering "XDHyp:\HostingUnits\AzureNetwork\serviceoffering.folder\Standard_DS2_v2.serviceoffering" -UseWriteBackCache -WriteBackCacheDiskSize 127 -WriteBackCacheMemorySize 256
    Get-ProvTask  -AdminAddress "dc02.metal.inc:80" -MaxRecordCount 2147483647 -TaskId "a34f801f-9261-4581-8dba-4df3a523fd77"
    Set-BrokerCatalog  -AdminAddress "dc02.metal.inc:80" -LoggingId "f4d4b74d-0192-4288-82bb-db08b61a9319" -Name "Azure Desktop" -ProvisioningSchemeId "0a608bb6-812d-48df-81c1-164f9083eb61"
    Set-BrokerCatalog : Invalid provisioning scheme
    	+ CategoryInfo : ObjectNotFound: (:) [Set-BrokerCatalog], SdkOperationException
    	+ FullyQualifiedErrorId : Citrix.XDPowerShell.Broker.UnknownDumScheme,Citrix.Broker.Admin.SDK.SetBrokerCatalogCommand
    Add-ProvSchemeControllerAddress  -AdminAddress "dc02.metal.inc:80" -ControllerAddress @("DC01.METAL.INC","DC02.METAL.INC","DC03.METAL.INC") -LoggingId "f4d4b74d-0192-4288-82bb-db08b61a9319" -ProvisioningSchemeName "Azure Desktop"
    Add-ProvSchemeControllerAddress : The specified ProvisioningScheme could not be located.
    	+ CategoryInfo : InvalidOperation: (:) [Add-ProvSchemeControllerAddress], InvalidOperationException
    	+ FullyQualifiedErrorId : Citrix.XDPowerShell.MachineCreationStatus.ProvisioningSchemeNotFound,Citrix.MachineCreation.Sdk.Commands.AddProvSchemeControllerAddressCommand
    Get-AcctADAccount  -AdminAddress "dc02.metal.inc:80" -IdentityPoolUid "de23246c-8fac-4c55-8cd2-ce6efe5ba509" -Lock $False -MaxRecordCount 2147483647 -State "Available"
    New-AcctADAccount  -AdminAddress "dc02.metal.inc:80" -Count 1 -IdentityPoolUid "de23246c-8fac-4c55-8cd2-ce6efe5ba509" -LoggingId "f4d4b74d-0192-4288-82bb-db08b61a9319"
    Get-ProvScheme  -AdminAddress "dc02.metal.inc:80" -MaxRecordCount 2147483647 -ProvisioningSchemeName "Azure Desktop"
    Get-ProvScheme : Object does not exist
    	+ CategoryInfo : ObjectNotFound: (:) [Get-ProvScheme], ItemNotFoundException
    	+ FullyQualifiedErrorId : Citrix.XDPowerShell.Status.UnknownObject,Citrix.MachineCreation.Sdk.Commands.GetProvSchemeCommand
    New-ProvVM  -ADAccountName @("METAL\XA02$") -AdminAddress "dc02.metal.inc:80" -LoggingId "f4d4b74d-0192-4288-82bb-db08b61a9319" -ProvisioningSchemeName "Azure Desktop" -RunAsynchronously
    New-ProvVM : The specified ProvisioningScheme could not be located.
    	+ CategoryInfo : InvalidOperation: (:) [New-ProvVM], InvalidOperationException
    	+ FullyQualifiedErrorId : Citrix.XDPowerShell.MachineCreationStatus.ProvisioningSchemeNotFound,Citrix.MachineCreation.Sdk.Commands.NewProvVMCommand
    Stop-LogHighLevelOperation  -AdminAddress "dc01.metal.inc:80" -EndTime "26/01/2017 21:16:42" -HighLevelOperationId "f4d4b74d-0192-4288-82bb-db08b61a9319" -IsSuccessful $False
 
 
Inner Exception:
    System.InvalidOperationException The specified ProvisioningScheme could not be located.
       at System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(ErrorRecord errorRecord)

This error “Error Id: XDDS:D8CBB072” happened when creating a new Machine Catalog in Studio and one of the two Delivery Controllers was offline. In my lab I have DC01 and DC02, DC02 was switched off. I just put it back online to get rid off this error.

Error Id: XDDS:D8CBB072
 
Exception:
    Citrix.Console.Models.Exceptions.CommunicationErrorException There was a problem communicating with the server.
       at Citrix.Console.PowerShellInteraction.CmdletExecutionMethods.CreateException[T](ICommonLog logger, ExecutionResults`1 results, ICmdletExecutionHost host)
       at Citrix.Console.PowerShellInteraction.CmdletExecutionMethods.Execute[T](ISdkCmdlet`1 sdkCmd, ICmdletExecutionHost host, Boolean allowFailover)
       at Citrix.Console.PowerShellSdk.HealthMonitor.Scripts.ReloadServiceInstancesScript.<>c__DisplayClass4_0.<RefreshServiceAddressCache>b__3(ICmdletExecutionHost host)
       at Citrix.Console.PowerShellInteraction.SimplePowerShellScript.<>c__DisplayClass4_0.<Run>b__0(ICmdletExecutionHost host)
       at Citrix.Console.PowerShellInteraction.PowerShellScript`1.Run()
       at Citrix.Console.Common.CitrixParallel.<>c__DisplayClass4_1`1.<InternalForEach>b__0(Object arg)
 
    DesktopStudio_ErrorId : CommunicationError
    Sdk Error Message : An invalid URL was given for the service.  The value given was 'dc02.metal.inc:80'.
        The reason given was: Failed to connect to back-end server 'dc02.metal.inc' on port 80 using binding WSHttp. The server may be off-line or may not be running the appropriate service
    	There was no endpoint listening at http://dc02.metal.inc/Citrix/ConfigurationService that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
    	Unable to connect to the remote server
    	A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 192.168.0.105:80.
    Sdk Error ID : Citrix.XDPowerShell.Status.CommunicationError,Citrix.Configuration.Sdk.Registration.Commands.GetConfigRegisteredServiceInstanceCommand
    ErrorCategory : ResourceUnavailable
    DesktopStudio_PowerShellHistory : SimplePowerShellScript
    27/01/2017 23:29:41
 
    Set-Variable  -Name "sidsToExclude" -Value @()
    Get-ConfigRegisteredServiceInstance  -AdminAddress "dc02.metal.inc:80" -Filter {(((ServiceType -eq 'Config') -and (Version -eq 2))) -and ((InterfaceType -eq 'SDK') -and (-not (ServiceAccountSid -in $sidsToExclude)))} -MaxRecordCount 2147483647
    Get-ConfigRegisteredServiceInstance : An invalid URL was given for the service.  The value given was 'dc02.metal.inc:80'.
        The reason given was: Failed to connect to back-end server 'dc02.metal.inc' on port 80 using binding WSHttp. The server may be off-line or may not be running the appropriate service
    	There was no endpoint listening at http://dc02.metal.inc/Citrix/ConfigurationService that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
    	Unable to connect to the remote server
    	A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 192.168.0.105:80.
    	+ CategoryInfo : InvalidOperation: (:) [Get-ConfigRegisteredServiceInstance], InvalidOperationException
    	+ FullyQualifiedErrorId : Citrix.XDPowerShell.Status.CommunicationError,Citrix.Configuration.Sdk.Registration.Commands.GetConfigRegisteredServiceInstanceCommand
    Remove-Variable  -Name "sidsToExclude"
 
 
Inner Exception:
    System.InvalidOperationException An invalid URL was given for the service.  The value given was 'dc02.metal.inc:80'.
        The reason given was: Failed to connect to back-end server 'dc02.metal.inc' on port 80 using binding WSHttp. The server may be off-line or may not be running the appropriate service
    	There was no endpoint listening at http://dc02.metal.inc/Citrix/ConfigurationService that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
    	Unable to connect to the remote server
    	A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 192.168.0.105:80.
       at System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(ErrorRecord errorRecord)
 
 
Inner Exception:
    System.ServiceModel.CommunicationException Failed to connect to back-end server 'dc02.metal.inc' on port 80 using binding WSHttp. The server may be off-line or may not be running the appropriate service
       at Citrix.Fma.Sdk.CommonCmdlets.AdminConnection`1..ctor(ConnectionSpec connectionSpec)
       at Citrix.Fma.Sdk.CommonCmdlets.AdminConnection`1.GetAdminConnection(String serverPortString, String endpointAddress, Nullable`1 binding)
       at Citrix.Configuration.Sdk.Registration.Commands.GetConfigRegisteredServiceInstanceCommand.OpenConnection(Boolean terminateOnFailure)
 
 
Inner Exception:
    System.ServiceModel.EndpointNotFoundException There was no endpoint listening at http://dc02.metal.inc/Citrix/ConfigurationService that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
 
    Server stack trace: 
       at System.ServiceModel.Security.IssuanceTokenProviderBase`1.DoNegotiation(TimeSpan timeout)
       at System.ServiceModel.Security.SspiNegotiationTokenProvider.OnOpen(TimeSpan timeout)
       at System.ServiceModel.Security.WrapperSecurityCommunicationObject.OnOpen(TimeSpan timeout)
       at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
       at System.ServiceModel.Security.CommunicationObjectSecurityTokenProvider.Open(TimeSpan timeout)
       at System.ServiceModel.Security.SymmetricSecurityProtocol.OnOpen(TimeSpan timeout)
       at System.ServiceModel.Security.WrapperSecurityCommunicationObject.OnOpen(TimeSpan timeout)
       at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
       at System.ServiceModel.Channels.SecurityChannelFactory`1.ClientSecurityChannel`1.OnOpen(TimeSpan timeout)
       at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
       at System.ServiceModel.Security.SecuritySessionSecurityTokenProvider.DoOperation(SecuritySessionOperation operation, EndpointAddress target, Uri via, SecurityToken currentToken, TimeSpan timeout)
       at System.ServiceModel.Security.SecuritySessionSecurityTokenProvider.GetTokenCore(TimeSpan timeout)
       at System.IdentityModel.Selectors.SecurityTokenProvider.GetToken(TimeSpan timeout)
       at System.ServiceModel.Security.SecuritySessionClientSettings`1.ClientSecuritySessionChannel.OnOpen(TimeSpan timeout)
       at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)
       at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
 
    Exception rethrown at [0]: 
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at System.ServiceModel.ICommunicationObject.Open()
       at Citrix.Fma.Sdk.CommonCmdlets.AdminConnection`1..ctor(ConnectionSpec connectionSpec)
 
 
Inner Exception:
    System.Net.WebException Unable to connect to the remote server
       at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
       at System.Net.HttpWebRequest.GetRequestStream()
       at System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStream()
 
 
Inner Exception:
    System.Net.Sockets.SocketException A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 192.168.0.105:80
       at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
       at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)

 

0 401