hashicorp / hashicorp/packer

[googlecompute] Error creating windows password: time out while waiting for the password to be created

Open
#13,542 1 comment 1 reaction 0 assignees View on GitHub
bug
Dominant language
Go
Stars
15.8k
Forks
3.3k
PR merge metrics
PR metrics pending

Description

#### Community Note

* Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request
* Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
* If you are interested in working on this issue or have submitted a pull request, please leave a comment

#### Overview of the Issue

Build 'googlecompute.win2019_office2021' errored after 30 minutes 51 seconds: Error creating windows password: time out while waiting for the password to be created

#### Reproduction Steps
1. Using the official version (ex: windows-server-2019-dc-v20251112 or windows-server-2016-dc-v20251112), the first-layer image (ex: base-golden-Win2019) is built successfully.

2. Building the second-layer image based on the first-layer image (base-golden-Win2019) results in the following error: Error creating windows password

### Packer version
packer version: Packer v1.9.1

googlecompute version "v1.2.1"

set these:
winrm_timeout = "30m"
windows_password_timeout = "30m"

### Log Fragments and crash.log files
```
21:02:55 ==> googlecompute.win2019_office2021: Checking image does not exist...
21:02:55 ==> googlecompute.win2019_office2021: Creating temporary RSA SSH key for instance...
21:02:56 ==> googlecompute.win2019_office2021: no persistent disk to create
21:02:56 2025/12/09 13:02:56 packer-plugin-googlecompute_v1.2.1_x5.0_linux_amd64 plugin: 2025/12/09 13:02:56 failed to get project metadata: Project metadata key, enable-oslogin, not found.
21:02:57 ==> googlecompute.win2019_office2021: Using image: gcp-base-image-win2019-v20251112
21:02:57 ==> googlecompute.win2019_office2021: Creating instance...
21:02:57 2025/12/09 13:02:57 packer-plugin-googlecompute_v1.2.1_x5.0_linux_amd64 plugin: 2025/12/09 13:02:57 [DEBUG] Adding metadata during instance creation...
21:02:57 googlecompute.win2019_office2021: Loading zone: us-west1-a
21:02:57 googlecompute.win2019_office2021: Loading machine type: n1-standard-2
21:02:57 2025/12/09 13:02:57 packer-plugin-googlecompute_v1.2.1_x5.0_linux_amd64 plugin: 2025/12/09 13:02:57 [DEBUG] using google-managed encryption key for boot disk
21:02:57 googlecompute.win2019_office2021: Requesting instance creation...
21:02:58 googlecompute.win2019_office2021: Waiting for creation operation to complete...
21:02:58 2025/12/09 13:02:58 packer-plugin-googlecompute_v1.2.1_x5.0_linux_amd64 plugin: 2025/12/09 13:02:58 Retryable error: retrying for state DONE, got RUNNING
21:03:00 2025/12/09 13:03:00 packer-plugin-googlecompute_v1.2.1_x5.0_linux_amd64 plugin: 2025/12/09 13:03:00 Retryable error: retrying for state DONE, got RUNNING
21:03:02 2025/12/09 13:03:02 packer-plugin-googlecompute_v1.2.1_x5.0_linux_amd64 plugin: 2025/12/09 13:03:02 Retryable error: retrying for state DONE, got RUNNING
21:03:04 2025/12/09 13:03:04 packer-plugin-googlecompute_v1.2.1_x5.0_linux_amd64 plugin: 2025/12/09 13:03:04 Retryable error: retrying for state DONE, got RUNNING
21:03:07 2025/12/09 13:03:07 packer-plugin-googlecompute_v1.2.1_x5.0_linux_amd64 plugin: 2025/12/09 13:03:07 Retryable error: retrying for state DONE, got RUNNING
21:03:09 googlecompute.win2019_office2021: Instance has been created!
21:03:09 ==> googlecompute.win2019_office2021: Creating windows user for instance...
21:03:09 googlecompute.win2019_office2021: Waiting for windows password to complete...
21:03:10 2025/12/09 13:03:10 packer-plugin-googlecompute_v1.2.1_x5.0_linux_amd64 plugin: 2025/12/09 13:03:10 Retryable error: retrying for state DONE, got RUNNING
21:03:12 2025/12/09 13:03:12 packer-plugin-googlecompute_v1.2.1_x5.0_linux_amd64 plugin: 2025/12/09 13:03:12 Retryable error: retrying for state DONE, got RUNNING
21:33:09 ==> googlecompute.win2019_office2021: Error creating windows password: time out while waiting for the password to be created
21:33:09 ==> googlecompute.win2019_office2021: Deleting instance...
21:33:09 2025/12/09 13:33:09 packer-plugin-googlecompute_v1.2.1_x5.0_linux_amd64 plugin: 2025/12/09 13:33:09 Retryable error: retrying for state DONE, got RUNNING
21:33:12 2025/12/09 13:33:11 packer-plugin-googlecompute_v1.2.1_x5.0_linux_amd64 plugin: 2025/12/09 13:33:11 Retryable error: retrying for state DONE, got RUNNING
21:33:14 2025/12/09 13:33:14 packer-plugin-googlecompute_v1.2.1_x5.0_linux_amd64 plugin: 2025/12/09 13:33:14 Retryable error: retrying for state DONE, got RUNNING
21:33:16 2025/12/09 13:33:16 packer-plugin-googlecompute_v1.2.1_x5.0_linux_amd64 plugin: 2025/12/09 13:33:16 Retryable error: retrying for state DONE, got RUNNING
21:33:18 2025/12/09 13:33:18 packer-plugin-googlecompute_v1.2.1_x5.0_linux_amd64 plugin: 2025/12/09 13:33:18 Retryable error: retrying for state DONE, got RUNNING
21:33:20 2025/12/09 13:33:20 packer-plugin-googlecompute_v1.2.1_x5.0_linux_amd64 plugin: 2025/12/09 13:33:20 Retryable error: retrying for state DONE, got RUNNING
21:33:22 2025/12/09 13:33:22 packer-plugin-googlecompute_v1.2.1_x5.0_linux_amd64 plugin: 2025/12/09 13:33:22 Retryable error: retrying for state DONE, got RUNNING
21:33:24 2025/12/09 13:33:24 packer-plugin-googlecompute_v1.2.1_x5.0_linux_amd64 plugin: 2025/12/09 13:33:24 Retryable error: retrying for state DONE, got RUNNING
21:33:27 2025/12/09 13:33:26 packer-plugin-googlecompute_v1.2.1_x5.0_linux_amd64 plugin: 2025/12/09 13:33:26 Retryable error: retrying for state DONE, got RUNNING
21:33:29 2025/12/09 13:33:29 packer-plugin-googlecompute_v1.2.1_x5.0_linux_amd64 plugin: 2025/12/09 13:33:29 Retryable error: retrying for state DONE, got RUNNING
21:33:31 2025/12/09 13:33:31 packer-plugin-googlecompute_v1.2.1_x5.0_linux_amd64 plugin: 2025/12/09 13:33:31 Retryable error: retrying for state DONE, got RUNNING
21:33:33 2025/12/09 13:33:33 packer-plugin-googlecompute_v1.2.1_x5.0_linux_amd64 plugin: 2025/12/09 13:33:33 Retryable error: retrying for state DONE, got RUNNING
21:33:35 2025/12/09 13:33:35 packer-plugin-googlecompute_v1.2.1_x5.0_linux_amd64 plugin: 2025/12/09 13:33:35 Retryable error: retrying for state DONE, got RUNNING
21:33:37 2025/12/09 13:33:37 packer-plugin-googlecompute_v1.2.1_x5.0_linux_amd64 plugin: 2025/12/09 13:33:37 Retryable error: retrying for state DONE, got RUNNING
21:33:39 2025/12/09 13:33:39 packer-plugin-googlecompute_v1.2.1_x5.0_linux_amd64 plugin: 2025/12/09 13:33:39 Retryable error: retrying for state DONE, got RUNNING
21:33:42 2025/12/09 13:33:42 packer-plugin-googlecompute_v1.2.1_x5.0_linux_amd64 plugin: 2025/12/09 13:33:42 Retryable error: retrying for state DONE, got RUNNING
21:33:44 googlecompute.win2019_office2021: Instance has been deleted!
21:33:44 ==> googlecompute.win2019_office2021: Deleting disk...
21:33:44 2025/12/09 13:33:44 packer-plugin-googlecompute_v1.2.1_x5.0_linux_amd64 plugin: 2025/12/09 13:33:44 Retryable error: retrying for state DONE, got RUNNING
21:33:46 googlecompute.win2019_office2021: Disk has been deleted!
21:33:46 2025/12/09 13:33:46 [INFO] (telemetry) ending googlecompute.win2019_office2021
21:33:46 Build 'googlecompute.win2019_office2021' errored after 30 minutes 51 seconds: Error creating windows password: time out while waiting for the password to be created
21:33:46
21:33:46 ==> Wait completed after 30 minutes 51 seconds
21:33:46 ==> Wait completed after 30 minutes 51 seconds
21:33:46 2025/12/09 13:33:46 machine readable: error-count []string{"1"}
21:33:46
21:33:46 ==> Some builds didn't complete successfully and had errors:
21:33:46 2025/12/09 13:33:46 machine readable: googlecompute.win2019_office2021,error []string{"Error creating windows password: time out while waiting for the password to be created"}
21:33:46 ==> Builds finished but no artifacts were created.
21:33:46 ==> Some builds didn't complete successfully and had errors:
21:33:46 --> googlecompute.win2019_office2021: Error creating windows password: time out while waiting for the password to be created
21:33:46
21:33:46 ==> Builds finished but no artifacts were created.
21:33:46 2025/12/09 13:33:46 [INFO] (telemetry) Finalizing.
21:33:47 2025/12/09 13:33:47 waiting for all plugin processes to complete...
21:33:47 2025/12/09 13:33:47 /home/ubuntu/.packer.d/plugins/github.com/hashicorp/ansible/packer-plugin-ansible_v1.1.3_x5.0_linux_amd64: plugin process exited
21:33:47 2025/12/09 13:33:47 /usr/local/bin/packer_0191: plugin process exited
21:33:47 2025/12/09 13:33:47 /usr/local/bin/packer_0191: plugin process exited
21:33:47 2025/12/09 13:33:47 /home/ubuntu/.packer.d/plugins/github.com/hashicorp/googlecompute/packer-plugin-googlecompute_v1.2.1_x5.0_linux_amd64: plugin process exited
21:33:47 2025/12/09 13:33:47 /usr/local/bin/packer_0191: plugin process exited
```

Contributor guide

Open the contributing guide

Research direction

Start by tracing the googlecompute builder's Windows password creation flow and its timeout handling, then reproduce the failure using the reported Windows Server image layering setup and timeout values. Done means identifying why password creation remains in RUNNING state and providing a verified fix or a clear diagnostic outcome.

Written by the indexing model from the issue text.

Assessment

Tech stack
gcp, go
Domain
cloud, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.