XenDesktop & XenApp Power Management

This post is designed to explain the different types of settings and scenarios surrounding power managing XenDesktop and XenApp machines using Citrix XenDesktop 7.9.

Static XenDesktop Desktops

Take a look at the Power Management settings on a Static Desktop Delivery Group.


So what have we got to play with?

Firstly, you need to assign peak hours. These generally will match your core business hours. Static desktops will be powered on as soon as we enter the peak hours, ready for users. It is important to note that if they are shut down during peak hours they won’t (by default) be automatically powered back on. Only when an assigned user again attempts to connect to the desktop will it be powered on. Peak hours can be set for weekends and weekdays.

Next we have During peak hours:

When disconnected – What to do when a session has been disconnected for a length of time. No action, Suspend or Shut Down.

When logged off – What to do when a session has been logged off for a length of time. No action, Suspend or Shut Down.

During off-peak hours:

When disconnected – What to do when a session has been disconnected for a length of time. No action, Suspend, or Shut Down.

When logged off – What to do when a session has been logged off for a length of time. No action, Suspend or Shut Down.

As mentioned above, desktops do not power on automatically after they have been shut down until the peak period starts again or a user starts connecting to the machine. A user if the ability is granted could shut down a desktop mistakenly or other factors outside of XenDesktop could cause machines to power down. If you would like machines to power on automatically during peak hours run the following command against the Static/Persistent Desktop Delivery Group.

Set-BrokerDesktopGroup -Name “DGName” -AutomaticPowerOnForAssignedDuringPeak $true


Non-persistent XenDesktop Desktops

Pooled Desktops that do not persist change come with different power management settings as shown in the preceding screenshot.


Firstly set how many machines should be powered on and when. The peak hours directly beneath should also be set. If you click the Edit button you can also specify how many machines are powered on or specify a percentage of the pool.

During peak hours:

When disconnected – What to do when a session has been disconnnected for a length of time. No action, Suspend or Shut Down.

During off-peak hours:

When disconnected – What to do when a session has been disconnected for a length of time. No action, Suspend or Shut Down.

By default, when a user logs off a random/non-persistent machine, the machine restarts in order to flush the changes made to the machine in preparation for a new user session. 7-min

If you want to disable machine restarts after logoff run command:

Set-BrokerDesktopGroup -Name “DGName” -ShutdownDesktopsAfterUse $false8-min

VDI desktops that have no user assignment for example pooled or static, or XenApp machines all come with a 10% peak and off peak buffer. This means that if you specify 100 machines out of the 200 in a Delivery Group to be powered on and available at 10pm, the buffer by default is 10% of the Delivery Group. This means an extra 20 machines would always be kept available for connecting users. Once the 101st person logs on another machine is powered on to keep the buffer at 10%.

To control the values for peak and off-peak and specify that 100% of the machines be powered on use command Set-BrokerDesktopGroup “Deliverygroupname” -PeakBufferSizePercent 100 or -OffPeakBufferSizePercent 100.

XenApp Shared Desktops/Apps

Firstly make sure you have host connections defined in Citrix Studio or else your Delivery Controllers won’t be able to instruct the Hypervisor to power manage machines. Navigate to Citrix Studio -> Configuration -> Hosting -> Add Connection and Resources.4-min

Hosts you can make a connection to:

  • VMware vSphere
  • XenServer
  • CloudPlatform
  • Microsoft Azure Classic
  • Amazon EC2
  • Microsoft SCCM WOL (Wake on LAN)
  • Nutanix Acropolis

To set a restart schedule, right-click a Delivery Group -> Edit Delivery Group.5-min

Click Restart Schedule and then specify parameters to suit your needs:

Restart frequency: Every day, or every certain day of the week.

Begin restart at: Specify time to begin restarts.

Restart duration: Restart all machines at once or within a certain amount of time i.e. 4 hours. If you set a reboot duration of 4 hours and have 20 machines, machines are spliced in to two reboot groups. Each reboot group will contain 10 VDAs. The reboot cycle is calculated by the amount of time set for the reboot duration and the number of machines that have to be restarted. In this case, 240 minutes divided by 20 machines. This equals to 12 minutes. This means, a VDA will be restarted every 12 minutes. Most preferred VDAs are chosen first, preferred VDAs are those that are currently registered against a Delivery Controller, not in maintenance mode and have the fewest user connections.

Send notification to users: Yes or No. If Yes, send a notification to users 1, 5 or 15 minutes before restart. If you select 15 minutes, you have the option to resend the notifications every 5 minutes.

Notification message: Your defined text explaining that machines will be restarted.  6-minA tip to note is that if a machine is in maintenance mode, it won’t be restarted by the schedule.

Creating multiple restart schedues is now possible in XenApp & XenDesktop 7.12 http://www.jgspiers.com/create-multiple-restart-schedules-xenapp-xendesktop-7-12/


  • Girdhar

    September 16, 2016

    Excellent article i always have a confusion in power management. Thanks for clearing it. Is power management same in xendekstop 5.x also.

    • George Spiers

      September 16, 2016

      Thanks Girdhar.
      XenDesktop 5.x has the majority of power management options that XenDesktop 7.x has. Powering on desktops during peak hours, defining peak hours, setting power actions based on disconnected/logged off time etc.

  • Lalit Gopal Bansal

    September 23, 2016

    Really Helpful .. Got to know new things 🙂

  • carsten

    December 22, 2016

    great writeup.

    Is it a new configuration regarding host connection ?? Just upgraded xenapp 7.11 to 7.12, and now restart schedule does NOT Work. But I have never had a connection to VMM before because the VM’s were not managed from studio. cant find any doc about that ?


  • George Spiers

    December 22, 2016

    You need a Host Connection to power manage machines, this applies to XenApp 7.12, XenApp 7.11 and below versions also. If there is no host connection you have to manually add the VMs to a Machine Catalog by host name, and they will be unmanaged when it comes to power.


Leave a Reply