Set new Windows password

3,105 views
Skip to first unread message

Rocky Borrego

unread,
Jul 27, 2015, 5:33:17 PM7/27/15
to gce-discussion
For some reason, I am having a difficult time creating new instances using the new admin user password system.  I just created a new instance from an Image I had created a few months ago.  After the Instance is crated, I open it from the Developer Console and click on the 'Create or reset Windows password' button.  No matter what name I use, existing or new, I simple get the following error message:

'Windows password could not be set. Try again. 
If you just created this instance, allow 10 minutes for it to be ready.'

I have even waited server hours after creating the Instance, and I still get that.  Is there a setting that needs to be set first for this to work?

Has anyone else run into this?


Feng Min

unread,
Jul 27, 2015, 7:10:05 PM7/27/15
to gce-discussion, ro...@nexentconsulting.com

mia...@google.com

unread,
Jul 28, 2015, 12:15:36 AM7/28/15
to gce-discussion, ro...@nexentconsulting.com
As Feng pointed out, most likely you are using the old authentication process. Have a look at https://cloud.google.com/compute/docs/instances/windows-old-auth in order to upgrade your instance. 

Rocky Borrego

unread,
Jul 28, 2015, 2:38:37 PM7/28/15
to gce-discussion, mia...@google.com
Thanks  you for the update.  I did try following those instructions and still getting the same error.

I first tried creating an Instance directly from the Image, using the custom metadata tag.  But did not work.

I also create an Instance from the Image, then shut down the Instance, deleted it (keeping the boot disk), and finally created a new Instance using that same disk, with the metadata tags as per the instructions.

Still no go.  It has also been an hour now, and still not able to reset the password from the Developer Console.  I also tried it via gcloud and get this output:

Resetting and retrieving password for [rocky] on [image-update-fixed]
ERROR: (gcloud.compute.reset-windows-password) 
The instance may not be ready for use. This can occur if the instance was
recently created or if the instance is not running Windows.
Please wait a few minutes and try again.


I also looked at the serial console output and get this:

Booting from Hard Disk 0...
Booting from 0000:7c00
GCE Agent started.
Starting AddressManager
Starting CredentialsManager
Booting on date 07/28/2015 17:30:13
WARNING: Computer Name master-clone does not match Compute Engine Instance Name image-update-fixed.
Did you forget to run gcesysprep?
attributes/windows-startup-script-bat value is not set or metadata server is not reachable.
attributes/windows-startup-script-cmd value is not set or metadata server is not reachable.
attributes/windows-startup-script-ps1 value is not set or metadata server is not reachable.


Any advice? 

Rocky Borrego

unread,
Jul 28, 2015, 6:56:40 PM7/28/15
to gce-discussion, mia...@google.com, ro...@nexentconsulting.com

Okay, I may be getting closer...  What may be happening is that although I am creating a new Instance from the older Image (or Disk), and even though I am setting the 'windows-startup-script-url' in the metadata when creating the new Instance, it is somehow not working.  I tried with multiple order Disks and when I check the serial console output it looks like I am still running the older GCE Agent (GCE Agent started.)

Then I RDP into one of those instances that failed to work above, and I downloaded the agent upgrade script (install_agent.ps1) and I ran it using the Powershell tool.  Now all of a sudden when I check the serial console I see the new GCE agent is running (7/29/2015 3:43:26 AM UTC: GCE Agent started (version 3.0.0.3).)  And I was able to set or reset the admin password via the button without errors.

Below is a screenshot of how I was entering the metadata tags via the Developer Console.  And I configuring it incorrectly somehow?






mia...@google.com

unread,
Jul 29, 2015, 8:17:48 AM7/29/15
to gce-discussion, ro...@nexentconsulting.com
Glad you were able to find a workaround.  As far as configuration is concerned, if you followed the tutorial to the letter than you should be fine. It most likely relates to the way the older image was configured (based on your error, it looks like a conflict of resources, naming in particular). As you were finally able to login, you may want to have a look at Event Viewer for any possible logs..however Windows tends not to be so verbose as Linux when it comes to logs availability. 

If you still create machines from the older image, the best way to change the password is by updating the metadata values for gce-initial-windows-user and gce-initial-windows-password as below. Once that is done, you can follow the upgrade process for the new authentication scheme.  

gcloud compute instances add-metadata [INSTANCE_NAME] --project "[PROJECT_NAME]" --metadata gce-initial-windows-password=[NEW_PASSWORD]  
gcloud compute instances add-metadata [INSTANCE_NAME] --project "[PROJECT_NAME]" --metadata gce-initial-windows-user=[NEW_USER]  

My suggestion is to create a fresh image based on the newest image and move your data across from the old one, in order to completely bypass any issue that could arise from the upgrade.  

One interesting aspect, did you happen to see multiple home directories when finally logged back in ? something like your_username and your_username.windows ? If so, this would suggest a Windows crash during the upgrade. 

Thanks,
Marius 
Reply all
Reply to author
Forward
0 new messages