Setting up virtual workstation in GCP - PHACDataHub/Wiki GitHub Wiki
Tutorial to set up virtual workstation in your GCP project (for beginner)
In this tutorial we will go through how to set up a Linux virtual workstation, specifically setting up chrome remote desktop in Debian distribution following this google guide: https://cloud.google.com/architecture/chrome-desktop-remote-on-compute-engine
For reference here is the general google guide on creating virtual workstations on GCP: https://cloud.google.com/compute/docs/virtual-workstation
Please check the general google guide to make sure you have all the pre-requisite
Here is a table listing options for creating a virtual workstation. Note that if you wish to use the first 2 configurations of virtual workstation, you would need to install a Teradici Zero Client or the latest Teradici software client on your local machine to access the virtual workstation. You would also need a Teradici Cloud Access Software license.
Preconfigured virtual workstation solution on Cloud Marketplace are available if you don't want to use the configurations in the table above
1. set up your gcp virtual machine
here is the guide that google provides to set up virtual machine. https://cloud.google.com/compute/docs/instances/create-start-instance
Following the google guide we will arrive at the new VM instance configuration page. One thing to note is that boot disk determines what operating system and distribution the VM will be in.
2. ssh into the virtual machine and install chrome remote desktop
3. install desktop environment for our linux vm
Here is some common option that google recommend:
The google guide will provide the linux commands for installing the common desktop environment mentioned about. Strongly recommend doing the optional step as well, and reboot the vm after installation of desktop environment finishes. One quick way to reboot vm is to type sudo reboot
in the ssh window
4. configure remote desktop service
Go to https://remotedesktop.google.com/headless, on the left hand side go to set up via ssh tab. Click begin to start the set up process, which involves 3 steps. If you downloaded and install the chrome-remote-desktop deb file in the previous step, then you can ignore the first step in the set up process. Step 2 is authorization, and step 3 involves copy and pasting the remote desktop configuration command google provided into your new vm's ssh window.
you can paste these commands in your ssh window for verification
After finishing the set up process, if you go back to the remote access tab on the left hand side, the new vm should appear. like below
click on the icon with your vm name will initiate connection to your new virtual desktop. It will ask you for the 6 digit pin code you just created in the step 3 of the set up process. After inputting the pin, you will be log on to your virtual desktop. Your desktop should look something similar to this
Post installation
Here are 6 post installation steps at the end of the tutorial and some troubleshooting tips to help make the virtual desktop run smoothly, highly recommended to take a look at them.
I especially recommend the following 3 post installation steps