401 - Invalid credentials in Windows 2012 RTM version

20 views
Skip to first unread message

varada nair

unread,
Apr 14, 2021, 8:12:38 PM4/14/21
to Packer
Hi Team, 

I am using packer to build images for versions like Windows 2012 RTM, Windows 2012 R2 and Windows 2016. Out of three, windows 2012 RTM getting Invalid credentials - 401 HTTP Error while trying to run scripts through ansible. Can someone help with this? 


The full traceback is:
884
amazon-ebs: Traceback (most recent call last):
885
amazon-ebs: File "/root/.pyenv/versions/3.7.10/lib/python3.7/site-packages/winrm/transport.py", line 329, in _send_message_request
886
amazon-ebs: response.raise_for_status()
887
amazon-ebs: File "/root/.pyenv/versions/3.7.10/lib/python3.7/site-packages/requests/models.py", line 941, in raise_for_status
888
amazon-ebs: raise HTTPError(http_error_msg, response=self)
889
amazon-ebs: requests.exceptions.HTTPError: 401 Client Error: for url: https://host:5986/wsman

Packer Version : 1.7.0
OS : Windows Server 2012 RTM - Base ( released on 2021 - March )
Ansible 
Winrm config is done through user data script and same is used for all flavours of Windows. 


Regards,
Varada Nair
Reply all
Reply to author
Forward
0 new messages