Hello, I have a case of consistently getting “Waiting for WinRM to become available…” despite absurdly long winrm_timeout values. Oddly, this same build has been successful in the past and also works on portal.azure.us (as opposed the .com). When it has been successful the wait time has been typically 10-15s. I’m not aware of any recent network disruptions. I have a support request open with Microsoft, but am also wondering if anyone in the community has any thoughts on what may be going on here? Pasting the relevant parts of Packerfile.json and log output below.
"variables": {
"client_id": "{{env `clientId`}}",
"client_secret": "{{env `clientSecret`}}",
"tenant_id": "{{env `ad_tenantId`}}",
"subscription_id": "{{env `SubscriptionId`}}",
"location": "{{env `Location`}}",
"managed_image_resource_group_name": "{{env `ResourceGroupName`}}",
"image_name": "{{env `imageName`}}",
"temp_resource_group_name": "packer-Resource-Group-{{uuid}}",
"owner": "{{env `triggeredUser`}}",
"published_date": "{{env `publishedDate`}}",
"chef_version": "14.10.9",
"runlist": "atf_jenkins_agent_image::default"
},
"builders": [{
"type": "azure-arm",
"client_id": "{{user `client_id`}}",
"client_secret": "{{user `client_secret`}}",
"tenant_id": "{{user `tenant_id`}}",
"subscription_id": "{{user `subscription_id`}}",
"cloud_environment_name": "{{user `azure_environment`}}",
"temp_resource_group_name": "{{user `temp_resource_group_name`}}",
"managed_image_resource_group_name": "{{user `managed_image_resource_group_name`}}",
"managed_image_name": "{{user `image_name`}}",
"os_type": "Windows",
"location": "{{user `location`}}",
"image_publisher": "MicrosoftWindowsServer",
"image_offer": "WindowsServer",
"image_sku": "2019-Datacenter",
"image_version": "2019.0.20190603",
"vm_size": "Standard_D2s_v3",
"communicator": "winrm",
"winrm_use_ssl": "true",
"winrm_insecure": "true",
"winrm_timeout": "720m",
"winrm_username": "packer",
"azure_tags": {
"dept": "Operations",
"publishedOn": "{{user `published_date`}}",
"imageOwner": "{{user `owner`}}"
}
}],
...
[2020-06-05T19:34:30.989Z] Executing Build
[2020-06-05T19:34:30.989Z] azure-arm: output will be in this color.
[2020-06-05T19:34:30.989Z]
[2020-06-05T19:34:30.989Z] ==> azure-arm: Running builder ...
[2020-06-05T19:34:30.989Z] ==> azure-arm: Getting tokens using client secret
[2020-06-05T19:34:30.989Z] ==> azure-arm: Getting tokens using client secret
[2020-06-05T19:34:30.989Z] azure-arm: Creating Azure Resource Manager (ARM) client ...
[2020-06-05T19:34:30.989Z] ==> azure-arm: WARNING: Zone resiliency may not be supported in EastUS2, checkout the docs at https://docs.microsoft.com/en-us/azure/availability-zones/
[2020-06-05T19:34:30.989Z] ==> azure-arm: Creating resource group ...
[2020-06-05T19:34:30.989Z] ==> azure-arm: -> ResourceGroupName : 'packer-Resource-Group-5eda9e3e-e286-699d-d3ba-33cd0693f978'
[2020-06-05T19:34:30.989Z] ==> azure-arm: -> Location : 'EastUS2'
[2020-06-05T19:34:30.989Z] ==> azure-arm: -> Tags :
[2020-06-05T19:34:30.989Z] ==> azure-arm: ->> publishedOn : 20200605
[2020-06-05T19:34:30.989Z] ==> azure-arm: ->> imageOwner : andrew.youngdahl
[2020-06-05T19:34:30.989Z] ==> azure-arm: ->> dept : Operations
[2020-06-05T19:34:30.989Z] ==> azure-arm: Validating deployment template ...
[2020-06-05T19:34:30.989Z] ==> azure-arm: -> ResourceGroupName : 'packer-Resource-Group-5eda9e3e-e286-699d-d3ba-33cd0693f978'
[2020-06-05T19:34:30.989Z] ==> azure-arm: -> DeploymentName : 'pkrdpw976qupd1z'
[2020-06-05T19:34:30.989Z] ==> azure-arm: Deploying deployment template ...
[2020-06-05T19:34:30.989Z] ==> azure-arm: -> ResourceGroupName : 'packer-Resource-Group-5eda9e3e-e286-699d-d3ba-33cd0693f978'
[2020-06-05T19:34:30.989Z] ==> azure-arm: -> DeploymentName : 'kvpkrdpw976qupd1z'
[2020-06-05T19:35:27.224Z] ==> azure-arm: Getting the certificate's URL ...
[2020-06-05T19:35:27.224Z] ==> azure-arm: -> Key Vault Name : 'pkrkvw976qupd1z'
[2020-06-05T19:35:27.224Z] ==> azure-arm: -> Key Vault Secret Name : 'packerKeyVaultSecret'
[2020-06-05T19:35:27.490Z] ==> azure-arm: -> Certificate URL : 'https://pkrkvw976qupd1z.vault.azure.net/secrets/packerKeyVaultSecret/2d9cd2e4d4664faabfdf6dfbc482fcd1'
[2020-06-05T19:35:27.490Z] ==> azure-arm: Setting the certificate's URL ...
[2020-06-05T19:35:27.491Z] ==> azure-arm: Validating deployment template ...
[2020-06-05T19:35:27.491Z] ==> azure-arm: -> ResourceGroupName : 'packer-Resource-Group-5eda9e3e-e286-699d-d3ba-33cd0693f978'
[2020-06-05T19:35:27.491Z] ==> azure-arm: -> DeploymentName : 'pkrdpw976qupd1z'
[2020-06-05T19:35:28.431Z] ==> azure-arm: Deploying deployment template ...
[2020-06-05T19:35:28.431Z] ==> azure-arm: -> ResourceGroupName : 'packer-Resource-Group-5eda9e3e-e286-699d-d3ba-33cd0693f978'
[2020-06-05T19:35:28.431Z] ==> azure-arm: -> DeploymentName : 'pkrdpw976qupd1z'
[2020-06-05T19:36:36.117Z] ==> azure-arm: Getting the VM's IP address ...
[2020-06-05T19:36:36.117Z] ==> azure-arm: -> ResourceGroupName : 'packer-Resource-Group-5eda9e3e-e286-699d-d3ba-33cd0693f978'
[2020-06-05T19:36:36.117Z] ==> azure-arm: -> PublicIPAddressName : 'pkripw976qupd1z'
[2020-06-05T19:36:36.117Z] ==> azure-arm: -> NicName : 'pkrniw976qupd1z'
[2020-06-05T19:36:36.117Z] ==> azure-arm: -> Network Connection : 'PublicEndpoint'
[2020-06-05T19:36:36.117Z] ==> azure-arm: -> IP Address : 'PUB.IP.EDITED.OUT'
[2020-06-05T19:36:36.117Z] ==> azure-arm: Waiting for WinRM to become available...