hey , I am trying building an Image via Packer for Azure .. I am trying to build a Windows Server 2012 R2 image and it seems the packer build fails even though I am setting `"winrm_timeout": "20m",` ( which is a huge number ) .. I am following some of the git bugs but none is able to provide me what might be causing the issue .. Can some one provide any context on this ?
A point to note that on Azure portal the VM is shown up and running ( from which the Image needs to be extracted ) . I am following the docs listed at :- `https://docs.microsoft.com/en-us/azure/virtual-machines/windows/build-image-with-packer` (edited) ```==> azure-arm: Timeout waiting for WinRM. ==> azure-arm: ==> azure-arm: Cleanup requested, deleting resource group ...``` This is the error that I am getting .. Providing the sample json file that I am using Enter code here.. { "builders": [{ "type": "azure-arm", "client_id": "XXXXX", "client_secret": "XXXX", "resource_group_name": "testPacker", "storage_account": "testpackerstorage", "subscription_id": "XXXX", "tenant_id": "XXX", "object_id": "XXX", "capture_container_name": "images", "capture_name_prefix": "packer", "os_type": "Windows", "image_publisher": "MicrosoftWindowsServer", "image_offer": "WindowsServer", "image_sku": "2012-R2-Datacenter", "communicator": "winrm", "winrm_use_ssl": "true", "winrm_insecure": "true", "winrm_username": "packer", "winrm_timeout": "20m", "location": "EAST US2", "vm_size": "Standard_DS2_v2" }], "provisioners": [{ "type": "powershell", "inline": [ "if( Test-Path $Env:SystemRoot\\windows\\system32\\Sysprep\\unattend.xml ){ rm $Env:SystemRoot\\windows\\system32\\Sysprep\\unattend.xml -Force}", "& $env:SystemRoot\\System32\\Sysprep\\Sysprep.exe /oobe /generalize /quiet /quit", "while($true) { $imageState = Get-ItemProperty HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Setup\\State | Select ImageState; if($imageState.ImageState -ne 'IMAGE_STATE_GENERALIZE_RESEAL_TO_OOBE') { Write-Output $imageState.ImageState; Start-Sleep -s 10 } else { break } }" ] }] } -- 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/985931a8-0adf-499f-bdcf-c3407f9a71b5%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
