Hello everyone, first time posting here,
so I’ve been working with packer and ansible for quite some time now and would consider myself somewhat experienced.
In my latest project, I am setting up a Windows10 VM in VirtualBox with ansible and packer. Unfortunately, now I am having some problems with the WinRM communicator.
In the past, I used a NAT adapter such that WinRM could connect via IP 127.0.0.1 - and everything worked just fine.
Now I tried to switch to a Host-only adapter, which of course results in the necessity to change the IP address to connect to with WinRM (no more NAT interface - use Host-only interface). After adding the winrm_host option to the packer script with the new correct IP (“192.168.X.X”) the packer script no longer builds successfully, but gets stuck in the “Waiting for WinRM to become available”-step resulting in a timeout.
The output of the script also says “Using winrm communicator to connect: 127.0.0.1” - so it does not use the IP address I specified in the packer script.
“Manually” connecting via a small python-script using pywinrm works like a charm.
I am using packer version v1.6.6.
Has anyone else experienced this problem and found a solution? I found some older issues in the github-repository stating that the winrm_host option seems to be completely ignored.
Thanks for any input and suggestions!
EDIT: Here are the links to the above-mentioned issues: