Are you already using Hybrid Use Benefit and saving the cost of running workloads in Azure and wish that you will be delighted if you can use the same for running your XenDesktop VDAs in Azure?

If you’re not, you’re in for a treat! I am delighted to tell you that Hybrid Use Benefit can now be used for XenDesktop VDAs in Azure. This feature is now available in Citrix Cloud’s XenApp and XenDesktop service, as well as in XenDesktop 7.12

In this post, you will learn more about how you can use the hybrid use benefit for running XenDesktop VDAs in Azure. With Azure Hybrid Use Benefit(HUB), you can use on-premises Windows Server licenses that include Software Assurance to earn special pricing for new Windows Server virtual machines in Azure — whether you’re moving a few workloads or your entire data center. Your Azure usage charges will be calculated at the base compute rate. For more details please visit Microsoft documentation here , here and here.

This post assumes that you are already aware of setting up a XenDesktop host connection to your Azure subscription and creating MCS catalog in Azure and have gone through the Microsoft documentation on Azure hybrid use benefit.

Per the Microsoft documentation, there are two ways to utilize HUB.

  1. Check to see whether you have Enterprise Agreement (EA) Azure Subscription. If you have one, you can use images from Azure Marketplace that are pre-configured with HUB. Please refer to the snapshot below, which shows the HUB images from Azure Marketplace.
  2. If you don’t have an Enterprise Agreement Azure subscription, you first need to prepare the Windows Server VHD with base server build in your on-premises hypervisor and upload the VHD to Azure storage account to stand-up the virtual machine (VM) in Azure.

Prepare the master image to use Azure Hybrid Use Benefit in XenDesktop using the pre-configure HUB images in Azure Marketplace.

In your EA Azure subscription, deploy Server OS VM using HUB image from the Azure marketplace. Install VDA software, application and tools that you want in your master image.  Stop (deallocate) the VM from the Azure portal. To confirm that the VM you deployed from Azure portal is utilizing the HUB, please run the following PowerShell command and check that the command output contains LicenseType = Windows_Server.

Get-AzureRmVM -ResourceGroup "xdResourceGroup" -Name "xdVDA"

I deployed a VM in my EA Azure subscription using the HUB image from the Azure marketplace, installed VDA software and application on it, and confirmed that the VM utilizes HUB. As a best practice, I created copy of the OS disk VHD in container newvm in the same storage account manualvmstorage. Now I am ready with the master image that I can use as input to create MCS catalog.


Prepare the master image to use Azure Hybrid Use Benefit in XenDesktop using the on-premises image

If you already have the XenDesktop deployment in your on-premises datacenter or don’t have EA Azure subscription but have the on-premises windows server license that include the software assurance and therefore want to use the on-premises master image in Azure, please follow the steps described below.

In case you don’t have existing master image, deploy Windows Server VM in on-premises hypervisor. Install the VDA software, applications, VM agent and Azure PowerShell. Please note that for MCS provisioning, we need specialized image so you don’t need to run the Sysprep in on-premises VM and create generalized image. Once you have finished configuring the master image, upload the corresponding VHD to Azure storage account. Use following PowerShell command to upload the VHD to Azure storage account.

Add-AzureRmVhd -ResourceGroupName "xdResourceGroup" -LocalFilePath "C:\Image\xdVDA.vhd" -Destination"

I deployed a VM XS-VDA in on-premises Xenserver, installed VDA software, Azure VM agent and required applications. Post that I exported the VM as VHD using XenCenter and then uploaded the VHD to the storage account in Azure.

Create Azure MCS catalog to utilize HUB

Please make sure you establish the Azure host connection using Citrix Cloud’s XenApp and XenDesktop service or XD 7.12 where support for Azure HUB MCS catalog is available.

Launch the Studio from your Citrix Cloud client portal or from Studio console for XD 7.12 and navigate to Machine Catalogs in the left hand pane. Right click Machine Catalogs and click on Create Machine Catalog to launch the machine creation wizard.

Click Next on the Introduction page.


On the Operating System page Select Server OS and click Next. Please note that HUB is available only for Windows Server OS.


On the Machine Management page select Citrix Machine Creation Service (MCS) as the deployment technology and select the Microsoft Azure hosting resource and click Next.


Master Image Selection – Select the master image VHD prepared using HUB image from Azure marketplace or the on-premises image uploaded to Azure.


Storage type and License type selection – In the previous versions of XenDesktop, this page was used to select storage type, but now it is updated to select storage and license type both. When you select Yes for the license type, you are telling XenDesktop that the master image you have selected in the previous step is either HUB image from Azure marketplace or the on-premises Windows Server image with software assurance. This choice will enable the HUB for the VDAs provisioned in the Azure.


VM instance size selection – XenDesktop will show only those VM instance sizes which are supported for the selected storage type in the previous step. Enter number of VMs you want to provision and select the VM instance size of your choice and click Next.


Azure Write Back Cache – Write back cache is now available for Azure MCS catalogs. Please visit Configure cache for temporary data section in the Citrix documentation to learn more about write back cache. Enabling write back cache is optional, so disable it by unselecting the two check boxes on this page if you don’t want write back cache.


Network Interface Card Selection – Select network card and the associated network. Only one network interface is supported.


Select resource location domain and enter the machine naming scheme.


If you are using Citrix Cloud, enter the credentials for your resource location Active Directory and click Next. On the Summary page review the catalog summary. You will find the on-premises license is set to “Yes” in the catalog summary. Enter the catalog name and click Finish to start provisioning.


Once the catalog provisioning is complete, ensure that the VDAs provisioned are utilizing Azure HUB. Please check the snapshot below, the VDAs provisioned for this catalog shows the license type Windows_Server.


Things to be aware of:

  • If you are using PowerShell scripts to provision MCS catalog, you need to update the CustomProperties details in your script to pass the LicenseType parameter with value Windows_Server. Please check the New-ProvScheme in the PowerShell output generated by the studio when we provisioned MCS catalog using studio. The output shows the CustomProperty that you need to pass for creating HUB catalog. Once you update your script to use this custom property, you can use PowerShell script to create HUB MCS catalog.
  • New-ProvScheme  -AdminAddress "xa-controller.xenapp.local:80" -CleanOnBoot -CustomProperties "<CustomProperties xmlns=`"`" xmlns:xsi=`"`"><Property xsi:type=`"StringProperty`" Name=`"StorageAccountType`" Value=`"Standard_LRS`" /><Property xsi:type=`"StringProperty`" Name=`"LicenseType`" Value=`"Windows_Server`" /></CustomProperties>" -HostingUnitName "ARMHu1" -IdentityPoolName "Azure HUB Catalog" -InitialBatchSizeHint 2 -LoggingId "bfd0936f-fe3a-4d0a-b3bb-19ca5b309131" -MasterImageVM "XDHyp:\HostingUnits\ARMHu1\image.folder\PreFlightTesting.resourcegroup\manualvmstorage.storageaccount\newvm.container\AZ-HUB-Sr1220161221180543.vhd.vhd" -NetworkMapping @{"0"="XDHyp:\HostingUnits\ARMHu1\\virtualprivatecloud.folder\PreFlightTesting.resourcegroup\virtualNetwork.virtualprivatecloud\"} -ProvisioningSchemeName "Azure HUB Catalog" -RunAsynchronously -Scope @() -SecurityGroup @() -ServiceOffering "XDHyp:\HostingUnits\ARMHu1\serviceoffering.folder\Standard_D2_v2.serviceoffering" -UseWriteBackCache -WriteBackCacheDiskSize 127 -WriteBackCacheMemorySize 256
  • Remember that only pre-configured HUB images from the Azure marketplace can be used as master image. If you use a Windows Server image in the Azure marketplace that is not a HUB image and prepare it as a master image to provision HUB MC catalog, the provisioning will fail with the following error.

    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’.

  • To confirm whether the above failure is really due to the HUB image issue, you can try to deploy a VM using PowerShell in Azure using the same master image VHD. You will notice the VM deployment failure with the following error.
    New-AzureRmVM : Long running operation failed with status ‘Failed’.
    ErrorCode: InternalDiskManagementError
    ErrorMessage: An internal disk management error occurred.
  • Azure hybrid use benefit can only be used for Windows Server OS, it is not supported for the Windows Desktop OS.
  • If you deploy MCS catalog using the HUB image and Yes for the license type on the Storage and License Types page  but when updating the catalog if your update image is non HUB Azure marketplace image, the catalog update will fail during the image preparation process. So make sure you prepare your update image as HUB image.
  • If you deploy MCS catalog using the non HUB image and No for the license type on the Storage and License Types page but when updating the catalog if your update image is HUB Azure marketplace image, the catalog update will be successful but the VDAs will not utilize the HUB. For VDAs to utilize the HUB, you need to deploy first MCS catalog by selecting Yes for license type.
  • If you have an existing MCS catalog created with non HUB image and No for the license type on the Storage and License Types page, it is not possible to migrate that catalog to use HUB. You need to create new catalog with HUB master image and Yes for the license type.
  • If you add machines to existing HUB catalog, the machines added will also have the license type set to Windows_Server.

synergy banner 2017 2