This tutorial shows how to create a virtual Linux workstation running CentOS 7 with a virtual display. A virtual display device is useful when applications on your virtual machine (VM) instances require a display device, but don't require the full power or cost of a GPU.
For information about other types of virtual workstations, including Windows, see About creating a virtual workstation.
After you create a virtual workstation, this tutorial shows you how to remotely access it using HP Anyware (formerly Teradici CAS), using PC-over-IP (PCoIP®) technology, a remote desktop protocol that is widely used in the media and entertainment, game development, architecture, and engineering industries. PCoIP offers features essential to these types of workloads, such as color accuracy, support for multiple monitors, lossless display, and tablet pressure sensitivity.
This tutorial assumes you are familiar with the Linux command line.
Objectives
- Create a Compute Engine VM. This VM serves as the foundation for a virtual workstation.
- Install HP Anyware software on the virtual workstation.
- Connect to the virtual workstation using a PCoIP software client.
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.
The resources that make up the virtual workstation and the factors that affect cost in this tutorial are:
- 4 vCPUs, 16 GB RAM E2 standard machine type
- 20-GB SSD balanced boot disk
- Internet outbound data transfer costs
Internet data transfer represents data that streams from your virtual workstation to your local display client. Variables that affect data transfer during a PCoIP session are bandwidth, screen resolution, number of display monitors, applications used, and the type of activity on each monitor. The HP Anyware Session Planning Guide can help you understand different workload requirements.
Before you begin
This tutorial uses the Google Cloud CLI, which you can run from Cloud Shell, or your local workstation. If you want to use the Google Cloud CLI on your local workstation, install the Google Cloud CLI.
- 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 Google Cloud project.
-
Enable the Compute Engine API.
-
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 Google Cloud project.
-
Enable the Compute Engine API.
In addition, make sure you have the following:
- A web browser to access the Google Cloud console.
- The latest PCoIP Client software for Windows, Mac, or Linux to access the virtual workstation.
- An account on help.teradici.com to download the HP Anyware software. Account registration is free.
- An HP Anyware software license. You can request a trial license, or contact your HP Anyware representative and ask for a trial registration code to use for this virtual workstation.
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, shared storage, an additional VM for serving third-party licenses, and additional infrastructure representing a render or compute farm.
Choose a region
An important factor when you deploy a virtual workstation is the latency between your location and the VM you create. The lower the latency, the better the experience. Therefore, you want to place your VM in a region and zone that's geographically closest to you.
Create the virtual workstation
Create the Compute Engine virtual workstation VM by running the following command:
gcloud compute instances create test-workstation \ --zone=ZONE \ --machine-type=e2-standard-4 \ --enable-display-device \ --image-project=centos-cloud \ --image-family=centos-7 \ --boot-disk-size=20 \ --boot-disk-type=pd-balanced \ --network=default
Replace ZONE
with the zone that's geographically closest
to you. An important factor when you deploy a virtual workstation is the latency
between your location and the VM you create. The lower the latency, the better
the experience. For information about the geographical location of zones, see
Available regions and zones.
After the virtual workstation is created, the VM status is displayed. The output looks similar to the following:
NAME: test-workstation ZONE: us-west1-b MACHINE_TYPE: e2-standard-4 PREEMPTIBLE: INTERNAL_IP: 10.138.XX.XXX EXTERNAL_IP: XX.XXX.XXX.XXX STATUS: RUNNING
Note the external IP address, you need it later in the tutorial.
Sign in to your virtual workstation
After you create the virtual workstation, sign in to the VM so that you can configure it.
Connect to the virtual workstation using the following command:
gcloud compute ssh test-workstation
Set your account password, as required by Teradici PCoIP, using the following command:
sudo passwd `whoami`
Store your password somewhere safe, you need it later in the tutorial.
Install a window manager
The default Google Cloud CentOS 7 image is a minimal installation of CentOS 7.x. The next step is to install libraries that are necessary to run your virtual workstation with a desktop and window manager. For this tutorial, you also install the KDE window manager.
Update the software repositories by running the following command:
sudo yum -y update
Install the required components by running the following command:
sudo yum -y groupinstall "Server with GUI"
Reboot the workstation by running the following command:
sudo reboot
Your connection to the virtual workstation closes.
Install HP Anyware software
HP Anyware software provides an agent that runs on your virtual workstation, delivering the desktop to your hardware or software client.
Retrieve your download token
Each HP Anyware account is assigned a unique token that allows access to the HP Anyware software repository.
- On your local workstation, sign in to your help.teradici.com account. If you don't have an account, create one.
- Navigate to the HP Anyware product page.
- In the PCoIP Hosts section, select Standard Agent for Linux.
- Select Downloads and scripts.
- If you accept the terms of the HP Anyware license, scroll to the bottom of the agreement and click Agree.
- Click Repo Setup Scripts.
Copy the command for Centos 7, which looks similar to the following:
curl -1sLf https://dl.anyware.hp.com/TOKEN/pcoip-agent/cfg/setup/bash.rpm.sh | sudo -E distro=el codename=7 bash
Paste the command somewhere safe, you need it later.
Install the HP Anyware software repository
Reconnect to the virtual workstation by running the following command:
gcloud compute ssh test-workstation
Paste and run the Centos 7 repo setup script that you copied earlier.
Replace
TOKEN
with the token you downloaded from the HP Anyware Graphics Agent for Linux page.Update the software repositories by running the following command:
sudo yum -y update
Optional: Install USB dependencies, if you need to support USB devices other than keyboards, mice, and pointer devices.
sudo yum -y install usb-vhci
Install the HP Anyware software by running the following command:
sudo yum -y install pcoip-agent-standard
Set display state to
graphical
by running the following command:sudo systemctl set-default graphical.target
Reboot the virtual workstation by running the following command :
sudo reboot
Register the Anyware Standard Agent
To use the Anyware Standard Agent, you must have an HP Anyware license. You can request a trial license, or contact your HP Teradici representative and ask for a trial registration code to use for this virtual workstation.
After the virtual workstation has restarted, reconnect to it by running the following command:
gcloud compute ssh test-workstation
Activate your HP Anyware software license:
pcoip-register-host --registration-code=REGISTRATION-CODE
Replace
REGISTRATION-CODE
with the code provided to you by HP Anyware in the formABCDEFGHIJKL@0123-4567-89AB-CDEF
.Reboot the virtual workstation:
sudo reboot
Create a firewall rule
The PCoIP client communicates with your virtual workstation using several ports. You must set firewall rules that allow traffic to your virtual workstation.
Create a firewall rule that opens the required ports by running the following command in Cloud Shell or on your local computer:
gcloud compute firewall-rules create allow-pcoip \ --action=ALLOW \ --rules=tcp:443,tcp:4172,udp:4172 \ --source-ranges=0.0.0.0/0
Sign in to your virtual workstation using the PCoIP client
- On your local computer, HP Anyware product page.
- In the PCoIP Clients section, select the software client that corresponds with your computer's operating system.
- Select Downloads and scripts.
- If you accept the terms of the HP Anyware license, scroll to the bottom of the agreement and click Agree.
- Select Download now.
- After the download completes, install the Anyware Client.
- After installation, launch the Anyware Client.
In the Host Address or Registration Code field, enter the external IP address of your virtual workstation. You can optionally enter a name for the connection.
When you are connected, authenticate by entering your username and the password that you created for the virtual workstation.
In a few seconds, a Linux desktop appears.
Test your virtual workstation
After you've deployed your virtual workstation, you can test performance and interactivity using a number of tools:
- Use a web browser to visit your favorite sites or play YouTube videos.
- Learn more about the PCoIP Standard Agent for Linux.
- Install applications and test their behavior and performance.
You can also learn more about PCoIP Performance Optimization based on your workload.
Clean up
Stop 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:
gcloud compute instances stop test-workstation
Delete all the components
Delete the project
- In the Google 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.
What's next
- Learn how to create a virtual Windows workstation.
- Learn more about HP Anyware software.
- Learn more about how PCoIP differs from other remote desktop software.
- Try out HP's preconfigured virtual workstations for Windows and Linux in the Google Cloud Marketplace.