Citrix is excited to announce the availability of power management support for Google Cloud Platform (GCP) on Citrix Cloud. We’re offering a better way to work with Google Cloud instances. The trusted and reliable cloud that powers YouTube, Google Maps, and Google Search — Google Cloud Platform — now is power manageable with Citrix Cloud. This is a new feature of the Citrix Cloud XenApp/XenDesktop service. Leverage it to manage your GCP desktop workflows!

This post will review the use case and benefits of XenApp/XenDesktop power management for GCP instances. Also, it will provide some high-level setup instructions to get started.

Use Case

The functionality provided by the XenApp/XenDesktop service can be used with the Google Cloud Platform (For a primer on XenApp/Desktop service go here). If you are using or plan to use GCP to host your session-based workspaces, this feature enables you to manage those existing workspaces inside XenApp/XenDesktop. By integrating with GCP, Citrix allows you to organize your GCP instances into machine catalogs and delivery groups. Those groups are then assigned to your users, with power management of those machines provided by the XenApp/XenDesktop Service. You can use the already-existing capabilities of XenApp/XenDesktop to schedule machine power actions, such as to “turn off” at night or other low-usage times. The Citrix Broker service automatically turns those machines on when a user needs them.

Making Connections

So how do you start working with GCP in Citrix Cloud? Here’s an overview:

  1. Set up GCP
  2. Create a connection
  3. Create a Machine Catalog
  4. Create a Delivery Group

Google Cloud Platform Project

A GCP Project is required for all GCP use cases. If you use GCP, you probably already have a Project. If you’re new to the Google Cloud Platform, check out this page for creating and managing projects.

At least one Project is required to manage GCP resources; Citrix supports managing VMs across multiple Projects as well.

Beyond a Project’s existence, some features need to be turned on within the Project to make use of it. Every GCP Project has an API Library that enables external consumers (such as XenApp/XenDesktop ) to interact with it. For Citrix to utilize a Project, both the “Compute Engine API” and the “Cloud Resource Manager API” must be enabled.

These APIs both can be enabled in the GCP cloud console.

Service Account

Once the Project is set up there’s one more piece that is required to use it within XenApp/XenDesktop: a GCP Service Account. This Service Account is created within a single Project but permissions for its use can be given to many Projects. For Citrix to use it to perform power management within a given Project, it must include the following roles for that Project:

  • Project Browser
  • A Custom compute role with the following permissions:
    • instances.get
    • instances.list
    • instances.reset
    • instances.start
    • instances.stop
    • regions.list
    • zoneOperations.get
    • zoneOperations.list
    • zones.list

For convenience, the “Compute Instance Admin (v1)” role may be used in lieu of the custom role, but it does provide more access than the plugin actually needs.

When creating a Service Account there is an option to create a private key for the account. You will use this private key when creating a connection in Studio. Access to the private key comes in the form of a credentials file that you will download when creating it. Studio requires the credentials file to use the JSON format.

Here is a look at the screen from the GCP Web Console displayed when creating a Service Account, along with the appropriate options. (The name can be different.)

Cloud Connector

As with other hosting connections in Citrix Cloud, setting up Cloud Connectors is required. The Cloud Connectors must be set up on instances in GCP and reside in the same network and domain as the other instances you wish to manage. Citrix recommends that you have two Cloud Connectors set up on your network. These connectors will be the resource locations you use inside Citrix Cloud and XenApp/XenDesktop. Follow this link to learn more about installing Cloud Connectors.

Creating a Connection in Studio

Once the above prerequisites are complete, a connection to GCP in Citrix Studio can be created. Under the “Hosting” section, the typical setup work flow will be followed by clicking “Add Connection and Resources.” Then selecting “Google Cloud Platform” and clicking the “Import key” button. That opens a window where the contents of the previously-downloaded credentials file can be pasted. After that, only a name for the connection is required and you’re done!  Easy!

Cataloging

Now that Studio can access GCP, a Machine Catalog can be created and you can begin managing those machines. From here forward, most of the functionality resembles other cloud hosting infrastructures.

Preparing Instances

For XenApp/XenDesktop to power manage an instance, the instance must have the Citrix Virtual Delivery Agent installed. Additionally, these instances should be joined to the same domain as the cloud connectors in your resource location.

For more info about VDAs, visit this page and this page.

Creating a Machine Catalog

When creating a GCP machine catalog, use the Server OS option. In the “Machine Management” section “Machines that are power managed” should be selected as well as the “Another service or technology” option. Machine provisioning via MCS is not yet supported.

For general information about creating a Machine catalog, click this link.

When selecting machines, you will have the ability to go through your Projects and select the GCP instances to add to the catalog. VM selection is organized in the following hierarchy:

Connection → Project → Region → Instance

Once the machines have been selected, the AD computer account name of each one must be specified. Finally, give the catalog a name and now you have machines that you can manage.

Delivering Value

With GCP instances now part of a Machine Catalog, XenApp/XenDesktop can issue power actions to those machines. More importantly, they can be incorporated into a Delivery Group, and assigned to users. This will make them available for use from StoreFront. For more information about setting up Delivery Groups, see the information here.

We look forward to seeing our customers make use of this new feature! We’d love to hear your feedback and experiences! Thanks for reading!