Stay organized with collections Save and categorize content based on your preferences.
Windows
This document describes the methods and tools available to resolve the following Compute Engine Windows virtual machine (VM) instance boot issues:
You can't connect to the VM using RDP, and troubleshooting is unsuccessful in resolving your connection.
The login screen has not appeared in a VM screenshot, and the VM does not appear to be making progress or performing an update.
You have encountered a blue screen error, frozen or erratically behaving VM under normal operation.
If you are experiencing issues connecting to Windows VMs, see Troubleshooting RDP.
For issues related to migrating to a third generation VM, see Windows Known issues.
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
.If Windows doesn't start correctly, use the Advanced Boot Options menu to access safe mode or complete an online repair of the operating system. For more information, see Advanced startup options.
To enter the Advanced Boot Options menu on your Windows VM, complete the following procedure:
Reset the VM by using one of the following methods:
ConsoleIn the Google Cloud console, go to the VM instances page.
Click the name of the VM you want to reset. The VM instance details page opens.
Click the Reset button to reboot the VM.
Use the gcloud compute instances reset
command to reset the VM:
gcloud compute instances reset VM_NAME --zone=ZONE --project=PROJECT_ID
Replace the following:
PROJECT_ID
: the ID of the project that contains the VMZONE
: the name of the zone in which the VM is locatedVM_NAME
: the name of the VMWhile connected to the interactive serial console, open a Command Prompt session and run the following command. For more information about opening a Command Prompt session, see Opening Command Prompt in Windows SAC.
shutdown /r /t 0
The Windows Boot Manager menu opens:
Before the countdown expires, complete these steps:
Ensure the interactive serial console is your active window.
Press the Esc
key on your keyboard.
Press the number 8
key on your keyboard.
The Advanced Boot Options menu opens:
Use the arrow keys on your keyboard to select an option, then open it by pressing the Enter key.
You can configure the Windows Boot Manager menu to display when a Windows VM instance is being rebooted. To enable the Windows boot manager menu, do the following:
Note: If you need to enable the Windows Boot Menu to perform a operating system repair and are unable to login to the VM, you might need to complete an offline repair instead.Connect to the VM and open a Command Prompt with administrative access. If you cannot connect to the VM, add the subsequent steps as values to a windows-startup-script-cmd
or windows-startup-script-ps1
startup script instead of running them directly
To enable the Windows Boot Manager menu at startup and add a 15 second timeout, run the following commands:
bcdedit /set {bootmgr} displaybootmenu yes
bcdedit /set {bootmgr} timeout 15
To reboot the VM and display the Windows boot manager menu in the serial console using the following command:
shutdown -r -t 0
To enable the Windows Boot Manager menu at startup and add a 15 second timeout, run the following commands:
bcdedit /set '{bootmgr}' displaybootmenu yes
bcdedit /set '{bootmgr}' timeout 15
To reboot the VM and display the Windows boot manager menu in the serial console using the following command:
shutdown -r -t 0
If your VM doesn't start correctly and using the advanced boot menu has failed to resolve the issue, try performing an offline repair using a functional Windows VM instance for recovery with a snapshot of the troubled VM's boot disk. Using a snapshot gives you a backup copy that can be modified without changing the state of the original VM.
Create a snapshot of the troubled VM's boot disk.
Create a disk using that snapshot.
Create a VM with an additional non-boot disk, using the newly created disk. Your recovery VM should meet these criteria:
You can now use Windows tools and utilities to attempt an offline repair of the additional attached disk. Refer to the following documentation for details about completing an offline repair of your VM:
If the offline repair has completed successfully, update the boot disk of the troubled VM to be the newly repaired boot disk.
Optional: Delete the additional resources after you no longer need them:
The Windows operating system may experience a stop code or blue screen error, also know as a Blue Screen of Death. If a VM experiences a blue screen error, the VM stops running and needs to perform a restart before resuming normal operations.
If you believe a blue screen error may have occurred, confirm this by identifying presence of errors using one or more of the following methods:
Serial port 1 Note: Google provided Windows public images version 20191112 and later contain thegoogle-compute-engine-driver-pvpanic
driver which automatically sends kernel panic information to the serial port. If it is not installed on your instance, install the driver.
In the Google Cloud console, go to the VM instances page.
Click the name of the VM you want to view logs for. The VM instance details page opens.
Under Logs, click Serial port 1.
A stack trace dump similar to the following confirms a blue screen error:
ntoskrnl.exe [0xFFFFF802C9606000, 0xFFFFF802C9E23000] netbios.sys [0xFFFFF80E98430000, 0xFFFFF80E98442000] volmgr.sys [0xFFFFF80E97E40000, 0xFFFFF80E97E58000] NTFS.sys [0xFFFFF80E98060000, 0xFFFFF80E98293000] crashdmp.sys [0xFFFFF80E986C0000, 0xFFFFF80E986D9000] pvpanic.sys [0xFFFFF80E99030000, 0xFFFFF80E9903C000] myfault.sys [0xFFFFF80E9A570000, 0xFFFFF80E9A578000] Dumping stack trace: 0xFFFFF80E990317C7 (pvpanic.sys+0x17C7) 0xFFFFF80E990316D3 (pvpanic.sys+0x16D3) 0xFFFFF802C97D9681 (ntoskrnl.exe+0x1D3681) 0xFFFFF802C97D8A1F (ntoskrnl.exe+0x1D2A1F) 0xFFFFF802C97633F4 (ntoskrnl.exe+0x15D3F4) 0xFFFFF802C9773329 (ntoskrnl.exe+0x16D329) 0xFFFFF802C976F152 (ntoskrnl.exe+0x169152) 0xFFFFF80E9A572794 (myfault.sys+0x2794) Current Process: notmyfault64.e
RUNNING
life cycle state, unless you have serial logging enable. For more information, see Viewing serial port output. Serial port 2 Note: Google provided Windows public images version 20191112 and later contain the google-compute-engine-driver-pvpanic
driver which automatically sends kernel panic information to the serial port. If it is not installed on your instance, install the driver.
In the Google Cloud console, go to the VM instances page.
Click the name of the VM you want to view logs for. The VM instance details page opens.
Under Logs, expand More, then click Serial port 2 (console).
Review the serial port of the instance, and look for this output similar to the following:
!SAC> Your PC ran into a problem and needs to restart. If you call a support person, give them this info: UNEXPECTED_KERNEL_MODE_TRAP myfault.sys 0x0000000000000008 0xFFFFC6812AB94F70 0xFFFFC6812E38EFF0 0xFFFFF80E9A572794 We're just collecting some error info, and then we'll restart for you. 100% complete
RUNNING
life cycle state, unless you have serial logging enable. For more information, see Viewing serial port output. Command Prompt
Connect to the instance and open a Command Prompt with administrative access.
To display the most recent blue screen event, run the following command:
wevtutil qe System "/q:*[System [(EventID=1001)]]" /rd:True /c:1 /f:Text
Review the output, which looks similar to the following:
Event[0]: Log Name: System Source: Microsoft-Windows-WER-SystemErrorReporting Date: 2021-04-14T08:53:52.933 Event ID: 1001 Task: N/A Level: Error Opcode: N/A Keyword: Classic User: N/A User Name: N/A Computer: WINDOWS Description: The computer has rebooted from a bugcheck. The bugcheck was: 0x1000007f (0x 0000000000000008, 0xffffc6812ab94f70, 0xffffc6812e38eff0, 0xfffff80e9a572794 ). A dump was saved in: C:\Windows\Minidump\041421-12656-01.dmp. Report Id: a5710c98-a577-4b3e-a3c9-2fc0aa4e5d83.
For information about customizing wetutil
queries, see wevtutil
.
If the VM is no longer operational, or the other methods have proven unsuccessful. You can inspect the boot disk of the suspected blue screen VM with a secondary VM. Using a snapshot gives you a backup copy that can be modified without changing the state of the original VM.
Create a snapshot of the suspected blue screen VM's boot disk.
Create a disk using that snapshot.
Create a VM with an additional non-boot disk , using the newly created disk of the suspected VM. Your recovery VM should meet these criteria:
Browse the additional disk and locate for the following files:
%SystemRoot%\Memory.dmp %SystemRoot%\Minidump\DATE-TIME-NUM.dmp
The date and time of the file can help you correlate if the suspected instance experienced a blue screen error. These files can also be used for analysis and diagnosis.
Optional: Delete the additional resources after you no longer need them:
After you obtain the blue screen error information and optionally obtained access to the memory dump file, follow the diagnostic steps and recommendations as provided by Microsoft:
Licensing issuesWindows operating systems renew their licenses every seven days by connecting to the Key Management Service (KMS) server. If you receive messages about license expiration or any other issues related to licenses on your Windows VMs, do the following:
Confirm that your Windows VM's VPC network is configured to allow communication with KMS.
Confirm that the Windows Firewall permits outbound connections to the KMS server:
35.190.247.13
1688
TCP
For more information about configuring Windows Advanced Firewall rules, see Create an Outbound Port Rule.
Check that the connection to the KMS server is successful by running the following command in Cloud Shell:
gcloud network-management connectivity-tests create test-access-to-gcp-kms \ --source-ip-address=WINDOWS_VM_IP_ADDRESS \ --destination-ip-address=35.190.247.13 \ --destination-port=1688 \ --protocol=TCP
As shown in the following image, you should see Next hop: Internet gateway listed in the Static route field of the Connectivity Test result card. If you see a different result, then the Windows activation will fail. . The result should show a status of Reachability
and a Successful
result.
Run the following commands to confirm the current state of your license, set the server IP address of the KMS and force an activation:
cscript \windows\system32\slmgr.vbs /dlv
cscript \windows\system32\slmgr.vbs /skms 35.190.247.13:1688
cscript \windows\system32\slmgr.vbs /ato
Ensure that you meet the prerequsiste to access serial console.
Enable Emergency Management Services. If EMS is turned off, the serial console won't take any keyboard inputs but present only a blank screen with a blinking cursor.
Command PromptConnect to the VM using RDP and open Command Prompt
as an Administrator. If you cannot RDP, add the subsequent steps as values to the windows-startup-script-cmd
startup key.
Set the global EMS redirection settings to use COM2, a baud rate of 115200, and enable EMS.
bcdedit /emssettings EMSPORT:2 EMSBAUDRATE:115200 bcdedit /ems on
Reboot the VM to apply the updated configuration. If you're using a metadata script don't add the shutdown command.
shutdown -r -t 0
Connect through RDP and open Powershell
as Administrator. If you cannot RDP, add the subsequent steps as values to the windows-startup-script-ps1
startup key.
Set the global EMS redirection settings to use COM2, a baud rate of 115200, and enable EMS.
bcdedit /emssettings EMSPORT:2 EMSBAUDRATE:115200 bcdedit /ems on
Reboot the VM to apply the updated configuration. If you're using a metadata script don't add the shutdown command.
shutdown -r -t 0
Learn how to collect diagnostic information from a VM.
Learn how to capture screenshots from VMs.
Learn about licensing for Windows Server and SQL Server images.
Learn more about interacting with the serial console.
Learn how to Troubleshoot RDP connections.
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 troubleshooting methods for common boot issues in Compute Engine Windows virtual machines (VMs), including inability to connect via RDP, no login screen, and blue screen errors."],["If a Windows VM doesn't start correctly, the Advanced Boot Options menu can be accessed through the interactive serial console to use safe mode or complete online repair."],["Offline repair is a method that involves creating a snapshot of the troubled VM's boot disk, creating a disk using that snapshot, and attaching it to a recovery VM for repair, which is necessary when online methods fail."],["Blue screen errors can be identified through serial port logs, command prompt event logs, or by examining disk snapshots on a separate VM for dump files."],["Windows license issues can be resolved by ensuring network connectivity with the Key Management Service (KMS) server and using specific commands to check, set, and activate the license."]]],[]]
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