==> azure-arm.example: Running builder ... azure-arm.example: Creating Azure Resource Manager (ARM) client ... ==> azure-arm.example: Getting source image id for the deployment ... ==> azure-arm.example: -> SourceImageName: '/subscriptions/93048f2d-2d0f-44cc-b12c-4df25a3c5ff5/providers/Microsoft.Compute/locations/eastus/publishers/microsoftvisualstudio/ArtifactTypes/vmimage/offers/visualstudio2022/skus/20_04-lts-gen2/versions/latest' ==> azure-arm.example: Creating resource group ... ==> azure-arm.example: -> ResourceGroupName : 'pkr-Resource-Group-ovjs6ze8ol' ==> azure-arm.example: -> Location : 'eastus' ==> azure-arm.example: -> Tags : ==> azure-arm.example: Validating deployment template ... ==> azure-arm.example: -> ResourceGroupName : 'pkr-Resource-Group-ovjs6ze8ol' ==> azure-arm.example: -> DeploymentName : 'kvpkrdpovjs6ze8ol' ==> azure-arm.example: Deploying deployment template ... ==> azure-arm.example: -> ResourceGroupName : 'pkr-Resource-Group-ovjs6ze8ol' ==> azure-arm.example: -> DeploymentName : 'kvpkrdpovjs6ze8ol' ==> azure-arm.example: Getting the certificate's URL ... ==> azure-arm.example: -> Key Vault Name : 'pkrkvovjs6ze8ol' ==> azure-arm.example: -> Key Vault Secret Name : 'packerKeyVaultSecret' ==> azure-arm.example: -> Certificate URL : 'https://pkrkvovjs6ze8ol.vault.azure.net/secrets/packerKeyVaultSecret/04791ed7e8aa4acaa3974f14e9eeb0b2' ==> azure-arm.example: Setting the certificate's URL ... ==> azure-arm.example: Validating deployment template ... ==> azure-arm.example: -> ResourceGroupName : 'pkr-Resource-Group-ovjs6ze8ol' ==> azure-arm.example: -> DeploymentName : 'pkrdpovjs6ze8ol' ==> azure-arm.example: ERROR: -> InvalidTemplateDeployment : The template deployment 'pkrdpovjs6ze8ol' is not valid according to the validation procedure. The tracking id is 'b82ff3b2-eb64-4e8c-ba1e-4d500cc083b7'. See inner errors for details. ==> azure-arm.example: ERROR: -> InvalidParameter : The following list of images referenced from the deployment template are not found: Publisher: microsoftvisualstudio, Offer: visualstudio2022, Sku: 20_04-lts-gen2, Version: latest. Please refer to https://docs.microsoft.com/en-us/azure/virtual-machines/windows/cli-ps-findimage for instructions on finding available images. ==> azure-arm.example: ==> azure-arm.example: deployments.DeploymentsClient#Validate: Failure sending request: StatusCode=0 -- Original Error: Code="InvalidTemplateDeployment" Message="The template deployment 'pkrdpovjs6ze8ol' is not valid according to the validation procedure. The tracking id is 'b82ff3b2-eb64-4e8c-ba1e-4d500cc083b7'. See inner errors for details." Details=[{"code":"InvalidParameter","message":"The following list of images referenced from the deployment template are not found: Publisher: microsoftvisualstudio, Offer: visualstudio2022, Sku: 20_04-lts-gen2, Version: latest. Please refer to https://docs.microsoft.com/en-us/azure/virtual-machines/windows/cli-ps-findimage for instructions on finding available images.","target":"imageReference"}] ==> azure-arm.example: ==> azure-arm.example: Deleting KeyVault created during build ==> azure-arm.example: Adding to deletion queue -> Microsoft.KeyVault/vaults/secrets : 'pkrkvovjs6ze8ol/packerKeyVaultSecret' ==> azure-arm.example: Adding to deletion queue -> Microsoft.KeyVault/vaults : 'pkrkvovjs6ze8ol' ==> azure-arm.example: Waiting for deletion of all resources... ==> azure-arm.example: Attempting deletion -> Microsoft.KeyVault/vaults/secrets : 'pkrkvovjs6ze8ol/packerKeyVaultSecret' ==> azure-arm.example: Attempting deletion -> Microsoft.KeyVault/vaults : 'pkrkvovjs6ze8ol' ==> azure-arm.example: Removing the created Deployment object: 'kvpkrdpovjs6ze8ol' ==> azure-arm.example: ==> azure-arm.example: Cleanup requested, deleting resource group ... ==> azure-arm.example: Resource group has been deleted. Build 'azure-arm.example' errored after 3 minutes 1 second: deployments.DeploymentsClient#Validate: Failure sending request: StatusCode=0 -- Original Error: Code="InvalidTemplateDeployment" Message="The template deployment 'pkrdpovjs6ze8ol' is not valid according to the validation procedure. The tracking id is 'b82ff3b2-eb64-4e8c-ba1e-4d500cc083b7'. See inner errors for details." Details=[{"code":"InvalidParameter","message":"The following list of images referenced from the deployment template are not found: Publisher: microsoftvisualstudio, Offer: visualstudio2022, Sku: 20_04-lts-gen2, Version: latest. Please refer to https://docs.microsoft.com/en-us/azure/virtual-machines/windows/cli-ps-findimage for instructions on finding available images.","target":"imageReference"}] ==> Wait completed after 3 minutes 1 second ==> Some builds didn't complete successfully and had errors: --> azure-arm.example: deployments.DeploymentsClient#Validate: Failure sending request: StatusCode=0 -- Original Error: Code="InvalidTemplateDeployment" Message="The template deployment 'pkrdpovjs6ze8ol' is not valid according to the validation procedure. The tracking id is 'b82ff3b2-eb64-4e8c-ba1e-4d500cc083b7'. See inner errors for details." Details=[{"code":"InvalidParameter","message":"The following list of images referenced from the deployment template are not found: Publisher: microsoftvisualstudio, Offer: visualstudio2022, Sku: 20_04-lts-gen2, Version: latest. Please refer to https://docs.microsoft.com/en-us/azure/virtual-machines/windows/cli-ps-findimage for instructions on finding available images.","target":"imageReference"}] ==> Builds finished but no artifacts were created. PS E:\Packer-in-Azure-main> $env:PACKER_LOG=1 PS E:\Packer-in-Azure-main> $env:PACKER_LOG_PATH="packerlog.txt" PS E:\Packer-in-Azure-main> packer build windows.pkr.hcl azure-arm.example: output will be in this color. ==> azure-arm.example: Running builder ... azure-arm.example: Creating Azure Resource Manager (ARM) client ... ==> azure-arm.example: Getting source image id for the deployment ... ==> azure-arm.example: -> SourceImageName: '/subscriptions/93048f2d-2d0f-44cc-b12c-4df25a3c5ff5/providers/Microsoft.Compute/locations/eastus/publishers/microsoftvisualstudio/ArtifactTypes/vmimage/offers/visualstudio2022/skus/20_04-lts-gen2/versions/latest' ==> azure-arm.example: Creating resource group ... ==> azure-arm.example: -> ResourceGroupName : 'pkr-Resource-Group-x3r8di1ug1' ==> azure-arm.example: -> Location : 'eastus' ==> azure-arm.example: -> Tags : ==> azure-arm.example: Validating deployment template ... ==> azure-arm.example: -> ResourceGroupName : 'pkr-Resource-Group-x3r8di1ug1' ==> azure-arm.example: -> DeploymentName : 'kvpkrdpx3r8di1ug1' ==> azure-arm.example: Deploying deployment template ... ==> azure-arm.example: -> ResourceGroupName : 'pkr-Resource-Group-x3r8di1ug1' ==> azure-arm.example: -> DeploymentName : 'kvpkrdpx3r8di1ug1' ==> azure-arm.example: Getting the certificate's URL ... ==> azure-arm.example: -> Key Vault Name : 'pkrkvx3r8di1ug1' ==> azure-arm.example: -> Key Vault Secret Name : 'packerKeyVaultSecret' ==> azure-arm.example: -> Certificate URL : 'https://pkrkvx3r8di1ug1.vault.azure.net/secrets/packerKeyVaultSecret/2f94073920f947549b94ca0933c57ffd' ==> azure-arm.example: Setting the certificate's URL ... ==> azure-arm.example: Validating deployment template ... ==> azure-arm.example: -> ResourceGroupName : 'pkr-Resource-Group-x3r8di1ug1' ==> azure-arm.example: -> DeploymentName : 'pkrdpx3r8di1ug1' ==> azure-arm.example: ERROR: -> InvalidTemplateDeployment : The template deployment 'pkrdpx3r8di1ug1' is not valid according to the validation procedure. The tracking id is '277ad254-f63b-42c0-bfc5-731e433f6e8d'. See inner errors for details. ==> azure-arm.example: ERROR: -> InvalidParameter : The following list of images referenced from the deployment template are not found: Publisher: microsoftvisualstudio, Offer: visualstudio2022, Sku: 20_04-lts-gen2, Version: latest. Please refer to https://docs.microsoft.com/en-us/azure/virtual-machines/windows/cli-ps-findimage for instructions on finding available images. ==> azure-arm.example: ==> azure-arm.example: deployments.DeploymentsClient#Validate: Failure sending request: StatusCode=0 -- Original Error: Code="InvalidTemplateDeployment" Message="The template deployment 'pkrdpx3r8di1ug1' is not valid according to the validation procedure. The tracking id is '277ad254-f63b-42c0-bfc5-731e433f6e8d'. See inner errors for details." Details=[{"code":"InvalidParameter","message":"The following list of images referenced from the deployment template are not found: Publisher: microsoftvisualstudio, Offer: visualstudio2022, Sku: 20_04-lts-gen2, Version: latest. Please refer to https://docs.microsoft.com/en-us/azure/virtual-machines/windows/cli-ps-findimage for instructions on finding available images.","target":"imageReference"}] ==> azure-arm.example: ==> azure-arm.example: Deleting KeyVault created during build ==> azure-arm.example: Adding to deletion queue -> Microsoft.KeyVault/vaults/secrets : 'pkrkvx3r8di1ug1/packerKeyVaultSecret' ==> azure-arm.example: Adding to deletion queue -> Microsoft.KeyVault/vaults : 'pkrkvx3r8di1ug1' ==> azure-arm.example: Waiting for deletion of all resources... ==> azure-arm.example: Attempting deletion -> Microsoft.KeyVault/vaults : 'pkrkvx3r8di1ug1' ==> azure-arm.example: Attempting deletion -> Microsoft.KeyVault/vaults/secrets : 'pkrkvx3r8di1ug1/packerKeyVaultSecret' ==> azure-arm.example: Removing the created Deployment object: 'kvpkrdpx3r8di1ug1' ==> azure-arm.example: ==> azure-arm.example: Cleanup requested, deleting resource group ... ==> azure-arm.example: Resource group has been deleted. Build 'azure-arm.example' errored after 2 minutes 35 seconds: deployments.DeploymentsClient#Validate: Failure sending request: StatusCode=0 -- Original Error: Code="InvalidTemplateDeployment" Message="The template deployment 'pkrdpx3r8di1ug1' is not valid according to the validation procedure. The tracking id is '277ad254-f63b-42c0-bfc5-731e433f6e8d'. See inner errors for details." Details=[{"code":"InvalidParameter","message":"The following list of images referenced from the deployment template are not found: Publisher: microsoftvisualstudio, Offer: visualstudio2022, Sku: 20_04-lts-gen2, Version: latest. Please refer to https://docs.microsoft.com/en-us/azure/virtual-machines/windows/cli-ps-findimage for instructions on finding available images.","target":"imageReference"}] ==> Wait completed after 2 minutes 35 seconds ==> Some builds didn't complete successfully and had errors: --> azure-arm.example: deployments.DeploymentsClient#Validate: Failure sending request: StatusCode=0 -- Original Error: Code="InvalidTemplateDeployment" Message="The template deployment 'pkrdpx3r8di1ug1' is not valid according to the validation procedure. The tracking id is '277ad254-f63b-42c0-bfc5-731e433f6e8d'. See inner errors for details." Details=[{"code":"InvalidParameter","message":"The following list of images referenced from the deployment template are not found: Publisher: microsoftvisualstudio, Offer: visualstudio2022, Sku: 20_04-lts-gen2, Version: latest. Please refer to https://docs.microsoft.com/en-us/azure/virtual-machines/windows/cli-ps-findimage for instructions on finding available images.","target":"imageReference"}] ==> Builds finished but no artifacts were created.