Troubleshooting Windows VMs Stay organized with collections Save and categorize content based on your preferences.
This document describes the methods and tools available to resolve thefollowing Compute Engine Windows virtual machine (VM) instanceboot issues:
You can't connect to the VM using RDP, andtroubleshooting isunsuccessful in resolving your connection.
The login screen has not appeared in aVMscreenshot,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 VMunder normal operation.
If you are experiencing issues connecting to Windows VMs, seeTroubleshootingRDP.
For issues related to migrating to a third generation VM, see WindowsKnown issues.
Before you begin
- Review theMicrosoft Advanced troubleshooting for Windows bootproblems for information abouttroubleshooting the Windows boot process.
- If you haven't already, set upauthentication. 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:
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
Install the Google Cloud CLI. After installation,initialize the Google Cloud CLI by running the following command:
gcloudinit
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.- Set a default region and zone.
Using the Advanced Boot Options menu
If Windows doesn't start correctly, use the Advanced Boot Options menu to accesssafe mode or complete an online repair of the operating system. For moreinformation, seeAdvanced startupoptions.
To enter the Advanced Boot Options menu on your Windows VM, complete thefollowing procedure:
- Enable adisplay devicefor the VM if you haven't already.
Reset the VM by using one of the following methods:
Console
In the Google Cloud console, go to theVM instances page.
Click the name of the VM you want to reset. The VM instance detailspage opens.
Click theReset button to reboot the VM.
gcloud
Use the
gcloud compute instances resetcommand to reset the VM:gcloud compute instances resetVM_NAME --zone=ZONE --project=PROJECT_IDReplace the following:
PROJECT_ID: the ID of the project thatcontains the VMZONE: the name of the zone in which theVM is locatedVM_NAME: the name of the VM
Command Prompt
While connected to the interactive serial console,open a Command Prompt session and run the following command. For moreinformation about opening a Command Prompt session, seeOpening CommandPrompt in WindowsSAC.
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
Esckey on your keyboard.Press the number
8key on your keyboard.
The Advanced Boot Options menu opens:

Use the arrow keys on your keyboard to select an option, then open it bypressing theEnter key.
Enabling the Windows Boot Manager menu
You can configure the Windows Boot Manager menu to display when a Windows VMinstance is being rebooted. To enable the Windows boot manager menu, do thefollowing:
Note: If you need to enable the Windows Boot Menu to perform a operating systemrepair and are unable to login to the VM, you might need to complete anoffline repair instead.Connect to the VM andopen a Command Prompt withadministrativeaccess. If you cannot connect to the VM, add the subsequent steps as values to awindows-startup-script-cmd orwindows-startup-script-ps1startup script instead of running them directly
Command Prompt
To enable the Windows Boot Manager menu at startup and add a 15 secondtimeout, run the following commands:
bcdedit /set {bootmgr} displaybootmenu yesbcdedit /set {bootmgr} timeout 15To reboot the VM and display the Windows boot manager menu in the serialconsole using the following command:
shutdown -r -t 0
PowerShell
To enable the Windows Boot Manager menu at startup and add a 15 secondtimeout, run the following commands:
bcdedit /set '{bootmgr}' displaybootmenu yesbcdedit /set '{bootmgr}' timeout 15To reboot the VM and display the Windows boot manager menu in the serialconsole using the following command:
shutdown -r -t 0
Completing an offline repair
If your VM doesn't start correctly and using the advanced boot menu has failedto resolve the issue, try performing an offline repair using a functionalWindows 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 changingthe state of the original VM.
Create a snapshot of the troubledVM's boot disk.
Create adiskusing that snapshot.
Create a VM with an additional non-bootdisk,using the newly created disk. Your recovery VM should meet these criteria:
- The recovery VM must be in the same zone as the disk that was created.
- The recovery VM should also be using aWindows Serverimage.
- Thesource image of the recoveryVM's boot disk should be different to the source image of troubled VM'sboot disk.
You can now use Windows tools and utilities to attempt an offline repair ofthe additional attached disk. Refer to the following documentation fordetails about completing an offline repair of your VM:
If the offline repair has completed successfully,update the bootdiskof the troubled VM to be the newly repaired boot disk.
Optional: Delete the additional resources after you no longer need them:
- Delete the recovery VM
- Delete the original corrupted boot disk
- Delete the original corrupted boot disksnapshot
Troubleshooting blue screen errors
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 normaloperations.
If you believe a blue screen error may have occurred, confirm this byidentifying presence of errors using one or more of the following methods:
Serial port 1
Note: Google providedWindows public images version20191112 and later contain thegoogle-compute-engine-driver-pvpanic driverwhich automatically sends kernel panic information to the serial port. If itis not installed on your instance,install thedriver.In the Google Cloud console, go to theVM instances page.
Click the name of the VM you want to view logs for. The VM instancedetails page opens.
UnderLogs, clickSerial 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
RUNNINGlife cycle state, unless youhave serial logging enable. For more information, seeViewing serial portoutput.Serial port 2
Note: Google providedWindows public images version20191112 and later contain thegoogle-compute-engine-driver-pvpanic driverwhich automatically sends kernel panic information to the serial port. If itis not installed on your instance,install thedriver.In the Google Cloud console, go to theVM instances page.
Click the name of the VM you want to view logs for. The VM instancedetails page opens.
UnderLogs, expandMore, then clickSerial port 2 (console).
Review the serial port of the instance, and look for this output similarto 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_TRAPmyfault.sys0x00000000000000080xFFFFC6812AB94F700xFFFFC6812E38EFF00xFFFFF80E9A572794We're just collecting some error info, and then we'll restart for you.100% complete
RUNNINGlife cycle state, unless youhave serial logging enable. For more information, seeViewing serial portoutput.Command Prompt
Connect to the instanceand open a Command Prompt withadministrativeaccess.
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 (0x0000000000000008, 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 customizingwetutil queries, seewevtutil.
Disk Snapshot
If the VM is no longer operational, or the other methods have provenunsuccessful. You can inspect the boot disk of the suspected blue screen VMwith a secondary VM. Using a snapshot gives you a backup copy that can bemodified without changing the state of the original VM.
Create a snapshot of thesuspected blue screen VM's boot disk.
Create adiskusing that snapshot.
Create a VM with an additional non-bootdisk, using the newly created disk of the suspected VM. Your recovery VM shouldmeet these criteria:
- The recovery VM must be in the same zone as the disk that was created.
- The recovery VM should also be using aWindows Serverimage.
- Thesource image of therecovery VM's boot disk should be different to the source image oftroubled VM's boot disk.
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 suspectedinstance experienced a blue screen error. These files can also be used foranalysis and diagnosis.
Optional: Delete the additional resources after you no longer need them:
After you obtain the blue screen error information and optionally obtainedaccess to the memory dump file, follow the diagnostic steps and recommendationsas provided by Microsoft:
Licensing issues
Windows operating systems renew their licenses every seven days by connecting totheKey Management Service (KMS) server. If you receive messagesabout license expiration or any other issues related to licenses on your WindowsVMs, do the following:
Confirm that your Windows VM's VPC network is configured toallowcommunication withKMS.
Confirm that the Windows Firewall permits outbound connections to the KMSserver:
- IP address:
35.190.247.13 - Port:
1688 - Protocol:
TCP
For more information about configuring Windows Advanced Firewall rules, seeCreate an Outbound PortRule.
- IP address:
Check that the connection to the KMS server is successful by running the followingcommand 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 seeNext hop: Internet gateway listed in theStatic route field of theConnectivity Test result card. If you see a different result, then the Windows activation will fail.
. The result should show a status ofReachabilityand aSuccessfulresult.Run the following commands to confirm the current state of your license, setthe 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
Troubleshooting Interactive Serial Console
Ensure that you meet theprerequsiste to access serial console.
EnableEmergency Management Services.If EMS is turned off, the serial console won't take any keyboardinputs but present only a blank screen with a blinking cursor.
Command Prompt
Connect to the VM using RDPand open
Command Promptas an Administrator. If you cannot RDP, add thesubsequent steps as values to thewindows-startup-script-cmdstartup key.Set the global EMS redirection settings to use COM2, a baud rate of115200, and enable EMS.
bcdedit /emssettings EMSPORT:2 EMSBAUDRATE:115200bcdedit /ems on
Reboot the VM to apply the updated configuration. If you're using ametadata script don't add the shutdown command.
shutdown -r -t 0
PowerShell
Connect through RDPand open
Powershellas Administrator. If you cannot RDP, add thesubsequent steps as values to thewindows-startup-script-ps1startup key.Set the global EMS redirection settings to use COM2, a baud rate of115200, and enable EMS.
bcdedit /emssettings EMSPORT:2 EMSBAUDRATE:115200bcdedit /ems on
Reboot the VM to apply the updated configuration. If you're using ametadata script don't add the shutdown command.
shutdown -r -t 0
What's next
Learn how tocollect diagnostic information from aVM.
Learn how tocapture screenshots fromVMs.
Learn aboutlicensing for Windows Server and SQL Serverimages.
Learn more aboutinteracting with the serialconsole.
Learn how toTroubleshoot RDPconnections.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-02-18 UTC.