Build ‘azure-arm.example’ errored after 1 minute 32 seconds: deployments.DeploymentsClient#Validate: Failure sending request: StatusCode=0 – Original Error: Code=“InvalidTemplateDeployment” Message=“The template deployment ‘pkrdppxawpl41kr’ is not valid according to the validation procedure. The tracking id is ‘7f643a12-5315-4dcb-8610-4f1f5dc54d70’. See inner errors for details.” Details=[{“code”:“QuotaExceeded”,“message”:“Operation could not be completed as it results in exceeding approved standardDSv5Family Cores quota. Additional details - Deployment Model: Resource Manager, Location: eastus2, Current Limit: 0, Current Usage: 0, Additional Required: 4, (Minimum) New Limit Required: 4. Submit a request for Quota increase at Microsoft Azure by specifying parameters listed in the ‘Details’ section for deployment to succeed. Please read more about quota limits at Increase VM-family vCPU quotas - Azure Quotas | Microsoft Learn”}]
==> Wait completed after 1 minute 32 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 ‘pkrdppxawpl41kr’ is not valid according to the validation procedure. The tracking id is ‘7f643a12-5315-4dcb-8610-4f1f5dc54d70’. See inner errors for details.” Details=[{“code”:“QuotaExceeded”,“message”:“Operation could not be completed as it results in exceeding approved standardDSv5Family Cores quota. Additional details - Deployment Model: Resource Manager, Location: eastus2, Current Limit: 0, Current Usage: 0, Additional Required: 4, (Minimum) New Limit Required: 4. Submit a request for Quota increase at Microsoft Azure by specifying parameters listed in the ‘Details’ section for deployment to succeed. Please read more about quota limits at Increase VM-family vCPU quotas - Azure Quotas | Microsoft Learn”}]
packer {
required_plugins {
azure = {
version = ">= 1.0.0"
source = "github.com/hashicorp/azure"
}
}
}
source "azure-arm" "example" {
build_resource_group_name = "cg"
use_azure_cli_auth = true
shared_image_gallery {
subscription = "93048f2d-2d0f-44cc-b12c-4df25a3c5ff5"
resource_group = "cg"
gallery_name = "gallery1"
image_name = "webserver"
image_version = "1.0.0"
}
shared_image_gallery_destination {
subscription = "93048f2d-2d0f-44cc-b12c-4df25a3c5ff5"
resource_group = "cg"
gallery_name = "gallery1"
image_name = "webserver"
image_version = "1.0.1"
replication_regions = ["eastus"]
storage_account_type = "Standard_LRS"
}
managed_image_name = "myPackerImage1"
managed_image_resource_group_name = "cg"
os_type = "Windows"
subscription_id = "93048f2d-2d0f-44cc-b12c-4df25a3c5ff5"
tenant_id = "8e0b6750-ef80-4f5b-98b3-fa2b9f690006"
vm_size = "Standard_D4s_v5"
winrm_insecure = true
winrm_timeout = "5m"
winrm_use_ssl = true
winrm_username = "packer"
}
build {
sources = [
"source.azure-arm.example"
]
provisioner "powershell" {
inline = [
"Remove-WindowsFeature Web-Server",
"while ((Get-Service RdAgent).Status -ne 'Running') { Start-Sleep -s 5 }",
"while ((Get-Service WindowsAzureGuestAgent).Status -ne 'Running') { Start-Sleep -s 5 }",
"& $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 } }"
]
}
}