alibaba / packer-provider

Apache License 2.0
93 stars 26 forks source link

WINRM Password not recognised if they contain "_" - This is a valid windows password character #49

Closed Marcus-James-Adams closed 5 years ago

Marcus-James-Adams commented 5 years ago

I noticed this on the gui for ec2 launch but thought it just affected that but if you have SNIPED For brevity "variables": { "username" : "myadmin", "password" : "Password1With_In1t" }, "builders" :[ { "name": "alicloud.eu-central-1.ecs.gn5-c4g1.xlarge", "communicator": "winrm",
"winrm_username": "{{user username}}", "winrm_password": "{{user password}}"}]

on packer build you get

Build 'alicloud.eu-central-1.ecs.gn5-c4g1.xlarge' errored: Error creating instance: Aliyun API Error: RequestId: 1020D6CC-20A8-4CF9-8F7B-54EB88B239BD Status Code: 400 Code: InvalidPassword.Malformed Message: The specified parameter "Password" is not valid. => Some builds didn't complete successfully and had errors:

If you remove the from the password then they start to build. The "" is a valid character for windows passwords and should be allowed

chhaj5236 commented 5 years ago

@Marcus-James-Adams Could you set another password without "_"? All valid characters within password can be found in following documents. https://www.alibabacloud.com/help/doc-detail/25499.htm?spm=a2c63.p38356.a3.5.443b466a3KaAE8#CreateInstance

image

Marcus-James-Adams commented 5 years ago

@chhaj5236 "_" is a valid windows password character - the alicloud api must support it. For our current requirements, we can not change.

chhaj5236 commented 5 years ago

@Marcus-James-Adams This is not a packer-provider issue. I'll close it. Your request will be estimated by alicloud team.