Setting up the Prerequisites for Automatic Power Management of server teams
To use automatic power management of server teams, the following prerequisites must be fulfilled:
Supported Controller Version
HyWorks v3.3-R2 or later is integrated with features for on-demand Session Host Server provisioning and power management.
Supported Virtualization Platforms
Automatic power management and dynamic provisioning of the server team are supported with the following virtualization platforms:
-
Microsoft Azure
-
Nutanix AHV
-
VMware vCenter Server
-
AWS
Important
- Provisioned server teams can be created with Microsoft SCVMM and Hyper-V, but on-demand provisioning and power management are not supported with these platforms.
Supporting Services: Scheduler/Action Processor Installation and Configuration
To enable dynamic on-demand provisioning of the server team and automatic power management, the following supporting services must be installed on the HyWorks Controller management servers (Primary and secondary controllers):
-
Scheduler: Refer to the Scheduler Installation and Configurations in Installation Section
-
Action Processor: Refer to the Action Processor Installation and Configurations in Installation Section
Note
- Currently the Scheduler and the Action Processor must be installed on same the server as the HyWorks Controller. This is to manage these services through the HyWorks Controller.
Advance Global Configurations in the Action Processor (Optional)
The Administrator will be able to customize the message title, content and type based on the deployment configurations and requirements. This can be done using the Action Processor configuration file found at:
-
<Action Processor Installation Directory>\appsettings.json
Default Path: C:\Program Files (x86)\Accops\HyWorks\ActionProcessor\appsettings.json
-
MessageTitleForForceShutdown - This will be the title of the message shown when the server is shutdown forcefully.
-
MessageForForceShutdown: This will be the message shown to the user when the server is shutdown forcefully. For example = Logout from this desktop and log in again to get a new desktop. This server is planned to shut down at [DisplayEndTime].
-
MessageTitleForCordonOnly- This will be the title of the message shown when the server is marked as cordon and will be shutdown only after all the sessions are logged out.
-
MessageForCordonOnly*: This will be the message shown to the user when the server will be marked as cordon and will be shutdown only after all the sessions are logged out. For example = Logout from this desktop and log in in to get new desktop.
-
MessageDisplayMechanism: This will be the display mechanism to be used for the message.
-
0 = Normal Message (Windows/Zenity)
-
1 = Virtual Channel (Windows only)
-
2 = Tray Agent (in the future)
-
-
MessageDisplayType: This will be the display type of the message. Only one type of message will be active in SHD in the event that multiple messages are to be show in SHD
-
0: Resource Msg (Recommended) (to be used when sending messages regarding SHD shutdown)
-
1: Maintenance Msg
-
2: General Msg
-
-
MessageIntervalInMins: This will be the interval for displaying the message.
-
0: One time.
-
0 >: Show message x after the interval
-
-
MessageLevel: This will be the level of the message.
-
0 = Information
-
1 = Warning (Recommended for shutdown)
-
2 = Error
-
3 = Alert
-
4 = User Action Required.
-
-
ActionExecutionTimeoutInMins: This will be the time for execution of the single team scale or plan implementation processor.
-
ActionWaitDurationInSecs: This will be the number of secs to sleep after showing the notification to users. (recommended in 1 secs)
-
HyWorks Controller Configurations
Enable the Controller to manage the Scheduler service
To manage the Scheduler service by the HyWorks Controller, refer to this section
Capacity Plan Attributes
The Capacity plan in the HyWorks Controller defines the overall capacity that will be needed at any given point of time on a specific day. While defining a Capacity plan, the following screens appear before the Administrator:
Objectives in Capacity Plan
Objectives in the Capacity plan are used to define the expected capacity at any given point of time.
The Plan consist of multiple objectives with the following attributes:
-
Time – At this time, the assigned team`s capacity is updated and Scale UP & Down thresholds are applicable
-
Max Capacity %: This is the percentage of the team`s capacity that will be allowed when powered on, based, actual SHD power on based on sessions on team. Act as an upper limit.
-
Min Capacity %: This is the percentage of the team`s capacity that will be Powered On, irrespective of the number of sessions in the team.
-
Min Provisioned Capacity %: This is the percentage of the team's capacity that will be provisioned, irrespective of the number of sessions in the team.
-
Utilization Threshold for Scale up %: Dynamic scaling will be triggered to add more servers in the Powered On state if the overall session utilization of the team has reached or is above the threshold.
-
Utilization Threshold for Scale down %: Dynamic scaling will be triggered to reduce servers in the Powered On state if the overall session utilization of the team has reached or is below the threshold.
Capacity Plan Schedule
The second screen in the Capacity plan is Schedule, which defines the start and end date-time for the Capacity plan, along with the days on which the Capacity plan will be applied. The following options will be available:
-
Enable Capacity Plan: If set, then on-demand desktop provisioning will be applied to the server teams as per the plan's schedule and plan objective. If not set, then the plan will not be applied to perform on-demand desktop provisioning.
-
The Administrator can disable or enable the whole Capacity plan at any time using the 'Enable Capacity plan' setting
-
While disabling the Capacity plan, the Administrator should be more cautious as it will affect all the assigned server teams
-
-
Plan Valid From: This displays the date and time when the Plan becomes valid.
-
Plan Valid Till: This displays the date and time until which the Plan will be valid.
-
Plan Applicable on These Days: This option helps to select the days of the week when the plan can be applied to the associated server teams.
Team Association
The Administrator can search and add server teams via the Capacity plan.
The Session host teams deployed via the dynamic desktop pool are called managed server teams. Only managed server teams can be associated with a Capacity plan.
Power Management Advanced Configurations on Controller
Some advanced options can be configured for usage as per the requirement using the HyWorks Controller Management Console > Settings > General > Advance Config screen. Below is a list of these options:
-
Scheduler Service URL: This is the endpoint URL of the Scheduler service with the port.
-
Show Schedule Frequency Interval: If this value is true, then the Administrator can configure a schedule frequency interval on the pool, team, and the Capacity plan Add or Edit wizard.
-
Manage Scheduler Service: If this value is true, then the Controller will manage the state of the Scheduler service based on a cluster node. The Scheduler service is state full service, so it should be running only on the primary node of the Controller and should be stopped on the secondary node or session node.
-
Waiting Session Timeout: The waiting sessions are considered for scaling up the team for this time in minutes. Capacity management is enforced and running servers is 0 then the waiting session will be considered to scale up the team's running server capacity.
-
Capacity Planning Advanced Option: If this value is true, then the advanced option for Capacity planning will be visible on the UI, similar to the Apply now button on the Capacity plan grid page and the Scale Now button on the team grid page, etc.
-
Disable Team Capacity Planning: If this value is true, then the Team capacity planning feature will be disabled, irrespective of the settings on the team.
Recommended Configurations
VM Scale Booster
These configurations are required for faster updates of SHD VM power, SHD Agent, DVM Agent, and Monitoring Statuses. These configurations are highly recommended for large scale deployments, as polling of too many servers can cause a delay in updating the status of the Session Host Servers.
Ports to be opened
- Between SHD & Management controllers: 5672 (Default).
- Management port of Accops MQ: 15672 (Default).
Detailed steps to configure the VM Scale Booster
User shutdown setting on VM deletion
Servers are getting deleted on-demand as per the Capacity plan. It is recommended that the server be shutdown before it gets deleted. Set the Shutdown desktop on recompose and reset setting as True in the advance settings section.
Power Management Data to Accops Reporting Server (ARS)
The Controller pushes capacity planning related data to the ARS for individual teams that have capacity planning enabled and ARS configured. This data is sent along with the session monitoring data.
To enable session monitoring, the following flags should be enabled in the Management Console -> System -> Advance Config:
- Controller Session Monitoring: This setting should be set as True, the default is false
- Controller Session Monitoring Interval: This setting should be set as per the frequency of logs needed, the default is 15 minutes
The fields of capacity planning data are listed below:
- TeamId: Managed team Id.
- TeamName: Managed team name.
- PoolId: Shared hosted desktop pool Id.
- PoolName: Shared hosted desktop pool name.
- OrganizationId: Organization Id.
- OrganizationName: Organization name.
- Desk_Conf_TotalMaxCapacity: Total server capacity configured for managed team on pool configurations.
- Desk_Conf_MaxRunningCapacity: Maximum server capacity configured on team based on the current applicable capacity plan.
- Desk_Conf_MinRunningCapacity: Minimum server capacity configured on team based on the current applicable capacity plan.
- Desk_Conf_MinProvisionedCapacity: Minimum provisioned server configured on team based on the current applicable capacity plan.
- Desk_Conf_UpperThreshold: Scale up the threshold for the team.
- Desk_Conf_LowerThreshold: Scale down the threshold for the team.
- Desk_Active: Currently active server which are ready to server new connection.
- Desk_BeingDrained: Servers that are currently marked as cordon and will be drained or shutdown.
- Desk_PoweredOff: Current total powered on servers in the team, including servers with Sysprep or disk encryption pending or running.
- Desk_PoweredOn: Currently total powered off servers in the team.
- Desk_Provisioned: Currently total provisioned servers in the team.
- Desk_ProvisionFailed: The servers that are failed to provision.
- Desk_Provisioning: The servers that are currently under-provisioning, including the servers that have Sysprep or disk encryption pending or running.
- Desk_DesiredRunningCapacity: Expected number of servers need to be ready to accept a new connection.
- Formula: Desk_DesiredRunningCapacity = FLOOR( ( ( ( Con_ActiveConnected /Desk_Conf_UpperThreshold ) * 100 ) / MaxSessionPerServer ) + 0.5 )
- Desk_Idle: Servers which are Idle as per the total live connection on the team, this is calculated based on the below formula.
- Formula: Desk_Idle = FLOOR(Con_Idle/MaxSessionPerServer)
- Desk_UsableServer: The servers that are currently used and having an active connection in the team.
- Formula: Desk_UsableServer = Desk_Active + Desk_BeingDrained
- Desk_Overprovisioned: Servers that are over and above than the expected running capacity.
- Formula: Desk_Overprovisioned = Desk_UsableServer: Desk_DesiredRunningCapacity
- Con_Conf_TotalMaxCapacity: Total configured connection capacity based on the total server limit configured on the pool for the team.
- Formula: Con_Conf_TotalMaxCapacity = Desk_Conf_TotalMaxCapacity * MaxSessionPerServer
- Con_Conf_MaxCapacity: Maximum configured connection capacity based on the maximum running server as per capacity plan.
- Formula: Con_Conf_MaxCapacity = Desk_Conf_MaxRunningCapacity * MaxSessionPerServer
- Con_Conf_MinCapacity: Minimum configured connection capacity based on the maximum running server as per capacity plan.
- Formula: Con_Conf_MinCapacity = Desk_Conf_MinRunningCapacity * MaxSessionPerServer
- Con_ConnectionCapacity: Current connection capacity based on Active and Draining servers.
- Formula: Con_ConnectionCapacity = Con_DrainedCapacity + Con_ActiveCapacity;
- Con_ActiveConnected: Session running on Active servers.
- Con_BeingDrainedConnected: Session running on Draining servers.
- Con_TotalConnected: Total session running on Active and Draining servers.
- Formula:Con_TotalConnected = Con_BeingDrainedConnected + Con_ActiveConnected
- Con_DrainedCapacity: Current connection capacity on draining server.
- Formula: Con_DrainedCapacity = Desk_BeingDrained * MaxSessionPerServer;
- Con_ActiveCapacity: Current connection capacity on Active server
- Formula:Con_ActiveCapacity = Desk_Active * MaxSessionPerServer;
- Con_Desired: Expected connection capacity.
- Formula: Con_Desired = Desk_DesiredRunningCapacity * MaxSessionPerServer;
- Con_Idle: Current Idle server capacity.
- Formula: Desk_Idle = FLOOR(Con_Idle/MaxSessionPerServer)