I'm currently using Packer v1.5.2-dev version to make the ec2 Windows 2012r2 AMI build working.
I have tried to use Packer V1.5.4 but it fails due to the unknown protocol error
amzn-win2012r2-sysprep-base: Using module file /usr/lib/python2.7/site-packages/ansible/modules/windows/win_chocolatey.ps1
amzn-win2012r2-sysprep-base: <127.0.0.1> ESTABLISH WINRM CONNECTION FOR USER: Administrator on PORT 35358 TO 127.0.0.1==> amzn-win2012r2-sysprep-base: failed to handshake
amzn-win2012r2-sysprep-base: checking if winrm_host 127.0.0.1 is an IPv6 address
amzn-win2012r2-sysprep-base: fatal: [default]: UNREACHABLE! => { amzn-win2012r2-sysprep-base: "changed": false, amzn-win2012r2-sysprep-base: "msg": "ssl: HTTPSConnectionPool(host='127.0.0.1', port=35358): Max retries exceeded with url: /wsman (Caused by SSLError(SSLError(1, u'[SSL: UNKNOWN_PROTOCOL] unknown protocol (_ssl.c:727)'),))",
amzn-win2012r2-sysprep-base: "unreachable": true amzn-win2012r2-sysprep-base: }
From Packer V 1.5.4 (currently works on Packer v1.5.2-dev)
AWS Ec2 windows 2012r2 Latest version
Here is my environment variables in a shell file to call packer template.
export AWS_POLL_DELAY_SECONDS=180
export AWS_MAX_ATTEMPTS=40
export AWS_PROFILE=${AWS_PROFILE}
export AWS_DEFAULT_REGION=${region}
export ANSIBLE_HOST_KEY_CHECKING=False
Here is a log file when I build successfully from Packer v1.5.2-dev
Note: please do not kill the link for packer v1.5.2-dev
I have tested out in packer v1.4.3, v1.4.4, v1.4.5, v.1.4.6, v1.5.0, v1.5.1, v1.5.2, and v1.5.4. Windows AMI doesn't build correctly not with the same reason but so far only v1.5.2-dev is working.
We don't have the power to force Circle CI to keep old artifacts so if that dev binary is important to you, please cache it locally.
We will try to investigate why it is working for you in that binary, and not with anything else.
I can't tell from the log specifically which commit that dev binary is on. Which PR did it come from?
@SwampDragons Thank you so much and can't seems to find the original post where I got it from and let me spend time to dig some more.
Meanwhile, I wonder if the issue related to https://github.com/hashicorp/packer/issues/8705
In that post, there is a work around for updating the registry key and attended.xml to resolve.
I will try to see if it helps me to resolve as well.
Also, I will try the connection.py shown here to see if it helps to resolve the issue with Ansible as well @ https://github.com/hashicorp/packer/issues/7979 since I wasn't able to use any Ansible version above v2.8 due to the connectivity.
Keep you posted if I find the original post and working version with the released latest packer.
@SwampDragons, I have a new logs showing that the packer lost the connectivity after updating the
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\ServicesTcpip6\Parameters path doesn't exist and create HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\ServicesTcpip6\Parameters. Updating it's value to 000000ff
Per MS documentation here, 0x20 is the recommended instead of disabling it.
However, both cases are not but hanging..
@SwampDragons is there any recent debug build I could test out?
There's a recent nightly of the master branch so you can at least verify if it's still on master for us: https://github.com/hashicorp/packer/releases/tag/nightly
I haven't had a chance to look into this.
Did you ever figure out what patch it started failing on?
@SwampDragons, here the post where I discussed with you and you got me https://circleci.com/gh/hashicorp/packer/29969#artifacts/containers/0
Thanks.
I have a new artifact for you, from the proxy-removing PR: https://circleci.com/gh/hashicorp/packer/42707#artifacts/containers/0
Check the docs on the PR for how to disable the proxy; there are a couple of new flags you'll need to set, and I have tried to make the docs and examples nice and explicit: https://github.com/hashicorp/packer/pull/8625/files#diff-78e7a90125ac6b0d2589da3c7b2b1440
I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.