Set up Chrome Remote Desktop for Windows on Compute Engine  |  Cloud Architecture Center  |  Google Cloud (2024)

Interactive installation using RDP

To install Chrome Remote Desktop interactively, you need to be able toconnect to the remote VM using an RDP client. In this tutorial, you create theVM in thedefault VPC with default firewall rules,which exposes the RDP port 3339 to the internet.

If this is not possible in your environment, use thenon-interactive methodthat's described later in this document.

Create a Compute Engine instance

For the purposes of this tutorial, the default machine type is used. If you areusing this for your own environment, you may want to adjust the machine type,name, region, boot disk size, or other settings.

Console

  1. In the Google Cloud console, go to the VM Instances page:

Go to VM Instances

  1. Click Create.

  2. Set the instance name to crdhost.

  3. Enable the Enable display device checkbox because Chrome RemoteDesktop requires a display device on Windows VMs.

  4. Under Boot disk, click Change to open the Bootdisk panel.

  5. From the Operating system list, select Windows Server.

  6. From the Version list, select Windows Server 2022 Datacenter.

  7. Click Select to close the panel.

  8. Click Create.

Cloud Shell

  1. Open Cloud Shell.

    Open Cloud Shell

  2. Set your preferred zone:

    ZONE=us-central1-bREGION=us-central1gcloud config set compute/zone "${ZONE}"
  3. Create a Compute Engine instance by using the app image forWindows Server 2022 Datacenter:

    gcloud compute instances create crdhost \ --machine-type=e2-medium \ --scopes=cloud-platform \ --enable-display-device \ --image-family=windows-2022 \ --image-project=windows-cloud \ --boot-disk-size=50GB \ --boot-disk-device-name=crdhost

    This command creates a Windows Server 2022 virtual machine that has anattached display device (required for Chrome Remote Desktop on WindowsVMs) a 50GB boot disk, and grants the instance full access toGoogle Cloud APIs.

    Ignore the disk performance warning because you don't need highperformance for this tutorial.

Connect to the VM instance by using RDP

  1. In the Google Cloud console, go to the VM instances page.

    Go to the VM instances page

  2. Make sure a green check mark checkis displayed next to the name of your crdhost instance,indicating that the instance is ready.

  3. Click the instance name crdhost to open the VM instancedetails page.

  4. Under Remote access, click Set Windows password, and then clickSet to create your account on the remote machine.

    This step generates a password for you. Make a note of the password or copyit to a secure temporary file.

  5. To connect to the remote instance, click the arrowarrow_drop_downnext to the RDP button, and then select Download the RDPfile. You can open the RDP file by using your preferred RDP client.

  6. When your RDP client prompts for a password, enter the passwordthat you generated earlier.

  7. When you're prompted whether you want your computer discoverable byother PCs and devices on the network, click No.

  8. Close the Server Manager Dashboard if it is open.

Install the Chrome Remote Desktop service

The next step is to install Google Chrome and the Chrome Remote Desktop serviceon the VM instance.

  1. In your RDP session, click Start on the Windows taskbar,type PowerShell, and then select the Windows PowerShell app.

  2. At the PowerShell prompt, download and run the Chrome Remote Desktop Hostinstaller.

     $installer = "$env:TEMP\chromeremotedesktophost.msi" $uri = 'https://dl.google.com/edgedl/chrome-remote-desktop/chromeremotedesktophost.msi' (New-Object Net.WebClient).DownloadFile($uri,"$installer") && ` Start-Process $installer -Wait && ` Remove-Item $installer
  3. When you're prompted, confirm that you want the installer to makechanges.

Set up the Chrome Remote Desktop service

You now generate a Windows command that starts the Chrome Remote Desktop serviceand links it to your Google account.

  1. On your local computer, using the Chrome browser, go to theChrome Remote Desktop command line setup page.

  2. If you're not already signed in, sign in with a Google account. This is theaccount that will be used for authorizing remote access.

  3. On the Set up another computer page, click Begin, then Next.

  4. Click Authorize.

    You need to allow Chrome Remote Desktop to access youraccount. If you approve, the page displays several command lines, one ofwhich is for Windows (Powershell) that looks like the following:

    & "${Env:PROGRAMFILES(X86)}\Google\Chrome Remote Desktop\CurrentVersion\remoting_start_host.exe" `--code="4/ENCODED_AUTHENTICATION_TOKEN" `--redirect-url="https://remotedesktop.google.com/_/oauthredirect" `--name=$Env:COMPUTERNAME
  5. Click Copy content_copy tocopy the command line to your clipboard.

  6. In your RDP session, at the Powershell prompt, paste the command line youjust copied and press Enter.

  7. When you're prompted, confirm that you want the application to makechanges.

  8. When you're prompted, enter a 6-digit PIN. This number will be used foradditional authorization when you connect later.

    After the command completes, your remote desktop service has started.

  9. Close the Powershell window.

  10. Close the RDP session.

You can now connect to the VM using Chrome Remote Desktop.

Non-interactive installation

In this approach, you configure the VM instance to have astartup scriptthat runs when the VM is created.

With this approach, the VM does not need to be directly accessible from theinternet, although it still needs access to the internet.

Authorize the Chrome Remote Desktop service

You now generate a Windows command that you use later in the specialize script.As part of this procedure, you provide authorization information that's includedin the command.

  1. On your local computer, using the Chrome browser, go to theChrome Remote Desktop command line setup page.

  2. If you're not already signed in, sign in with a Google Account. This is theaccount that will be used for authorizing remote access.

  3. Click Begin, and then click Next.

  4. Click Authorize.

  5. Allow Chrome Remote Desktop to access your account.

    The page now contains several command lines, one of which is for Windows(Cmd) that looks like the following:

    "%PROGRAMFILES(X86)%\Google\Chrome Remote Desktop\CurrentVersion\remoting_start_host.exe"--code="4/ENCODED_AUTHENTICATION_TOKEN"--redirect-url="https://remotedesktop.google.com/_/oauthredirect"--name=%COMPUTERNAME%

    The --code flag contains a unique short-lived OAuth token.

    The authorization code in the command line is valid for only a fewminutes, and you can use it only once.

    Keep this page open.

Copy the startup command to Cloud Shell

The next step is to create a file in your Cloud Shell instancethat contains the startup command that you just generated.

  1. Open Cloud Shell.

    Open Cloud Shell

  2. Create a file for the startup command:

    cat > crd-auth-command.txt
  3. Go to the page that has the Chrome Remote Desktop startup command and copythe Windows (Cmd) command line.

  4. In Cloud Shell paste the command to add it to the file.

  5. Press Enter to end the line, and then press Control-Dto close the file.

Create the startup script

  • Copy the following code block and paste it into Cloud Shell.

    cat << "EOF" > crd-sysprep-script.ps1<# .SYNOPSIS GCESysprep specialize script for unattended Chrome Remote Desktop installation.#>$ErrorActionPreference = 'stop'function Get-Metadata([String]$metadataName) { try { $value = (Invoke-RestMethod ` -Headers @{'Metadata-Flavor' = 'Google'} ` -Uri "http://metadata.google.internal/computeMetadata/v1/instance/attributes/$metadataName") } catch { # Report but ignore REST errors. Write-Host $_ } if ($value -eq $null -or $value.Length -eq 0) { throw "Metadata value for ""$metadataName"" not specified. Skipping Chrome Remote Desktop service installation." } return $value}# Get config from metadata#$crdCommand = Get-Metadata('crd-command')$crdPin = Get-Metadata('crd-pin')$crdName = Get-Metadata('crd-name')if ($crdPin -isNot [Int32] -or $crdPin -gt 999999 -or $crdPin -lt 0) { throw "Metadata ""crd-pin""=""$crdPin"" is not a 6 digit number. Skipping Chrome Remote Desktop service installation."}# Prefix $crdPin with zeros if required.$crdPin = $crdPin.ToString("000000");# Extract the authentication code and redirect URL arguments from the# remote dekstop startup command line.#$crdCommandArgs = $crdCommand.Split(' ')$codeArg = $crdCommandArgs | Select-String -Pattern '--code="[^"]+"'$redirectArg = $crdCommandArgs | Select-String -Pattern '--redirect-url="[^"]+"'if (-not $codeArg) { throw 'Cannot get --code= parameter from crd-command. Skipping Chrome Remote Desktop service installation.'}if (-not $redirectArg) { throw 'Cannot get --redirect-url= parameter from crd-command. Skipping Chrome Remote Desktop service installation.'}Write-Host 'Downloading Chrome Remote Desktop.'$installer = "$env:TEMP\chromeremotedesktophost.msi"$uri = 'https://dl.google.com/edgedl/chrome-remote-desktop/chromeremotedesktophost.msi'(New-Object Net.WebClient).DownloadFile($uri,"$installer")Write-Host 'Installing Chrome Remote Desktop.'& msiexec.exe /I $installer /qn /quiet | Out-DefaultRemove-Item $installerWrite-Host 'Starting Chrome Remote Desktop service.'& "${env:ProgramFiles(x86)}\Google\Chrome Remote Desktop\CurrentVersion\remoting_start_host.exe" ` $codeArg $redirectArg --name="$crdName" -pin="$crdPin" | Out-DefaultWrite-Host 'Downloading Chrome.'$installer = "$env:TEMP\chrome_installer.exe"$uri = 'https://dl.google.com/chrome/install/latest/chrome_installer.exe'(New-Object Net.WebClient).DownloadFile($uri,"$installer")Write-Host 'Installing Chrome.'& $installer /silent /install | Out-DefaultRemove-Item $installerEOF

    This code block is a PowerShell script that runs when the VM iscreated. It performs the following actions:

    • Downloads and installs the Chrome Remote Desktop host service.
    • Retrieves the following metadata parameters:
      • crd-command - the Windows authentication and startup command.
      • crd-pin - the 6-digit PIN used for additional authentication.
      • crd-name - the name for this instance.
    • Configures and starts the Chrome Remote Desktop host service.
    • Downloads and installs the Chrome browser.

Create a new Windows virtual machine

You now create a new Windows VM using the files you created earlierto configure and set up Chrome Remote Desktop.

For the purposes of this tutorial, the e2-medium machine type is used. If youare using this for your own environment, you may want to adjust the machinetype, name, region, boot disk size, or other settings.

  1. In Cloud Shell, set your preferred zone:

    ZONE=us-central1-bREGION=us-central1gcloud config set compute/zone "${ZONE}"
  2. Set a 6-digit PIN for additional authentication to Chrome Remote Desktop:

    CRD_PIN=your-pin

    Replace your-pin with a 6-digit number.

  3. Set a name for this VM instance:

    INSTANCE_NAME=crdhost
  4. Create the instance:

    gcloud compute instances create ${INSTANCE_NAME} \ --machine-type=e2-medium \ --scopes=cloud-platform \ --enable-display-device \ --image-family=windows-2022 \ --image-project=windows-cloud \ --boot-disk-size=50GB \ --boot-disk-device-name=${INSTANCE_NAME} \ --metadata=crd-pin=${CRD_PIN},crd-name=${INSTANCE_NAME} \ --metadata-from-file=crd-command=crd-auth-command.txt,sysprep-specialize-script-ps1=crd-sysprep-script.ps1

    This command creates a Windows Server 2022 virtual machine in the defaultVPC that has an attached display device (required for Chrome Remote Desktopon Windows VMs) and a 50GB boot disk, and grants the instance full accessto Google Cloud APIs.

    The metadata values specify the specialize script, Windows startup commandline, and the parameters required to start the Chrome Remote Desktopservice.

Monitor the VM startup

You can verify that the startup script is successful by checking the messageslogged to the VM's serial port while it is being created.

  1. In Cloud Shell, display the messages logged during VM startup:

    gcloud compute instances tail-serial-port-output ${INSTANCE_NAME}

    If the Chrome Remote Desktop configuration is successful, you see thefollowing log lines:

    Found sysprep-specialize-script-ps1 in metadata.sysprep-specialize-script-ps1: Downloading Chrome Remote Desktop.sysprep-specialize-script-ps1: Installing Chrome Remote Desktop.sysprep-specialize-script-ps1: Downloading Chrome.sysprep-specialize-script-ps1: Installing Chrome.sysprep-specialize-script-ps1: Starting Chrome Remote Desktop service.sysprep-specialize-script-ps1 exit status 0Finished running specialize scripts.

    If the Chrome Remote Desktop configuration fails, you see an error messageindicating the problem, for example:

    sysprep-specialize-script-ps1: Couldn't start host: OAuth error.

    This error indicates that the OAuth token from the Chrome Remote Desktopauthentication page is no longer valid, either because it has already beenused, or because it has expired.

    To correct this error, either connect via RDP andperform an interactive setup as described previously, or delete the VM andretry the setup process.

    When you see the following message in the serial port monitor, the VM isready.

    GCEInstanceSetup: ------------------------------------------------------------GCEInstanceSetup: Instance setup finished. crdhost is ready to use.GCEInstanceSetup: ------------------------------------------------------------
  2. Press Control-C to stop displaying the startup messages.

Create a Windows user account

  1. In the Google Cloud console, go to the VM instances page.

    Go to the VM instances page

  2. Click the instance name crdhost to open the VM instancedetails page.

  3. Under Remote access, click Set Windows password, and then clickSet to create your account on the remote machine.

    This step generates a password for you. Make a note of the username andpassword or copy it to a secure temporary file.

Connect to the VM instance with Chrome Remote Desktop

You can connect to the VM instance using the Chrome Remote Desktop webapplication.

  1. On your local computer, go to theChrome Remote Desktop web site.

  2. Click Access my computer.

  3. If you're not already signed in to Google, sign in with the same GoogleAccount that you used to set up the Chrome Remote Desktop service.

    You see your new VM instance crdhost in the Remote Devices list.

  4. Click the name of the remote desktop instance.

  5. When you're prompted, enter the PIN that you created earlier, and thenclick the arrowarrow_forwardbutton to connect.

    You are now connected to the Windows login screen on your remoteCompute Engine instance.

  6. If you are prompted, always allow the Remote Desktop application to read yourclipboard and let you copy and paste between local and remoteapplications.

  7. Press any key, and enter the password for the Windows user thatyou generated earlier. Note that the default remote keyboard has aUS-English layout, so the characters entered may not match the characterson your local keyboard. You also cannot copy and paste the password.

You are now connected and logged in to the remote Windows desktop.

Improve the remote desktop experience

This section provides instructions for changing settings in orderto improve the remote desktop experience.

Install the Remote Desktop Chrome app

The Remote Desktop Chrome app gives a separate windowed experience and allowskeyboard shortcuts that would normally be intercepted by Chrome to be used onthe remote system.

If this app is not installed, do the following:

  1. Open the Session Options panel using the buttonchevron_leftthat appears when you move the mouse to the side of the window.
  2. In the Install App section, click Begin.
  3. Click Install.

The remote desktop session reopens in its own application window.

You can move any remote desktop sessions from a Chrome tab tothe app window by clicking the Open Withopen_in_newicon in the URL bar.

Improve the screen resolution

The default remote desktop resolution can modified to better suit your localcomputers desktop resolution.

  1. Right-click the remote desktop's background and select Display Settings.
  2. In the Resolution drop-down list, select a different screen resolution.
  3. Confirm the new screen resolution in the dialog.

Re-enable the service

If you have mistakenly disabled connections to the remote instance in theclient app, you can reconfigure the service and re-enable it by following theinstructions inSetting up the Chrome Remote Desktop Service.

Set up Chrome Remote Desktop for Windows on Compute Engine  |  Cloud Architecture Center  |  Google Cloud (2024)

FAQs

How do I Create a Remote Desktop in GCP? ›

Windows VMs on Compute Engine can be remotely accessed using the RDP. The simplest way to use RDP with GCE instances is by navigating to the instances list in Cloud Console using a Chrome browser and clicking RDP. This will launch an RDP session using the Chrome RDP for Google Cloud Platform Chrome extension.

Do I need Google account for Chrome Remote Desktop? ›

To use Chrome Remote Desktop, you must first register a Google account if you don't already have one.

How do I setup a Windows virtual machine on Google Cloud? ›

To create a basic Windows VM:
  1. In the Google Cloud console, go to the Create an instance page. Go to Create an instance.
  2. For Boot disk, select Change, and do the following: On the Public images tab, choose a Windows Server operating system. Click Select.
  3. To create the VM, click Create.

How do I set up remote desktop access on my computer? ›

How to enable Remote Desktop
  1. On the device you want to connect to, select Start and then click the Settings icon on the left.
  2. Select the System group followed by the Remote Desktop item.
  3. Use the slider to enable Remote Desktop.
  4. It is also recommended to keep the PC awake and discoverable to facilitate connections.
Nov 4, 2022

How do I add remote desktop access? ›

Allow Access to Use Remote Desktop Connection
  1. Click the Start menu from your desktop, and then click Control Panel.
  2. Click System and Security once the Control Panel opens.
  3. Click Allow remote access, located under the System tab.
  4. Click Select Users, located in the Remote Desktop section of the Remote tab.
Mar 13, 2023

What are the limitations of Chrome Remote Desktop? ›

Chrome Remote Desktop limitations
  • No built-in instant chat. ...
  • Won't work without the Google Chrome web browser. ...
  • No drag-and-drop file transfer. ...
  • No multi-session handling. ...
  • Session permission has to be renewed every 30 minutes. ...
  • No monitor resolution scaling. ...
  • Inexperienced users often find it challenging to use.
Apr 14, 2023

Why can't I use Chrome Remote Desktop? ›

If you're having problems with Chrome Remote Desktop, try these tips: You need to be connected to the Internet to share or access a computer. If the page won't open, check your computer's network settings. Antivirus software might prevent you from using Chrome Remote Desktop.

Is Chrome Remote Desktop no longer supported? ›

The Chrome Remote Desktop client was originally a Chrome extension from the Chrome Web Store requiring Google Chrome; the extension is deprecated, and a web portal is available at remotedesktop.google.com. The browser must support WebRTC and other unspecified "modern web platform features".

How do I log into a VM with RDP? ›

Connect to VM from Windows using RDP
  1. On the tile for your VM, select the Connect icon. ...
  2. If you're connecting to a Linux VM, select the Connect via RDP option.
  3. After the RDP connection file download finishes, open the RDP file to launch the RDP client.
Feb 17, 2023

What is RDP in VM? ›

Microsoft RDP is a supported display protocol for remote desktops that use virtual machines, physical machines, or shared session desktops on an RDS host. (Only the PCoIP display protocol and the VMware Blast display protocol are supported for published applications.)

How do I access my GCP Windows VM? ›

Connect to the VM instance
  1. In the Google Cloud console, go to the VM instances page. ...
  2. Under the Name column, click the name of your VM instance.
  3. Under the Remote access section, click Set Windows password.
  4. Specify a username, then click Set to generate a new password for this Windows Server VM.

How do I enable virtualization in Google Cloud VM? ›

You can enable nested virtualization on VM by creating a custom image with a special license key that enables VMX on the L1 VM. The license key does not incur additional charges. Create a boot disk from a public image or from a custom image.

How do I get root access to my Google virtual machine? ›

Connect as the root user

Connect to VMs as the root user by using the gcloud compute ssh command with root@ specified before the VM name: In the Google Cloud console, activate Cloud Shell. At the bottom of the Google Cloud console, a Cloud Shell session starts and displays a command-line prompt.

How do I connect my Windows to a virtual machine? ›

Lets get started.
  1. Step 1: Check if your system is compatible. Before you can enable Hyper-V on your Windows 11 machine, you need to make sure that your system is compatible. ...
  2. Step 2: Enable Hyper-V on Windows 11. ...
  3. Step 3: Download the Windows 11 image. ...
  4. Step 4: Configure the VM settings. ...
  5. Step 5: Deploy the Virtual Machine.
Mar 2, 2023

How do I create a workspace in GCP? ›

In the Google Cloud console, go to the Dataform page. Select the repository where you want to create the new development workspace. On your repository page, click Create development workspace.

What is the command to create virtual machine in GCP? ›

In the Google Cloud console, go to the VM instances page. Select your project and click Continue. Click Create instance. Specify a Name for your VM.

Can multiple people use Google Remote Desktop? ›

Can multiple users use Chrome Remote Desktop? Yes, multiple users can use Chrome Remote Desktop to access the same physically distant servers from their Chromebook or another local computer. Multiple individuals can be set up in Chrome Remote Desktop to enable connectivity to remote machines.

Top Articles
Latest Posts
Article information

Author: Catherine Tremblay

Last Updated:

Views: 5973

Rating: 4.7 / 5 (47 voted)

Reviews: 86% of readers found this page helpful

Author information

Name: Catherine Tremblay

Birthday: 1999-09-23

Address: Suite 461 73643 Sherril Loaf, Dickinsonland, AZ 47941-2379

Phone: +2678139151039

Job: International Administration Supervisor

Hobby: Dowsing, Snowboarding, Rowing, Beekeeping, Calligraphy, Shooting, Air sports

Introduction: My name is Catherine Tremblay, I am a precious, perfect, tasty, enthusiastic, inexpensive, vast, kind person who loves writing and wants to share my knowledge and understanding with you.