This tutorial shows how to create a virtual workstation in Google Cloud that runs on CentOS 7 and that has a virtual display. A virtual machine (VM) with virtual display is ideal if you need to run applications that require a display device, but do not require the full power or cost of a GPU.
To create a Windows workstation, see Creating a virtual Windows workstation.
After you create the virtual workstation, you learn how to remotely access it using Teradici PC-over-IP (PCoIP), a remote desktop protocol that's widely used in industries such as media and entertainment, architectural visualization, finance, government, and healthcare. PCoIP offers features essential to workloads that require color accuracy and support for lossless display.
Objectives
- Create a Compute Engine instance. This instance serves as the foundation for a virtual workstation.
- Install Teradici Cloud Access Software on the virtual workstation.
- Connect to the virtual workstation using Teradici PCoIP Client or Zero Client, a type of hardware endpoint.
Costs
This tutorial uses the following billable components of Google Cloud:
You can use the Pricing Calculator to generate a cost estimate based on your projected usage. As of the time of writing, the approximate cost for a typical workstation configuration illustrated in this tutorial is $0.30 per hour.
The resources that make up the virtual workstation and the factors that affect cost in this tutorial are:
- An
n1-standard-4
machine type with 4 vCPUs and 15 GB of RAM - A 50-GB standard persistent boot disk
- Internet egress
Internet egress represents data that streams from your virtual workstation to your local display client and is billed at internet egress rates. Variables that affect data egress during a PCoIP session are bandwidth, screen resolution, number of display monitors, applications used, and the type of activity on each monitor. The cost for the virtual workstation configuration that you create in this tutorial is based on an average usage of 10 Mbps. Teradici's Session Planning Guide can help you understand different workload requirements.
You also need a Teradici Cloud Access Software license. If you don't already have a license, you can sign up for a trial license, or contact your Teradici representative. You will be provided with a 30-day trial registration code to use for this virtual workstation.
Before you begin
This tutorial uses gcloud
and gsutil
commands, which you can run from a
Cloud Shell
instance launched from the
Google Cloud Console.
If you want to use gcloud
and gsutil
on your local workstation, install the
Cloud SDK.
The tutorial shows you how to run commands in Cloud Shell; if you use the Cloud SDK on your workstation, adjust the instructions accordingly.
- Sign in to your Google Cloud account. If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
-
In the Google Cloud Console, on the project selector page, select or create a Google Cloud project.
-
Make sure that billing is enabled for your Cloud project. Learn how to confirm that billing is enabled for your project.
- Enable the Compute Engine API.
In addition, make sure you have the following:
- A Cloud project with quota for 4 vCPUs in your selected zone.
- A Google Chrome browser to access the Cloud Console.
- A Teradici Zero Client or the latest Teradici software client for Windows, Mac, or Linux to access the virtual workstation.
- A Teradici Cloud Access Software license. You can get a trial license as described earlier under Costs.
Architecture
The following diagram shows the components that are used in this tutorial to deploy a single virtual workstation. Optional components shown in the diagram include different ways to connect to your virtual workstation, object and shared storage, and an additional VM instance for serving third-party licenses.
Creating the virtual workstation
Teradici Standard Agent, which you install on your virtual workstation later in this tutorial, requires you to enable IP forwarding and to allow HTTPS server traffic when you create the virtual workstation.
Open Cloud Shell.
Set the zone that you want to use later to create your virtual workstation:
gcloud config set compute/zone zone
Replace
zone
with the name of the zone you're using, such asus-west2-b
.In Cloud Shell, create the Compute Engine instance for the virtual workstation:
gcloud compute instances create instance-name \ --machine-type=machine-type \ --enable-display-device \ --can-ip-forward \ --tags=https-server \ --image-project=image-project \ --image-family=image-family \ --boot-disk-size=size \ --boot-disk-type=book-disk-type
Replace the following:
instance-name
: The name of your instance.machine-type
: Either a general-purpose, predefined machine type or a custom machine type using the formatcustom-number-of-cpus-number-of-mb
.image-project
: The image project of that image family.image-family
: An optional flag that specifies which image family this image belongs to.size
: The size of the boot disk in GB.book-disk-type
: Eitherpd-standard
orpd-ssd
.
For example:
gcloud compute instances create test-vws \ --machine-type=n1-standard-4 \ --enable-display-device \ --can-ip-forward \ --tags=https-server \ --image-project=centos-cloud \ --image-family=centos-7 \ --boot-disk-size=50 \ --boot-disk-type=pd-standard
After the virtual workstation is created, the machine status is displayed. The output is similar to the following:
Created https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/test-vws. NAME ZONE MACHINE_TYPE PREEMPTIBLE INTERNAL_IP EXTERNAL_IP STATUS test-vws us-west2-b n1-standard-4 10.168.0.1 203.0.113.1 RUNNING
The virtual workstation is created in your project's default VPC network. If you want to create your virtual workstation in a different VPC network, add the following flag to the command:
--network=network
Replace
network
with the name of the network to use:Make a note of the virtual workstation's external IP address in the listing. You will use it later in the tutorial.
You can retrieve the external IP address of your virtual workstation at any time using the Cloud Console.
Signing in to your virtual workstation
After you create the virtual workstation, you sign in to the machine so that you can configure it.
In Cloud Shell, connect to the new virtual workstation:
gcloud compute ssh test-vws
Set your account password. Teradici PCoIP Client requires a user password.
sudo passwd `whoami`
When you're prompted, enter a password. You will use this password later in the tutorial to log onto your virtual workstation with the Teradici PCoIP Client.
Installing graphics libraries and a window manager
The default Google Cloud CentOS image is a minimal install of CentOS. The next step is to install libraries that are necessary to run your virtual workstation with the GNOME desktop environment.
On your virtual workstation, install the required components:
sudo yum -y update sudo yum -y groupinstall 'Server with GUI'
Installing Teradici Cloud Access Software
Teradici Cloud Access Software provides an agent that runs on your virtual workstation, delivering the desktop to your hardware or software client.
On your virtual workstation, install the Teradici repositories:
sudo yum -y install https://downloads.teradici.com/rhel/teradici-repo-latest.noarch.rpm
Install Teradici Standard Agent for Linux:
sudo yum -y update sudo yum -y install pcoip-agent-standard
Registering Teradici Standard Agent
On your virtual workstation, activate your Teradici Cloud Access Software license:
pcoip-register-host --registration-code=registration-code
Replace
registration-code
with the license registration code that you received from Teradici.Reboot the virtual workstation:
sudo reboot
Your connection from Cloud Shell is closed.
Creating a firewall rule
Teradici PCoIP Client communicates with your virtual workstation using several ports. You must set firewall rules that allow traffic to and from your virtual workstation.
In Cloud Shell (not on the virtual workstation), create a firewall rule that opens the required ports:
gcloud compute firewall-rules create allow-teradici \ --allow tcp:443,tcp:4172,udp:4172,tcp:60443
Signing in to your virtual workstation using PCo
On your local computer, go to the PCoIP Clients section on the Teradici support page, and then download, install, and launch Teradici PCoIP Client for your operating system.
Select New Connection.
In the Host Address field, enter the external IP address of your virtual workstation. If you want, you can enter a name for the connection.
When you are connected, authenticate by entering the username and password that you created earlier for the virtual workstation.
If you're prompted to select a desktop to run, select the one that you just created.
Click Connect.
In a few seconds, you see your Linux desktop.
Testing your virtual workstation
After you've deployed your virtual workstation, you can test performance and interactivity using a number of tools:
- Install Google Chrome on the virtual workstation to browse your favorite sites or play YouTube videos.
- Learn more about configuring the Teradici Standard Agent for Linux.
- Install applications and test their behavior and performance.
Troubleshooting
This section lists issues you might encounter when you set up or connect to the workstation.
Unable to connect to the virtual workstation
Issue: You are using PCoIP Zero Client, and you're unable to connect to your virtual workstation.
Solution: Ensure that your Zero Client has firmware version 6.1 or later installed before you connect to the virtual workstation. For more information, contact your local Teradici representative.
Cleaning up
After you've finished the tutorial, clean up the resources you created on Google Cloud so you won't be billed for them in the future.
Stopping your virtual workstation
Stopped virtual workstations incur costs for persistent disk usage, but they can be restarted at any time. To stop your virtual workstation, run the following command in Cloud Shell:
gcloud compute instances stop test-vws
Delete the project
- In the Cloud Console, go to the Manage resources page.
- In the project list, select the project that you want to delete, and then click Delete.
- In the dialog, type the project ID, and then click Shut down to delete the project.
Delete all the components
What's next
- Learn more about Teradici Cloud Access Software.
- Learn more about how Teradici PCoIP Client differs from other remote desktop protocols.
- Try out other Google Cloud features for yourself. Have a look at our tutorials.