Attempting WinRM connection with error: http response error: 401

48 views
Skip to first unread message

lovi

unread,
Sep 24, 2019, 6:48:31 AM9/24/19
to Packer
Hello,

I've this error with a windows 2016.

on the VM I got :
Client",
            "        NetworkDelayms = 5000",
            "        URLPrefix = wsman",
            "        AllowUnencrypted = false",
            "        Auth",
            "            Basic = true",
            "            Digest = true",
            "            Kerberos = true",
            "            Negotiate = true",
            "            Certificate = true",
            "            CredSSP = false",
            "        DefaultPorts",
            "            HTTP = 5985",
            "            HTTPS = 5986",
            "        TrustedHosts",
            "        AllowUnencrypted = false",

And I can manage to connect with ansible with NTLM.


Is there a conf in the packer side to make it work  ?

I have seen (https://github.com/hashicorp/packer/issues/6205) that people change AllowUnencrypted to True :-> winrm set winrm/config/service '@{AllowUnencrypted="true"}' .
As

But I don't think its a good news.


Regards


Nitin Shetty

unread,
Nov 4, 2019, 7:52:39 AM11/4/19
to Packer
Have you tried setting the packer builder configuration to have this?
"winrm_use_ssl"true,
"winrm_insecure"true,
"winrm_use_ntlm"true,
Reply all
Reply to author
Forward
0 new messages