Create a virtual GPU-accelerated Linux workstation Stay organized with collections Save and categorize content based on your preferences.
This tutorial shows how to create a virtual Linux workstation runningUbuntu 22.04 with an attached display-capableGPU.Google Cloud offers four display-capable GPUs: NVIDIA L4, NVIDIA T4, NVIDIA P4, andNVIDIA P100.
To create a Windows workstation, see the tutorial forCreating a virtual GPU accelerated Windows workstation.
Note: This tutorial helps you create a virtual workstation that can takeadvantage of hardware graphics acceleration. For information about other typesof virtual workstations that you can create on Google Cloud, seeCreating a virtual workstation.After you create the virtual workstation, you learn how to remotely access itusingHP Anyware(formerly Teradici CAS), usingPC-over-IP (PCoIP®)technology, a remote desktop protocol widely used in the media andentertainment, game development, architecture, and engineering industries. PCoIPoffers 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 instance with a GPU. This instance servesas the foundation for a virtual workstation.
- Install NVIDIA drivers on the 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 component of Google Cloud:
You can use thepricing calculator to generate a cost estimate based on your projected usage.
The resources that make up the virtual workstation and the factors that affectcost in this tutorial are:
- 8 vCPUs, 32 GB RAMG2 standard machine type which includes anNVIDIA L4 Virtual Workstation GPU.
- 100 GB SSDpersistent boot disk
- Internet outbound data transfer costs
Internet data transfer represents data that streams from your virtual workstation toyour local display client and is billed atinternet outbound data transfer costs.Variables that affect data transfer during a PCoIP session are bandwidth, screenresolution, number of display monitors, applications used, and the type ofactivity on each monitor. The HP AnywareSession Planning Guidecan help you understand different workload requirements.
Note: Costs differ depending on region and connection method. Theseestimated costs are based on connection over the public internet, with resourceslocated in theus-central1 region (Iowa).Before you begin
This tutorial uses the Google Cloud CLI, which you can run from aCloud Shell instance launched from theGoogle Cloud console.If you want to use gcloud CLI on your local workstation, install theGoogle Cloud CLI.The tutorial shows you how to run commands in Cloud Shell; if youuse the gcloud CLI on your workstation, adjust the instructionsaccordingly.
- 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.
Note: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
- Create a project: To create a project, you need the Project Creator role (
roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.createpermission.Learn how to grant roles.
Verify that billing is enabled for your Google Cloud project.
Enable the Compute Engine API.
Roles required to enable APIs
To enable APIs, you need the Service Usage Admin IAM role (
roles/serviceusage.serviceUsageAdmin), which contains theserviceusage.services.enablepermission.Learn how to grant roles.In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Note: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
- Create a project: To create a project, you need the Project Creator role (
roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.createpermission.Learn how to grant roles.
Verify that billing is enabled for your Google Cloud project.
Enable the Compute Engine API.
Roles required to enable APIs
To enable APIs, you need the Service Usage Admin IAM role (
roles/serviceusage.serviceUsageAdmin), which contains theserviceusage.services.enablepermission.Learn how to grant roles.
In addition, make sure you have the following:
- A Google Cloud project with quota forNVIDIA L4 Virtual Workstation GPUs in your selectedzone.You can get a listing of GPU availability using the
gcloud compute accelerator-types listcommand. - AGoogle Chromebrowser to access the Google Cloud console.
- The latestPCoIP Client softwarefor Windows, Mac, or Linux to access the virtual workstation.
- An account onhelp.teradici.comto download the HP Anyware software. Account registration is free.
- An HP Anyware software license. You canrequest a trial license,or contact your HP representative and ask for a trial registrationcode to use for this virtual workstation.
Architecture
The following diagram shows the components used in this tutorial todeploy a single virtual workstation. Optional components shown in the diagraminclude different ways to connect to your virtual workstation, sharedstorage, an additional instance for serving third-party licenses, and additionalinfrastructure representing a render or compute farm.
Choose a region
An important factor when you deploy a virtual workstation is the latency betweenyour location and the instance you create. The lower the latency, the better theexperience. Therefore, you want to work in a region that's geographically closestto you. To learn more about where the different GPUs are available, seeGPU regions and zones availability.
Open Cloud Shell. (If you're using the gcloud CLI,open a terminal window on your computer.)
Get a list of the zones in which GPUs are available:
gcloud compute accelerator-types list
Take note of the region and zone that's physically closest to you.
Set the zone that you want to work with:
gcloud config set compute/zoneZONE
Replace
ZONEwith the name of thezoneyou're using, such asus-west1-b.
Choose a machine type
NVIDIA L4 GPUs are attached to theG2 machine type.Virtual machines with one or more GPUs have a maximum number of vCPUs for eachGPU you add to the instance. For example, each NVIDIA L4 GPU lets you haveup to 32 vCPUs and up to 128 GB of memory in your instance machine type. To seethe available vCPU and memory ranges for different GPU configurations, see theGPUs list.
The example in this tutorial consists of an 8 vCPU G2 virtual workstation, which iswell under the limit of 32 vCPUs for a single NVIDIA L4 GPU.
Create the virtual workstation
Note: There are somerestrictions to keep in mind when creating a virtual workstation with attached GPUs.Restrictions that apply to this tutorial have been addressed, but it's a goodidea to familiarize yourself with these restrictions before you create yourvirtual workstation.In Cloud Shell, create the Compute Enginevirtual workstation instance:
gcloudcomputeinstancescreateVM_NAME\--zone=ZONE\--machine-type=MACHINE_TYPE\--accelerator=type=ACCELERATOR,count=NUM-GPUS\--maintenance-policy="TERMINATE"\--image-project=ubuntu-os-cloud\--image-family=ubuntu-2204-lts\--boot-disk-size=SIZE\--boot-disk-type=TYPE\--network=NETWORKReplace the following:
VM_NAMEis the name of your workstation.ZONEis the zone in which to create the VM.MACHINE_TYPEis the predefined or custommachine configuration.ACCELERATORis the type of GPU you want toattach, such asnvidia-l4-vws.NUM-GPUSis the number of GPUs to attach to theVM.SIZEis the size of the boot disk, in gigabytes.TYPEis the type of boot disk. To get a list of available disk types, rungcloud compute disk-types list.NETWORKis the network in which to create the VM.
For example:
gcloud compute instances create test-workstation \ --zone=us-west1-b \ --machine-type=g2-standard-8 \ --accelerator=type=nvidia-l4-vws,count=1 \ --maintenance-policy="TERMINATE" \ --image-project=ubuntu-os-cloud \ --image-family=ubuntu-2204-lts \ --boot-disk-size=100 \ --boot-disk-type=pd-ssd \ --network=default
After the virtual workstation is created, the machine status isdisplayed. The output looks similar to the following:
NAME: test-workstationZONE: us-west1-bMACHINE_TYPE: g2-standard-8PREEMPTIBLE:INTERNAL_IP: 10.138.XX.XXXEXTERNAL_IP: XX.XXX.XXX.XXXSTATUS: RUNNING
Note the virtual workstation's external IP address. You will use it later inthe tutorial.
You can retrieve the external IP address of your virtual workstation at anytime using theGoogle Cloud console.
Sign in to your virtual workstation
After you create the virtual workstation, you sign in to the machine so that youcan configure it.
In Cloud Shell, connect to the new virtual workstation:
gcloud compute sshVM_NAME
Set your account password. Logging into a virtual workstation using the PCoIPsoftware client requires a user password.
sudo passwd `whoami`
When you're prompted, enter a password. You will use this password laterin the tutorial to log on to your virtual workstation with the HP AnywarePCoIP Client.
Install the base libraries
The default Google Cloud Ubuntu 22.04 image is a minimal installation ofUbuntu. The next step is to install libraries that are necessary torun your virtual workstation as a graphics workstation.
Update the software repositories:
sudo apt update
Install the base components:
sudo apt install -y build-essentialsudo apt install -y libvulkan1
Update the
gccversion for the NVIDIA driver:sudo apt install -y gcc-12sudo apt install -y linux-headers-$(uname -r)sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 12sudo update-alternatives --config gcc
Install the NVIDIA driver
NVIDIA L4, NVIDIA T4, NVIDIA P4, and NVIDIA P100 GPUs work on Google Cloudonly with qualified NVIDIA RTX Virtual Workstation drivers for visualizationworkloads. These drivers can be downloaded from a public Google Cloud storage bucket.
To install the latest NVIDIA RTX Virtual Workstation driver, follow theinstructions (Steps 3 and 4, only).
Reboot the workstation:
sudo reboot
Install the desktop environment
A desktop environment is necessary to run your virtual workstation as a graphicsworkstation. For this tutorial, you install the KDE Plasma Desktop.
Install the desktop environment:
sudo apt updatesudo apt -y install kubuntu-desktopsudo apt -y install dialog
Reboot the workstation:
sudo reboot
Install HP Anyware software
HP Anyware software provides a graphics agent that runs on yourvirtual workstation, delivering the desktop to your hardware or softwareclient.
Note: Installation may differ if you choose a different Linux distribution.For more information, seeHP Anyware Graphics Agent for Linux Installation Guide.When the virtual workstation has restarted, in Cloud Shell,reconnect to the virtual workstation:
gcloud compute sshVM_NAME
Add the Teradici software repository:
curl -1sLf \ https://dl.anyware.hp.com/TOKEN/pcoip-agent/cfg/setup/bash.deb.sh \ | sudo -E distro=ubuntu codename=jammy bash
Replace the following:
TOKENis the download token you can retrieve fromtheHP Anyware Graphics Agent for Linuxpage underDownloads and scripts.
Update the software repositories:
sudo apt update
Optional: Install USB dependencies, if you need to support USB devices otherthan keyboards, mice, and pointer devices.
Note: If you skip this step, USB redirection is disabled. That means youcan't use bridged USB devices.sudo apt -y install usb-vhci-dkms
Install the HP Anyware software:
sudo apt -y install pcoip-agent-graphics
Register the Anyware Graphics Agent
To use the Anyware Graphics Agent, you must have an HP Anyware license.
In Cloud Shell, activate your HP Anyware software license:
pcoip-register-host --registration-code=REGISTRATION-CODE
Replace
REGISTRATION-CODEwiththe code provided to youby HP Teradici 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 virtualworkstation.
In Cloud Shell (not on the virtual workstation), create a firewallrule that opens the required ports:
Note: This firewall rule allows traffic from anywhere on the internet toaccess your VM instance. Always followbest practices for firewall rules to restricttraffic to your instance.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, go to thePCoIP Clients sectionon theHP Anyware support page,and then download, install, and launchthe PCoIP Software Client application for your operating system.
In theHost Address or Registration Code field, enter the externalIP address of your virtual workstation. If you want, you can enter a name forthe connection.
Note: By default, PCoIP traffic is encrypted using AES-256.However, HP Anyware Software uses a self-signed certificatethat's issued by Teradici. This might trigger a verification warning when youconnect. You can remove this warning by creating and installing your owncustom security certificates.Or, you can suppress the warning by changing theclient security modefor your client OS. For the purposes of this tutorial, you can ignore this warning by clickingConnect Insecurely in the dialog.When you are connected, authenticate by entering the username andpassword that you created earlier for the virtual workstation.
In a few seconds, your Linux desktop appears.
Test your virtual workstation
After you've deployed your virtual workstation, you can testperformance and interactivity using a number of tools:
- Run GPU benchmark tools, such asglxgears,glmark2,orUNIGINE,which are programs to test graphics performance on a Linux workstation.
- InstallUnreal Engine,Unity Editor,Blender,or any content creation application.
- Run render benchmarking tools for popular renderers such asV-Ray,Octane,orMaxon.
- UseGoogle Chrometo browse your favorite sites or playYouTube videos.
You can also learn more aboutPCoIP performance optimizationbased on your workload.
Clean up
To avoid incurring charges to your Google Cloud account for the resources used in this tutorial, either delete the project that contains the resources, or keep the project and delete the individual resources.
After you've finished the tutorial, clean up the resources you created onGoogle Cloud so you won't be billed for them in the future.
Stop your virtual workstation
Stopped virtual workstations incurcosts for persistent disk,but can be restarted at any time. To stop your virtual workstation, run thefollowing command in Cloud Shell:
gcloud compute instances stopVM_NAME
Delete all the components
Delete the project
What's next
- Learn how tocreate a virtual GPU-accelerated Windows workstation.
- Learn more aboutNVIDIA RTX Virtual Workstations on Google Cloud.
- Learn more aboutNVIDIA RTX Virtual Workstation technology.
- Learn more aboutHP Anyware software.
- Learn more about howPCoIPdiffers from other remote desktop software.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-02-19 UTC.