This article contains information about the functionality and options available for power management of virtual machines by the XenDesktop 5 broker as it interacts with the hypervisor.
When designing and managing a XenDesktop environment, it is important to understand the interaction between the Desktop Delivery Controller (DDC) and the hypervisor in the environment. The DDC issues Power Actions to the hypervisor for virtual machines for various reasons, such as:
User Driven Restart.
Administrator restart through Management Console.
Failed Registration or Registration timeout.
Idle Pool Count Requirements.
This article details some of the underlying functionality and options available to control these actions. It focuses particularly on criteria for and behaviour during Power Actions, which fail to succeed.
Standard Shutdowns issued by the DDC (Pool Management – Idle Pool Count*; Administrator issued; Registration Timeout) are:
Initially a graceful shutdown.
Promoted to a non-graceful turn-off if initial action fails.
Note: There is no immediate further attempt to shut down.
*Idle Pool numbers (running and idle machines) are re-assessed on a per-desktop group basis each time the PowerPolicy site service activates (every 60 seconds by default). Each time this re-assessment decides that some machines must be shut down; the appropriate number of random machines is chosen from the set of suitable machines such as the idle ones. This triggers a repeat of the preceding 1 and 2 actions.
User Driven Restarts result in a non-graceful turn-off action immediately.
Note: There is no immediate re-attempt to restart. Re-attempt is performed only when the user requests a restart.
If you are not using the DDC to start the virtual machine, then the MaxRegistrationDelayMin registry entry has no effect, and shutdown actions from the DDC should only occur because of user actions, either Administrator or end-user (User Driven Restart).
Refer to CTX126704 - Registry Entries Used by XenDesktop 5.x Broker Service for details of XenDesktop 5 registry settings.
A single failed turn-on or resume action results in the machine to be in "SinBin" for a duration as configured in the MachineStartSinBinSeconds registry entry. Failures of other power actions will not result in the machine being placed in the "SinBin". While a desktop is in the “sin bin”, no power actions will be issued for it.
XenDesktop 5 allows control of the timeout for marking a registration as failed after a broker driven power-on and also the number of consecutive failed registrations of a "bad" virtual machine before it is deemed bad and marked as in Maintenance Mode.
This is configured through the registry on each DDC and the registry values are MaxRegistrationDelayMin and MaxFailedRegistrationsAllowed.
Refer to CTX126704 - Registry Entries Used by XenDesktop 5.x Broker Service for details of XenDesktop 5 registry settings.
From a Pool Management perspective, this is dependent only on the health of the hypervisor services or resources. For example, running out of memory or disk space to be able to start the virtual machine.
The health or response of an individual virtual machine has no direct influence, that is, the DDC or Pool Management does not require the VM to reach the ON state following a turn-on action, but merely that the hypervisor turn-on operation does not fail.
A failed action can be described as an overall failure of the operation as reported through the HCL to the broker. This is typically an asynchronous result reported to the broker sometime after the original operation request. It could be because of timeout in the HCL; or a timeout detected or any other error condition reported from the hypervisor.
Throttling of overall power operations to the hypervisor is possible through console or PowerShell/SDK.
The power actions can be throttled by the following actions:
Max absolute number of simultaneous active actions.
Max absolute number of new actions started per minute.
Max number of simultaneous active actions as a percentage of the number of virtual machines on the hypervisor (the entire hypervisor pool is accessed through this connection).
Access the Configuration node and select Hosts.
Select the Host to be configured.
Select Change Details.
Click Advanced to display dialog box to show or edit the throttling levels.
The following are the metadata values:
Citrix_Broker_MaxAbsoluteActiveActions
Citrix_Broker_MaxAbsoluteNewActionsPerMinute
Citrix_Broker_MaxPowerActionsPercentageOfDesktops
Citrix_Broker_MaxPvdPowerActionsPercentageOfDesktop
CTX127254 - XenDesktop 5.6 SDK Cmdlet Help
CTX126704 - Registry Entries Used by XenDesktop 5.x Broker Service
Citrix Help - XenDesktop Broker - Machine Power ManagementCitrix Documentation - Connections and resources