I have recently come across an error: Windows password could not be set. Try again. If you just created this instance, allow 10 minutes for it to be ready.
I have come across different suggestions on the web but neither of that has fixed the issue.
The problem on that specific instance was “Google Compute Engine Agent” service that was not starting (part of Google guest environment).
I was not able to find why the service had stopped working, due to vague logs, but I was able to reinstall it, which resolve the issue.
How?
I have access the instance via RDP and I run PowerShell as administrator.
Firstly I have verified the status of service:
Get-Service GCEAgent
Worth looking into Event Viewer too if service is not running.
I have tried starting the service:
Start-Service -Name GCEAgent
Service was not starting due to an error.
I have uninstalled Google Compute Engine Agent:
googet -noconfirm remove google-compute-engine-windows
Then I have install it with:
googet -noconfirm install google-compute-engine-windows
Hope this helps!
Related documentation:
– Connect to Windows VMs using RDP