Compute Engine에서 이 정보를 수집하는 방법에 관한 자세한 내용은 공개 저장소를 참조하세요.
제한사항
Windows Server를 기반으로 생성된 VM에서만 진단 정보를 수집할 수 있습니다.
시작하기 전에
Compute Engine은 v20190714 이후 Windows Server 이미지 공개 버전에서는 기본적으로 진단 도구를 설치합니다. 그렇지 않고 Windows Server 이미지 버전이 v20190714 이전이거나 커스텀 이미지를 사용하는 경우 googet install google-compute-engine-diagnostics 명령어를 사용하여 도구를 설치하세요.
아직 인증을 설정하지 않았다면 설정합니다.
인증은 Google Cloud 서비스 및 API에 액세스하기 위해 ID를 확인하는 프로세스입니다.
로컬 개발 환경에서 코드 또는 샘플을 실행하려면 다음 옵션 중 하나를 선택하여 Compute Engine에 인증하면 됩니다.
Select the tab for how you plan to use the samples on this page:
Console
When you use the Google Cloud console to access Google Cloud services and
APIs, you don't need to set up authentication.
gcloud
After installing the Google Cloud CLI,
initialize it by running the following command:
선택사항인 --collect-process-traces 플래그는 진단 도구가 실행 중인 시스템의 10분 trace를 수집할지 여부를 지정합니다. 여기에는 CPU, 디스크, 파일 및 네트워크 활동이 포함됩니다. Windows 기반 VM에서는 Windows 성능 레코더를 사용합니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-07-30(UTC)"],[[["\u003cp\u003eThis document describes a diagnostic tool for collecting information from Windows virtual machine (VM) instances to aid in troubleshooting before contacting support.\u003c/p\u003e\n"],["\u003cp\u003eThe diagnostic tool collects data related to disks, events, networks, programs, and system configurations, storing the information within the user's project for 10 days in a Cloud Storage bucket that defaults to private access.\u003c/p\u003e\n"],["\u003cp\u003eBefore sharing any collected diagnostic data with Google Support, users should review the information for any confidential or personally identifiable data and remove or mask it as necessary.\u003c/p\u003e\n"],["\u003cp\u003eThe tool is installed by default on Windows Server images later than \u003ccode\u003ev20190714\u003c/code\u003e; otherwise, it can be installed using the \u003ccode\u003egooget\u003c/code\u003e command, and diagnostic data can be exported remotely using the Google Cloud CLI.\u003c/p\u003e\n"],["\u003cp\u003eCollecting diagnostic data requires the \u003ccode\u003eiam.serviceAccountTokenCreator\u003c/code\u003e role, which can be granted to specific email addresses within a project using a provided gcloud command.\u003c/p\u003e\n"]]],[],null,["# Collecting diagnostic information\n\nWindows\n\n*** ** * ** ***\n\nThis document describes how to collect information about a virtual machine (VM)\ninstance by using a diagnostic tool. Use the information that the tools collects\nto help with basic troubleshooting before contacting\n[Support](/compute/docs/support).\n\nThe tool does the following:\n\n- Collects information only from the VM that you specify.\n\n- Stores the information only in your project.\n\n- Stores the information for 10 days in a [Cloud Storage\n bucket](/storage/docs/creating-buckets), which, by default, only you can access.\n\nBefore sharing the collected information with Google Support, do the following:\n\n1. Review the information for confidential or personally identifiable\n information (PII).\n\n2. Delete or mask the information as necessary.\n\nDiagnostic information collected from the VM\n--------------------------------------------\n\nThis diagnostic tool collects information about the following:\n\n- **Disks**:\n\n - [Windows Management Instrumentation\n (WMI)](https://docs.microsoft.com/en-us/windows/win32/wmisdk/wmi-start-page) object information about [disks](https://learn.microsoft.com/en-us/windows-hardware/drivers/storage/msft-disk), [partitions](https://learn.microsoft.com/en-us/windows-hardware/drivers/storage/msft-partition), and [volumes](https://learn.microsoft.com/en-us/windows-hardware/drivers/storage/msft-volume)\n- **Events**:\n\n - [Windows Events](https://docs.microsoft.com/en-us/windows/win32/events/windows-events?redirectedfrom=MSDN), including application events and system events\n- **Networks**:\n\n - WMI object information about [firewall rules](https://docs.microsoft.com/en-us/previous-versions/windows/desktop/legacy/jj676843(v%3Dvs.85)), and output from [ipconfig](https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/ipconfig), [netstat](https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/netstat), [nslookup](https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/nslookup), [ping](https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/ping), [route](https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/route_ws2008), and [tracert](https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/tracert)\n- **Programs**:\n\n - WMI object information about [processes](https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-process), [scheduled tasks](https://docs.microsoft.com/en-us/powershell/module/scheduledtasks/get-scheduledtask?view=win10-ps), [services](https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-service), and [Google Kubernetes Engine (GKE)](https://cloud.google.com/kubernetes-engine/docs/concepts/windows-server-gke)\n- **System**:\n\n - WMI object information about [users](https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-useraccount), Remote Desktop Protocol (RDP) settings by using [this script](https://github.com/GoogleCloudPlatform/compute-image-tools/blob/master/cli_tools/diagnostics/rdp_status.ps1), and output from [bcdedit](https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/bcdedit), [driverquery](https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/driverquery), [msinfo32](https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/msinfo32), [pnputil](https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/pnputil), and [systeminfo](https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/systeminfo), and [memory dump](https://docs.microsoft.com/en-us/troubleshoot/windows-server/performance/memory-dump-file-options) logs\n\nFor detailed information about how Compute Engine collects this\ninformation, see the [public repository](https://github.com/GoogleCloudPlatform/compute-image-tools/tree/master/cli_tools/diagnostics).\n\nLimitations\n-----------\n\n- You can only collect diagnostic information from VMs created based on Windows Server.\n\nBefore you begin\n----------------\n\n- Compute Engine installs the diagnostic tool by default on public versions of Windows Server images later than `v20190714`. Otherwise, if your Windows Server image version is earlier than `v20190714`, or you are using a custom image, install the tool by using the `googet install google-compute-engine-diagnostics` command.\n- If you haven't already, set up [authentication](/compute/docs/authentication). Authentication verifies your identity for access to Google Cloud services and APIs. To run code or samples from a local development environment, you can authenticate to Compute Engine by selecting one of the following options:\n\n Select the tab for how you plan to use the samples on this page: \n\n ### Console\n\n\n When you use the Google Cloud console to access Google Cloud services and\n APIs, you don't need to set up authentication.\n\n ### gcloud\n\n 1.\n [Install](/sdk/docs/install) the Google Cloud CLI.\n\n After installation,\n [initialize](/sdk/docs/initializing) the Google Cloud CLI by running the following command:\n\n ```bash\n gcloud init\n ```\n\n\n If you're using an external identity provider (IdP), you must first\n [sign in to the gcloud CLI with your federated identity](/iam/docs/workforce-log-in-gcloud).\n | **Note:** If you installed the gcloud CLI previously, make sure you have the latest version by running `gcloud components update`.\n 2. [Set a default region and zone](/compute/docs/gcloud-compute#set_default_zone_and_region_in_your_local_client).\n\n ### REST\n\n\n To use the REST API samples on this page in a local development environment, you use the\n credentials you provide to the gcloud CLI.\n 1. [Install](/sdk/docs/install) the Google Cloud CLI. After installation, [initialize](/sdk/docs/initializing) the Google Cloud CLI by running the following command: \n\n ```bash\n gcloud init\n ```\n 2. If you're using an external identity provider (IdP), you must first [sign in to the gcloud CLI with your federated identity](/iam/docs/workforce-log-in-gcloud).\n\n\n For more information, see\n [Authenticate for using REST](/docs/authentication/rest)\n in the Google Cloud authentication documentation.\n\nCollecting diagnostic information from a VM\n-------------------------------------------\n\nRun the diagnostic tool either directly from the VM, or remotely, by using the\nGoogle Cloud CLI. On Windows-based VMs, find the diagnostic tool in the\n`C:\\Program Files\\Google\\Compute Engine\\diagnostics` directory.\n\n#### Permissions required for this task\n\nTo perform this task, you must have the following [permissions](/iam/docs/overview#permissions):\n\n- `roles/iam.serviceAccountTokenCreator` on the project\n\n### gcloud\n\n1. Grant the `iam.serviceAccountTokenCreator` role on the project:\n\n ```\n gcloud projects add-iam-policy-binding PROJECT_ID \\\n --member user:EMAIL \\\n --role roles/iam.serviceAccountTokenCreator\n ```\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the project ID\n - \u003cvar translate=\"no\"\u003eEMAIL\u003c/var\u003e: the email address to grant the `iam.serviceAccountTokenCreator` role\n2. Export the diagnostic information as an object to a Cloud Storage\n bucket.\n\n ```\n gcloud compute diagnose export-logs VM_NAME \\\n [--collect-process-traces]\n ```\n\n The optional `--collect-process-traces` flag specifies\n whether the diagnostic tool collects a 10 minute trace of the running\n system, which includes CPU, disk, file, and network activity. On\n Windows-based VMs, this uses the [Windows Performance\n Recorder](https://docs.microsoft.com/en-us/windows-hardware/test/wpt/windows-performance-recorder).\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003eVM_NAME\u003c/var\u003e: name of the VM to collect diagnostic information from\n3. The log exporting process might take a few minutes to complete. View the\n status by using the [`gcloud compute instances get-serial-port-output`\n command](/sdk/gcloud/reference/compute/instances/get-serial-port-output).\n\n4. Compute Engine formats the name of the bucket containing the\n diagnostic information as\n `diagnostic_logs_project_`\u003cvar translate=\"no\"\u003ePROJECT_NUMBER\u003c/var\u003e.\n View or download the bucket by using the\n [gcloud CLI](/sdk/gcloud/reference/storage), or, in the\n Google Cloud console, from the **Cloud Storage** page:\n\n [Go to Storage](https://console.cloud.google.com/storage)\n\nWhat's next\n-----------\n\n- Learn how to [capture screenshots from VMs](/compute/docs/instances/capturing-vm-screenshots).\n\n- Learn how to [Troubleshoot Windows\n instances](/compute/docs/troubleshooting/troubleshooting-windows).\n\n- Learn how to [Troubleshoot RDP](/compute/docs/troubleshooting/troubleshooting-rdp)."]]