Machines

May 11, 2018

Unless otherwise noted, the following procedures are supported for all Delivery Group types: Server OS, Desktop OS, and Remote PC Access.

Shut down and restart machines

Note: This procedure is not supported for Remote PC Access machines.

  1. Select Delivery Groups in the Studio navigation pane.
  2. Select the Delivery Group and then select View Machines in the Actions pane.
  3. Select the machine and select one of the following in the Actions pane (some options may not be available, depending on the machine state):
    • Force shut down: Forcibly powers off the machine and refreshes the list of machines.
    • Restart: Requests the operating system to shut down and then start the machine again. If the operating system cannot comply, the machine remains in its current state.
    • Suspend: Pauses the machine without shutting it down, and refreshes the list of machines.
    • Shut down: Requests the operating system to shut down.

If the machine does not shut down within 10 minutes, it is powered off. If Windows attempts to install updates during the shutdown, there is a risk that the machine will be powered off before the updates finish.

Note: Citrix recommends that you prevent Desktop OS machine users from selecting Shut Down within a session. See the Microsoft policy documentation for details.

Power manage machines

Note: You can power manage only virtual Desktop OS machines, not physical ones (including Remote PC Access machines). Desktop OS machines with GPU capabilities cannot be suspended, so power off operations fail. For Server OS machines, see Create a restart schedule.

 

Machines can be in one of the following states:

  • Random
    • Randomly allocated and in use
    • Unallocated and unconnected
  • Static (assigned)
    • Permanently allocated and in use
    • Permanently allocated and unconnected (but ready)
    • Unallocated and unconnected

During normal use, static Delivery Groups typically contain both permanently allocated and unallocated machines. Initially, all machines are unallocated (except for those manually allocated when the Delivery Group was created). As users connect, machines become permanently allocated. You can fully power manage the unallocated machines in those Delivery Groups, but only partially manage the permanently allocated machines.

  • Pools and buffers: For random Delivery Groups and unallocated machines in static Delivery Groups, a pool is a set of unallocated (or temporarily allocated) machines that are kept in a powered-on state, ready for users to connect; a user gets a machine immediately after log on. The pool size (the number of machines kept powered-on) is configurable by time of day. (For static Delivery Groups, use the SDK to configure the pool.)

    A buffer is an additional standby set of unallocated machines that are turned on when the number of machines in the pool falls below a threshold that is a percentage of the Delivery Group size. For large Delivery Groups, a significant number of machines might be turned on when the threshold is exceeded, so plan Delivery Group sizes carefully or use the SDK to adjust the default buffer size.

  • Power state timers: You can use power state timers to suspend machines after users have disconnected for a specified amount of time. For example, machines will suspend automatically outside of office hours if users have been disconnected for at least ten minutes. Random machines or machines with Personal vDisks automatically shut down when users log off, unless you configure the ShutdownDesktopsAfterUse Delivery Group property in the SDK.

    You can configure timers for weekdays and weekends, and for peak and nonpeak intervals.

  • Partial power management of permanently allocated machines: For permanently allocated machines, you can set power state timers, but not pools or buffers. The machines are turned on at the start of each peak period, and turned off at the start of each off-peak period; you do not have the fine control that you have with unallocated machines over the number of machines that become available to compensate for machines that are consumed.

To power manage virtual Desktop OS machines:

  1. Select Delivery Groups in the Studio navigation pane.
  2. Select a Delivery Group, and then select Edit Delivery Group in the Actions pane.
  3. On the Power Management page, select Weekdays in the Power manage machines dropdown. (By default, weekdays are Monday to Friday.)
  4. For random Delivery Groups, in Machines to be powered on, select Edit and then specify the pool size during weekdays. Then, select the number of machines to power on.
  5. In Peak hours, set the peak and off-peak hours for each day.
  6. Set the power state timers for peak and non-peak hours during weekdays:
    • In During peak hours > When disconnected, specify the delay (in minutes) before suspending any disconnected machine in the Delivery Group, and select Suspend.
    • In During off-peak hours > When disconnected, specify the delay before turning off any logged-off machine in the Delivery Group, and select Shutdown. This timer is not available for Delivery Groups with random machines.
  7. Select Weekend in the Power manage machines dropdown, and then configure the peak hours and power state timers for weekends.

Use the SDK to:

  • Shut down, rather than suspend, machines in response to power state timers, or if you want the timers to be based on logoffs, rather than disconnections.
  • Change the default weekday and weekend definitions.

Create a restart schedule

Note: You can use a restart schedule for Server OS machines only. For Desktop OS machines, see Power manage machines.

To configure a restart schedule:

  1. Select Delivery Groups in the Studio navigation pane.
  2. Select a Delivery Group, and then select Edit Delivery Group in the Actions pane,
  3. On the Restart Schedule page:
    • In the Restart machines drop-down, choose how often to restart the machines.

    • In the Restart first group at fields, specify the hour and minute (in 24-hour format) when the first server will begin the restart process.

    • In the Restart additional groups every drop-down, Indicate whether all servers should be restarted at once, or how much time should be allowed to restart every server in the Delivery Group.

      For example, assume a Delivery Group has five servers, a Restart first group at time of 13:00 (1:00 pm), and a Restart additional groups every selection of 1 hour. That duration (60 minutes) is divided by the number of machines (five), which yields a restart interval of 12 minutes. So, the restart times are 1:00 pm, 1:12 pm, 1:24 pm, 1:36 pm, and 1:48 pm. This gives all five machines the chance to complete their restart at the end of the specified interval (1 hour).

    • Indicate whether you want to send a message to users at a specified interval before they are logged off. The notification will be sent relative to each server’s calculated restart time, as described in the example.

You cannot perform an automated power-on or shutdown in Studio.

Prevent users from connecting to a machine (maintenance mode)

When you need to temporarily stop new connections to machines, you can turn on maintenance mode for one or all the machines in a Delivery Group. You might do this before applying patches or using management tools.

  • When a Server OS machine is in maintenance mode, users can connect to existing sessions, but cannot start new sessions.
  • When a Desktop OS machine (or a PC using Remote PC Access) is in maintenance mode, users cannot connect or reconnect. Current connections remain connected until they disconnect or log off.
  1. Select Delivery Groups in the Studio navigation pane.
  2. Select a Delivery Group.
  3. To turn on maintenance mode for all machines in the Delivery Group, select Turn On Maintenance Mode in the Actions pane. To turn on maintenance mode for one machine:
    1. Select View Machines in the Actions pane.
    2. Select a machine, and then select Turn On Maintenance Mode in the Actions pane.
  4. To turn maintenance mode off for one or all machines in a Delivery Group, follow the previous instructions, but select Turn Off Maintenance Mode in the Actions pane.

Windows Remote Desktop Connection (RDC) settings also affect whether a Server OS machine is in maintenance mode. Maintenance mode is on when any of the following occur:

  • Server maintenance mode is set to on, as described above.
  • RDC is set to Don’t allow connections to this computer.
  • RDC is not set to Don’t allow connections to this computer, and the Remote Host Configuration User Logon Mode setting is one of the following:
    • Allow reconnections, but prevent new logons
    • Allow reconnections, but prevent new logons until the server is restarted.

Reallocate machines (change users)

Note: You can reallocate only Desktop OS machines, not Server OS machines or machines created through Provisioning Services.

  1. Select Delivery Groups in the Studio navigation pane.
  2. Select a Delivery Group.
  3. To reallocate more than one machine:
    1. Select Edit Delivery Group in the Actions pane.
    2. On the Machine Allocation (User Assignment) page, select machines and specify the new users.
  4. To reallocate one machine:
    1. Select View Machines in the Actions pane.
    2. Select a machine, and then select Change User in the Actions pane.
    3. Add or remove the user.

Change the maximum number of machines per user

  1. Select Delivery Groups in the Studio navigation pane.
  2. Select a Delivery Group, and then select Edit Delivery Group in the Actions pane.
  3. On the User Settings page, set the desktops per user value.

Identify machines using tags

You can use tags to refine a machine search or to limit machine access. You can add any number of tags of any length.

  1. Select Delivery Groups in the Studio navigation pane.

  2. Select a Delivery Group, and then select View Machines in the Actions pane.

  3. Select a machine.

  4. To add tags, select Add Tag in the Actions menu and then enter one or more tags, separated by semicolons (;).

    To change or remove tags, select Edit Tags in the Actions menu and then make the necessary changes.

Load manage

Note: You can load manage Server OS machines only.

Load Management measures the server load and determines which server to select under the current environment conditions. This selection is based on:

  • Server maintenance mode status: a Server OS machine is considered for load balancing only when maintenance mode is off. (See Prevent users from connecting to a machine (maintenance mode) for details.)

  • Server load index: determines how likely a server delivering Server OS machines is to receive connections. The index is a combination of load evaluators: the number of sessions and the settings for performance metrics such as CPU, disk, and memory use. You specify the load evaluators in load management policy settings.

    • You can monitor the load index in Director, Studio search, and the SDK.
    • In Studio, the Server Load Index column is hidden by default. To display it, select a machine, right-select a column heading and then choose Select Column. In the Machine category, select Load Index.
    • In the SDK, use the Get-BrokerMachine cmdlet.

    A server load index of 10000 indicates that the server is fully loaded. If no other servers are available, users might receive a message that the desktop or application is currently unavailable when they launch a session.

  • Concurrent logon tolerance policy setting: the maximum number of concurrent requests to log on to the server. (This setting is equivalent to load throttling in XenApp versions earlier than 7.5.)

If all servers are at or higher than the concurrent logon tolerance setting, the next logon request is assigned to the server with the lowest pending logons. If more than one server meets this criteria, the server with the lowest load index is selected.

For more information, see Policy settings reference.

Remove a machine

Removing a machine deletes it from a Delivery Group but does not delete it from the machine catalog that the Delivery Group uses. Therefore, the machines are available for assignment to other Delivery Groups.

Machines must be shut down before they can be removed. To temporarily stop users from connecting to a machine while you are removing it, put the machine into maintenance mode before shutting it down.

Keep in mind that machines may contain personal data, so use caution before allocating the machine to another user. You may want to reimage the machine.

  1. Select Delivery Groups in the Studio navigation pane.
  2. Select a Delivery Group and the select View Machines in the Actions pane.
  3. Make sure that the machine is shut down.
  4. Select Remove from Delivery Group in the Actions pane.

Restrict access to machines

Any changes you make to restrict access to machines in a Delivery Group supersede previous settings, regardless of the method you use. You can:

  • Restrict access for administrators using Delegated Administration scopes. You can create and assign a scope that permits administrators to access all applications, and another scope that provides access to only certain applications. See the Delegated Administration documentation for details.

  • Restrict access for users through SmartAccess policy expressions that filter user connections made through NetScaler Gateway.

    1. Select Delivery Groups in the Studio navigation pane.
    2. Select the Delivery Group and then select Edit Delivery Group in the Actions pane.
    3. On the Access policy page, select Connections through NetScaler Gateway.
    4. To choose a subset of those connections, select Connections meeting any of the following filters. Then define the NetScaler Gateway site, and add, edit, or remove the SmartAccess policy expressions for the allowed user access scenarios. For details, see the NetScaler Gateway documentation.
  • Restrict access for users through exclusion filters on access policies that you set in the SDK. Access policies are applied to Delivery Groups to refine connections. For example, you can restrict machine access to a subset of users, and you can specify allowed user devices. Exclusion filters further refine access policies. For example, for security you can deny access to a subset of users or devices.

    By default, exclusion filters are disabled.

    For example, for a teaching lab on a subnet in the corporate network, to prevent access from that lab to a particular Delivery Group, regardless of who is using the machines in the lab, use the following command: Set-BrokerAccessPolicy -Name VPDesktops_Direct -ExcludedClientIPFilterEnabled $True -

    You can use the asterisk (*) wildcard to match all tags that start with the same policy expression. For example, if you add the tag VPDesktops_Direct to one machine and VPDesktops_Test to another, setting the tag in the Set-BrokerAccessPolicy script to VPDesktops_* applies the filter to both machines.

Update a machine

  1. Select Delivery Groups in the Studio navigation pane.
  2. Select the Delivery Group, select View Machines in the Action pane.
  3. Select a machine and then select Update machines in the Actions pane.
    • To choose a different master image, select Master image. Then select a snapshot. Expanding a selected snapshot displays associated master images.
    • To apply changes and notify machine users, select Rollout notification to end-users. Then specify:
      • When to update the master image: now or on the next restart.
      • The restart distribution time: all machines at the same time or at time variations.
      • If and when users will be notified of the restart, plus the message they will receive.