Windows – Recover Windows from safe mode on Google Cloud Platform

google-cloud-platformgoogle-compute-enginewindows

I have a google cloud server with windows installed on it, yesterday I rebooted it into safe mode but I forgot to check "networking" option and now I cant connect to it. How can I exit from safe mode from google console?
thanks

Best Answer

You can enable the serial port console of your instance with this command in the cloud shell:

$ gcloud compute instances add-metadata [INSTANCE_NAME]
--metadata=serial-port-enable=1

Then after connect to your instance from the serial port:

$ gcloud compute connect-to-serial-port [INSTANCE_NAME] --port=2

After you enter the windows SAC, you can enter to a CMD session, it prompts you to use your user and password:

cmd
ch -sn cmd0001

In case you forgot the password,you can generate a new one;

$ gcloud beta compute reset-windows-password [INSTANCE-NAME]

Once inside you can stop the safe mode boot and log normal launching:

bcdedit /deletevalue {default} safeboot

And finaly shutdown/start your instance.

Related Topic