I actually have this exact WINRM configuration in my JSON.

 "builders" : [{
    "type": "azure-arm",
    "client_id": "{{user `client_id`}}",
    "client_secret": "{{user `client_secret`}}",
    "subscription_id": "{{user `subscription_id`}}",
    "tenant_id": "{{user `tenant_id`}}",
    "managed_image_name" : "{{user `tag`}}",
    "managed_image_resource_group_name" : "{{user `image_resource_group`}}",
    "custom_managed_image_resource_group_name" : "{{user 
`image_resource_group`}}",
    "custom_managed_image_name": "{{user `base_image`}}",
    "build_resource_group_name" : "{{user `image_resource_group`}}",
    "vm_size": "Standard_D4_v3",
    "os_type": "{{user `os_type`}}",
    "os_disk_size_gb": "{{user `disk_size`}}",
    "communicator": "winrm",
    "winrm_use_ssl": true,
    "winrm_insecure": true,
    "winrm_timeout": "10m",
    "winrm_username": "packer"
  }],

The Linux Build Agent running packer is timing out with these settings.

On Wednesday, 28 November 2018 14:48:24 UTC-5, Justin DynamicD wrote:
>
> I'm actually doing this as we speak without issue, and there is no need to 
> install powershell core locally on the control node.
>
> On the azure-arm builder, just declare a few extra vars to connect to 
> Windows:
>
> "os_type": "Windows",
> "communicator": "winrm",
> "winrm_username": "packer",
> "winrm_use_ssl": true,
> "winrm_insecure": true
>
> "os_type" will tell azure to create a packer account on the windows 
> instance, add a certificate, and prep WinRM to listen via NTLM.  
> winrm_insecure just lets packer know that the cert is self-signed.  
>
> After that the toughest part is injecting your ansible playbook.  I found 
> the community supported ansible-remote plug-ins to be terrible, and instead 
> rely on shell-local to kick-off an ansible play.
>
>
> On Tuesday, November 27, 2018 at 1:11:32 PM UTC-8, Dan W wrote:
>>
>> Hello, I am currently using an automated pipeline to deploy Virtual 
>> Machines using Packer, Terraform and Ansible.
>>
>> Details
>>
>>    - Linux VMs as build agents
>>    - Powershell Core 6.1.1
>>    - WinRM into Windows Machines using the Packer communicator
>>    
>>
>> I have not had any success yet, I am using the Azure-Arm builder, so i 
>> will try a local builder as a workaround.
>>
>> Is this possibly a communicator problem where Packer expects Powershell 
>> to be on a Windows Operating System? I know the WinRM implementation uses 
>> https://github.com/masterzen/winrm
>>
>> Any help would be appreciated.
>>
>> Thanks
>> Dan
>>
>>
>>
>>
>>

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/ba756641-96f2-448f-bc5c-0d253214fc4d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to