Stay organized with collections Save and categorize content based on your preferences.
Linux Windows
This document describes how to enable or disable virtual displays on a virtual machine (VM) instance.
If an application running on your VM requires a display device, but you don't need the performance of a GPU, then configure your VM to use virtual display devices. By enabling virtual displays on a VM, you can run virtual display devices on the VM, such as remote system management tools, remote desktop software, and screen capturing.
Before you beginSelect the tab for how you plan to use the samples on this page:
ConsoleWhen you use the Google Cloud console to access Google Cloud services and APIs, you don't need to set up authentication.
gcloudInstall the Google Cloud CLI. After installation, initialize the Google Cloud CLI by running the following command:
gcloud init
If you're using an external identity provider (IdP), you must first sign in to the gcloud CLI with your federated identity.
Note: If you installed the gcloud CLI previously, make sure you have the latest version by runninggcloud components update
.To use the Terraform samples on this page in a local development environment, install and initialize the gcloud CLI, and then set up Application Default Credentials with your user credentials.
Install the Google Cloud CLI.
If you're using an external identity provider (IdP), you must first sign in to the gcloud CLI with your federated identity.
Note: If you installed the gcloud CLI previously, make sure you have the latest version by runninggcloud components update
.
If you're using a local shell, then create local authentication credentials for your user account:
gcloud auth application-default login
You don't need to do this if you're using Cloud Shell.
If an authentication error is returned, and you are using an external identity provider (IdP), confirm that you have signed in to the gcloud CLI with your federated identity.
For more information, see Set up authentication for a local development environment.
RESTTo use the REST API samples on this page in a local development environment, you use the credentials you provide to the gcloud CLI.
Install the Google Cloud CLI.
If you're using an external identity provider (IdP), you must first sign in to the gcloud CLI with your federated identity.
For more information, see Authenticate for using REST in the Google Cloud authentication documentation.
To get the permissions that you need to enable or disable virtual displays on a VM, ask your administrator to grant you the Compute Instance Admin (v1) (roles/compute.instanceAdmin.v1
) IAM role on the project. For more information about granting roles, see Manage access to projects, folders, and organizations.
This predefined role contains the permissions required to enable or disable virtual displays on a VM. To see the exact permissions that are required, expand the Required permissions section:
Required permissionsThe following permissions are required to enable or disable virtual displays on a VM:
compute.instances.updateDisplayDevice
on the VMcompute.instances.create
on the projectcompute.images.useReadOnly
on the imagecompute.snapshots.useReadOnly
on the snapshotcompute.instanceTemplates.useReadOnly
on the instance templatecompute.networks.use
on the projectcompute.addresses.use
on the projectcompute.networks.useExternalIp
on the projectcompute.subnetworks.use
on the project or on the chosen subnetcompute.subnetworks.useExternalIp
on the project or on the chosen subnetcompute.instances.setMetadata
on the projectcompute.instances.setTags
on the VMcompute.instances.setLabels
on the VMcompute.instances.setServiceAccount
on the VMcompute.disks.create
on the projectcompute.disks.use
on the diskcompute.disks.useReadOnly
on the diskYou might also be able to get these permissions with custom roles or other predefined roles.
PricingThere are no costs associated with enabling or disabling virtual displays on a VM.
RestrictionsFor VMs with virtual displays enabled, the following limitations apply:
If your VM is running an x64-based Windows OS image earlier than version v20190312
, then, after enabling virtual displays on your VM, you must install the virtual display driver as described in this document. If your VM is running a later OS image version, then the driver is already installed on the OS image.
You can use a virtual display device on the VM only after the guest OS boots and initializes the virtual display driver.
You can't use virtual display devices on VMs that run the Sandy Bridge CPU platform.
You can't use virtual display devices on T2A Arm VMs.
To enable virtual displays on a VM, select one of the following methods described in this document:
If your VM is running an x64-based Windows OS image earlier than version v20190312
, then, after you enable virtual displays on the VM, install the virtual display driver as described in this document.
To create a VM with virtual displays enabled, select one of the following options:
ConsoleIn the Google Cloud console, go to the Create an instance page.
Specify the properties for the VM, including the name, zone, and machine type.
In the Display device section, select the Enable display device checkbox.
To create the VM, click Create.
To create a VM with virtual displays enabled, use the gcloud compute instances create
command with the --enable-display-device
flag.
gcloud compute instances create VM_NAME \
--enable-display-device \
--machine-type=MACHINE_TYPE \
--zone=ZONE
Replace the following:
VM_NAME
: the name of the VM.
MACHINE_TYPE
: the machine type to use for the VM.
ZONE
: the zone in which to create the VM.
To create a VM with virtual displays enabled, use the Terraform resource with the enable_display
argument set to true
.
For example, to create a VM in zone us-central1-c
with virtual displays enabled, and specify f1-micro
as the machine type, use the following resource:
To create a VM with virtual displays enabled, make a POST
request to the instances.insert
method. In the request body, include the enableDisplay
field set to true
.
POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/zones/ZONE/instances
{
"name": "VM_NAME",
"machineType": "zones/ZONE/machineTypes/MACHINE_TYPE",
"disks": [
{
"boot": true,
"initializeParams": {
"sourceImage": "project/IMAGE_PROJECT/global/images/IMAGE"
}
}
],
"displayDevice": {
"enableDisplay": true
},
"networkInterfaces": [
{
"network": "global/networks/default"
}
]
}
Replace the following:
PROJECT_ID
: the ID of the project in which to create the VM.
ZONE
: the zone in which to create the VM.
VM_NAME
: the name of the VM.
MACHINE_TYPE
: the machine type to use for the VM.
IMAGE_PROJECT
: the image project that contains the OS image—for example, debian-cloud
. For more information about the supported image projects, see Public images.
IMAGE
: specify one of the following:
A specific version of the OS image—for example, debian-12-bookworm-v20240617
.
An image family, which must be formatted as family/IMAGE_FAMILY
. This specifies the most recent, non-deprecated OS image. For example, if you specify family/debian-12
, the latest version in the Debian 12 image family is used. For more information about using image families, see Image families best practices.
For more information about creating a VM, see Create and start a Compute Engine instance.
Enable virtual displays on an existing VMBefore enabling virtual displays on a VM, make sure to stop the VM.
To enable virtual displays on an existing VM, select one of the following options:
ConsoleIn the Google Cloud console, go to the VM instances page.
In the Name column, click the name of the VM.
The details page of the VM opens.
Click edit Edit.
The page to edit the VM's properties opens.
In the Display device section, select the Enable display device checkbox.
Click Save.
To enable virtual displays on an existing VM, use the gcloud compute instances update
command with the --enable-display-device
flag.
gcloud compute instances update VM_NAME \
--enable-display-device \
--zone=ZONE
Replace the following:
VM_NAME
: the name of the VM.
ZONE
: the zone where the VM is located.
To enable virtual displays on an existing VM, make a POST
request to the instances.updateDisplayDevice
method. In the request body, include the enableDisplay
field and set it to true
.
POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/zones/ZONE/instances/VM_NAME/updateDisplayDevice
{
"enableDisplay": true
}
Replace the following:
PROJECT_ID
: the ID of the project where the VM is located.
ZONE
: the zone where the VM is located.
VM_NAME
: the name of the VM.
Before disabling virtual displays on a VM, make sure to stop the VM.
To disable virtual displays on an existing VM, select one of the following options:
ConsoleIn the Google Cloud console, go to the VM instances page.
In the Name column, click the name of the VM.
The details page of the VM opens.
Click edit Edit.
The page to edit the VM's properties opens.
In the Display device section, clear the Enable display device checkbox.
Click Save.
To disable virtual displays on an existing VM, use the gcloud compute instances update
command with the --no-enable-display-device
flag.
gcloud compute instances update VM_NAME \
--no-enable-display-device \
--zone=ZONE
Replace the following:
VM_NAME
: the name of the VM.
ZONE
: the zone where the VM is located.
To disable virtual displays on an existing VM, make a POST
request to the instances.updateDisplayDevice
method. In the request body, include the enableDisplay
field and set it to false
.
POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/zones/ZONE/instances/VM_NAME/updateDisplayDevice
{
"enableDisplay": false
}
Replace the following:
PROJECT_ID
: the ID of the project where the VM is located.
ZONE
: the zone where the VM is located.
VM_NAME
: the name of the VM.
If you've enabled virtual displays on a Windows VM that runs a Windows OS image earlier than version v20190312
, then, to use a virtual display device on the VM, you must install the virtual display driver provided by Google Cloud. If the VM runs a more recent OS image version, then the driver is already installed and you can skip this section.
To install the virtual display driver on a VM with virtual displays enabled, do the following:
Open a PowerShell terminal as an administrator.
Install the google-compute-engine-driver-gga
component:
googet install google-compute-engine-driver-gga
After you restart the VM, you can verify that the driver was correctly installed as described in the next section.
Verify the virtual display driver installationIf you had to manually install the virtual display driver on a Windows VM as described in the previous section, then you can verify that the installation was successful by doing the following:
If you haven't already, connect to the Windows VM.
Open Device Manager.
In the Device Manager list, in the Display adapters list, make sure that the Google Graphics Array (GGA) driver is listed.
If the driver isn't listed, then reinstall the virtual display driver as described in this document.
Learn how to set up Chrome Remote Desktop on Linux VMs.
Learn how to connect to Windows VMs using RDP.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-07 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["This document provides instructions on how to enable or disable virtual display devices on a virtual machine (VM) instance for applications that require a display but don't need GPU performance."],["Virtual displays can be enabled when creating a new VM or added to an existing VM through the Google Cloud console, gcloud command-line tool, Terraform, or REST API."],["There are no direct costs for enabling or disabling virtual displays, but there are limitations, such as incompatibility with Sandy Bridge CPU platforms and T2A Arm VMs."],["For x64-based Windows VMs with OS images earlier than version `v20190312`, a manual installation of the virtual display driver is required after enabling virtual displays, with verification steps provided."],["To either enable or disable the virtual display, the VM will need to be stopped first."]]],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4