This article describes how to increase the time allowed for a Virtual Machine (VM) to start up and register with a XenDesktop site during session launch. This might be required in environments where launches fail because of long VM startup times rather than a specific fault.
The default maximum time allowed for a VM to register after being switched on or resumed for a session launch is 2 minutes (this is in addition to the time allowed to establish the connection from the user’s device to the VM and so on). In most environments this default time is adequate to reliably allow a VM to start-up and register.
In some environments, in particular Cloud-based, VMs might routinely require more than 2 minutes. In this case the maximum allowed time can be specified using the following registry value on the controller:
Caution! Refer to the Disclaimer at the end of this article before using Registry Editor.
HKLM\Software\Citrix\DesktopServer\ExtraSpinUpTimeSecs (DWORD)
The same value must be specified on all controllers in the site. Alternatively the value can be provided by GPO using this registry value:
HKLM\Software\Citrix\Policies\DesktopServer\ExtraSpinUpTimeSecs (DWORD)
Both preceding values are specified in seconds. The default time used where neither value exists is 120.
This setting is site-wide (it cannot, for example, be restricted to a specific hypervisor connection) and it applies in all cases where a VM must be switched on or resumed in order to accomplish a session launch request.
Note: If the allowed time is increased above 20 minutes then the MaxRegistrationDelayMin registry value (same paths as above) must also be adjusted. This defines the maximum time allowed after a VM is switched on for it to register, this is specified in minutes (not seconds) and defaults to 20. If the machine has not registered after this time, it is assumed to have failed and is shut down.
Although the maximum allowed time can be increased to any required value, the user is waiting for their session to launch during this period, so if very long times are routinely required, then the interactive experience is likely to be poor and might ultimately be unacceptable.
In shared delivery groups, the impact of these long startup times can be mitigated by specifying appropriate pool management buffer size values to keep a small number of idle machines running in a state suitable for immediate use. These buffer sizes can be adjusted using the PowerShell SDK.
For more information, see the PeakBufferSizePercent and OffPeakBufferSizePercent parameters of the Set-BrokerDesktopGroup cmdlet.
For additional information about registry settings that impact the behavior of the Citrix Broker Service, see CTX126704 - Registry Entries Used by XenDesktop 5.x Broker Service
For general information about the XenDesktop PowerShell SDK, see the online documentation.