Stay organized with collections Save and categorize content based on your preferences.
Linux Windows
This page describes how to capture a screenshot from a virtual machine (VM) instance by using the VM screenshot tool.
Capturing a screenshot from a VM can help you troubleshoot a VM that is not otherwise accessible. For example, a VM might not be accessible if it is booting or has a disk image that is corrupted.
Windows-based operating systemsVM screenshots can help to troubleshoot failed RDP connections to Windows VMs, by identifying if the instance has started successfully. For information about troubleshooting RDP connections, see Troubleshooting RDP.
Privacy considerations with remote desktop clientsThe VM screenshot tool uses the display adapter of the VM to capture a screenshot of the local console session through a remote desktop client. Capturing a screenshot through the local console session might capture sensitive information from the user's desktop or browser.
If you are concerned about exposing sensitive information as part of a screenshot, configure your respective remote desktop client in the following way so that it does not use the local console session:
Chrome Remote Desktop: If you are using Chrome Remote Desktop, be sure to enable Curtain mode so that it does not connect to the local console session.
Microsoft RDP: RDP clients connect by using Windows Remote Desktop Services (RDS). Windows RDS lets RDP clients choose whether to start a new console session or connect to the existing one, and because of this, there might be privacy implications. For information about customizing RDS so that it does not connect to the local console session, see Supported Remote Desktop RDP file settings.
Before sharing screenshots with Google Support, make sure to review them for sensitive information.
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 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. 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.
For more information, see Authenticate for using REST in the Google Cloud authentication documentation.
The instance must be in the RUNNING
life cycle state.
The maximum rate for capturing screenshots is 20 per second, which is the API rate limit.
You can't initiate a screenshot while one is in progress.
You can capture one screenshot at a time.
Use the following procedures to capture a screenshot from a VM.
Permissions required for this taskTo perform this task, you must have the following permissions:
compute.instances.getScreenshot
In the Google Cloud console, go to the VM instances page.
From the VM instances page, click the name of the VM instance to capture a screenshot from.
On the VM instance details page, click the Screenshot tab.
Click Refresh to generate a screenshot from the VM. If you have not enabled a virtual display, the Google Cloud console does not show a screenshot.
Capture a screenshot from a VM by using the gcloud compute instances get-screenshot
command:
gcloud compute instances get-screenshot VM_NAME \ --destination=JPEG_FILENAME \ --zone=ZONE
Replace the following:
VM_NAME
: name of the VM to capture a screenshot from.
JPEG_FILENAME
: optional filename of the jpeg for the screenshot output. If you do not specify a filename, the raw jpeg data is sent to standard output (stdout).
ZONE
: zone of the VM to capture a screenshot from.
With the Compute Engine API, capture a screenshot from a VM by using the instances.getScreenshot
request:
GET https://compute.googleapis.com/compute/v1/projects/PROJECT/zo nes/ZONE/instances/VM_NAME/screenshot
Replace the following:
PROJECT
: ID of the project containing the VM to capture a screenshot from.
ZONE
: zone containing the project.
VM_NAME
: name of the VM to capture a screenshot from.
The following screenshot shows a Windows Server VM that is unavailable while the boot manager is loading:
Windows Server 2016 Datacenter performing updatesThe following screenshot shows a Windows Server 2016 VM that is unavailable while completing updates:
Windows Server 2016 loading system servicesThe following screenshot shows a Windows Server 2016 VM that is unavailable while loading system services:
Login screen for Windows Server 2016 DatacenterThe following screenshot shows a Windows Server 2016 VM that has completed startup and is ready to login:
Sysprep process of Windows Server 2019 CoreThe following screenshot shows the sysprep process of a Windows Server 2019 Core VM instance:
Blue screen error from Windows Server 2016 DatacenterThe following screenshot shows a blue screen error from a Windows Server 2016 Datacenter VM instance:
What's nextLearn how to collect diagnostic information from a VM.
Learn how to troubleshoot Windows instances.
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 page provides instructions on how to use the VM screenshot tool to capture screenshots from virtual machine (VM) instances, which can be helpful for troubleshooting inaccessible VMs or failed RDP connections."],["The VM screenshot tool captures the local console session through a remote desktop client, potentially exposing sensitive information, so users should configure their remote desktop client (like Chrome Remote Desktop or Microsoft RDP) to avoid using the local console session."],["To take a screenshot, the VM must be in the `RUNNING` state, the maximum capture rate is 20 screenshots per second, and only one screenshot can be captured at a time, with the process requiring specific permissions."],["Users can capture a screenshot through the Google Cloud console, using the `gcloud compute instances get-screenshot` command, or by making a `instances.getScreenshot` request through the Compute Engine API."],["Before sharing screenshots, users are encouraged to check them for sensitive data, and are also provided with links to more information regarding diagnostics and troubleshooting."]]],[]]
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