Friday, May 3, 2013

Increasing vCPU and memory for Citrix XenDesktop 5.6 virtual desktops

I’ve recently been asked about how to change the amount of vCPU and memory for Citrix XenDesktop desktop catalogs that have already been deployed and as XenDesktop administrators would know, the following screen with configuration parameters to set the vCPU and memory is presented when creating the new desktop catalog:


However, once the desktop catalog has been created, we no longer have access to these options.  Manually changing the master image and/or the VDI desktops doesn’t work because subsequent desktops that are deployed will be configured with the same vCPU and memory as originally specified.

The solution to this is actually quite simple and that is to use PowerShell cmdlets to change the configuration for the desktop catalog.  The following are the PowerShell cmdlets we’ll need to change these settings:



Changing Memory for Desktops

Begin by using the Get-ProvScheme to get the ProvisioningSchemeName for the pool you would like to modify:

PS C:\Users\tluk> Get-ProvScheme

ProvisioningSchemeUid    : 98ba4e9e-4b29-4ca7-885a-f689b664a2ed

ProvisioningSchemeName   : London_svrvcenter03

CpuCount                 : 1

MemoryMB                 : 4096

DiskSize                 : 40

MasterImageVM            : XDHyp:\HostingUnits\svrvcenter03\Normal.resourcepool\win7ent64tmp.vm\Snappy.snapshot

MasterImageVMDate        : 4/26/2013 2:20:41 PM

IdentityPoolUid          : 499727d7-3648-454a-9a30-1c934efffca1

IdentityPoolName         : London

HostingUnitUid           : 935be19a-7941-465e-9377-1673962f7525

HostingUnitName          : svrvcenter03

CleanOnBoot              : True

TaskId                   :

Metadata                 : {Citrix_DesktopStudio_UpdateId = 113152a9-82eb-4595-808e-9d1725d7c6dc:6cea07ff-1c5a-4b1e-80f8-a252e9b7984c}

MachineCount             : 5

ControllerAddress        : {svrctxddc01.domain.internal, svrctxddc02.domain.internal}

VMMetadata               : {H, 4, s, I...}

UsePersonalVDiskStorage  : False

PersonalVDiskDriveLetter :

PersonalVDiskDriveSize   : 0

PS C:\Users\tluk>


Make a note of the ProvisioningSchemeName and then use the Set-ProvScheme to set the new memory:

Set-ProvScheme -ProvisioningSchemeName "London_svrvcenter03" -VMMemoryMB "8192"


Note that you won’t receive an output when executing the Set-ProvScheme cmdlet.

To confirm that the changes to the pool have been applied, use the Get-ProvScheme command to display the pool properties:


Changing vCPU for Desktops

Changing vCPUs (CpuCount) is similar to memory but rather than using VMMemoryMB switch, use the VMCpuCount as shown in the following:

Set-ProvScheme -ProvisioningSchemeName "London_svrvcenter03" -VMCpuCount “2”



Note that changing these settings will only apply to new desktops deployed for the pool and not for existing desktops.  This means that if you had 200 desktops in the pool, simply executing updating the catalog with a new snapshot will not change the CPU or memory.  The only way to update them would be to use vSphere PowerCLI to change the settings for the existing VDIs or delete them and recreate the desktops if they are not persistent.

1 comment:

sakethsimha kosanam said...

This is very helpful. Thank you for that.

I am killing myself for several days to find out how to configure the CPUcores count on the parent image.

Can you please help me with the correct command.

Thank you,
SakethSimha Kosanam