Create a virtual Windows workstation


This tutorial shows how to create a virtual Windows workstation running Windows Server 2022 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 Linux, see About creating a virtual workstation.

After you create the virtual workstation, you learn how to remotely access it using HP Anyware (formerly Teradici CAS), using PC-over-IP (PCoIP®) technology, a remote desktop protocol 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 Microsoft Windows and the PowerShell 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:

Internet data transfer represents data that streams from your virtual workstation to your local display client and is billed at internet outbound data transfer costs. 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 a Cloud Shell instance launched from the Google Cloud console . If you want to use gcloud CLI on your local workstation, install the Google Cloud CLI. The tutorial shows you how to run commands in Cloud Shell; if you use the gcloud CLI on your workstation, adjust the instructions accordingly.

  1. 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.
  2. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Go to project selector

  3. Make sure that billing is enabled for your Google Cloud project.

  4. Enable the Compute Engine API.

    Enable the API

  5. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Go to project selector

  6. Make sure that billing is enabled for your Google Cloud project.

  7. Enable the Compute Engine API.

    Enable the API

In addition, make sure you have the following:

  • A Google Chrome 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 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.

Architecture of the virtual workstation infrastructure.

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

In Cloud Shell, create the Compute Engine virtual workstation instance:

gcloud compute instances create VM_NAME \
    --zone=ZONE \
    --machine-type=e2-standard-4 \
    --enable-display-device \
    --image-project=windows-cloud \
    --image-family=windows-2022 \
    --boot-disk-size=50 \
    --boot-disk-type=pd-balanced \
    --network=default

Replace the following:

  • VM_NAME: a name for your VM instance.
  • ZONE: 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.

Create a Windows password

You use RDP to access the Windows virtual workstation in order to install the HP Anyware Standard Agent host software. To sign in with RDP, you need to create a Windows password for your user.

  1. In Cloud Shell, run the following command:

    gcloud compute reset-windows-password VM_NAME

    Replace VM_NAME with the name of the VM to change the password for.

  2. Review the information in the confirmation prompt:

    This command creates an account and sets an initial password for the
    user [username] if the account does not already exist.
    If the account already exists, resetting the password can cause the
    LOSS OF ENCRYPTED DATA secured with the current password, including
    files and stored passwords.
    
    For more information, see:
    https://cloud.google.com/compute/docs/instances/windows/generating-credentials#console
    
    Would you like to set or reset the password for [username] (Y/n)?
    
  3. After confirming the previous prompt, review the confirmation of new credentials, which appears as follows:

    Resetting and retrieving password for [username] on [instance-name]
    Updated [https://www.googleapis.com/compute/v1/projects/project-name/zones/zone/instances/instance-name].
    ip_address: ip-address
    password:   password
    username:   username
    
  4. You can now connect to the VM instance by using the new credentials.

Sign in to your virtual workstation

After you create the virtual workstation, sign into the machine so you can configure it.

  1. On your local workstation, use your RDP client to connect to your virtual workstation using its external IP address.
  2. When you're prompted to enter your credentials, enter the username and password you generated earlier.
  3. If you see a certificate warning, ignore it and click Continue.

The virtual workstation desktop appears. Close the Windows Server Manager after it finishes launching.

Install Google Chrome

The next step is to install Chrome on the VM instance.

  1. In your RDP session, click the Start button on the Windows taskbar, type Windows PowerShell.
  2. Right-click on Windows PowerShell and select Run as administrator.
  3. At the PowerShell prompt, enable HTTPS requests:

    [Net.ServicePointManager]::SecurityProtocol = "tls12, tls11, tls"
    
  4. Download and run the Chrome installer:

    $installer = "$env:TEMP\chrome_installer.exe";
    Write-Host 'Downloading Chrome.'
    Invoke-WebRequest `
    'https://dl.google.com/chrome/install/latest/chrome_installer.exe' `
      -OutFile $installer
    Write-Host 'Installing Chrome.'
    & $installer /silent /install | Out-Default
    Remove-Item $installer
    
  5. When the command has completed, close PowerShell.

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.

  1. On the Windows instance, open Google Chrome and go to the PCoIP Hosts section on the HP Anyware support page.
  2. Download Standard Agent for Windows.
  3. If not already logged in, click Log in to download.
  4. Click Downloads and scripts.
  5. Complete the agent installation process and choose the option to run the downloaded Standard Agent executable. Follow the prompts to install the Standard Agent in the default location.

Register the Anyware Standard Agent

When the installation process is complete, you're prompted for a registration code.

  1. In the License Registration window, enter the registration code you received during the trial sign-up process.

  2. After you've entered the registration code, reboot the Windows instance.

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.

  • In Cloud Shell (not on the virtual workstation), create a firewall rule that opens the required ports:

    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

  1. On your local computer, go to the PCoIP Clients section on the HP Anyware support page, and then download, install, and launch the PCoIP Software Client application for your operating system.

  2. In the Host Address or Registration Code field, enter the external IP address of your virtual workstation. If you want, you can enter a name for the connection.

  3. When you are connected, authenticate by entering the username and password that you created earlier for the virtual workstation.

    In a few seconds, your Windows desktop appears.

Activate audio on your virtual workstation

To activate audio on your virtual workstation, enable the Teradici Virtual Audio Driver as the default playback device.

  1. On the Windows VM, click the Start button on the Windows taskbar and type mmsys.cpl to open the Sound control panel and initialize the Teradici Virtual Audio Driver.

  2. Click Yes. Windows verifies that the audio driver is working.

Test your virtual workstation

After you've deployed your virtual workstation, you can test performance and interactivity using a number of tools:

You can also learn more about PCoIP performance optimization based 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.

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 VM_NAME

Delete all the components

  1. Delete the virtual workstation.
  2. Delete the firewall rule.

Delete the project

  1. In the Google Cloud console, go to the Manage resources page.

    Go to Manage resources

  2. In the project list, select the project that you want to delete, and then click Delete.
  3. In the dialog, type the project ID, and then click Shut down to delete the project.

What's next