From b8aae32c3c5bb760793f53254e24dfdb730a534a Mon Sep 17 00:00:00 2001 From: Harsh-Microsoft Date: Fri, 13 Mar 2026 15:33:53 +0530 Subject: [PATCH] Update VM size to Standard_D2s_v5 and add parameter for VM size in deployment templates --- docs/CustomizingAzdParameters.md | 1 + docs/TroubleShootingSteps.md | 2 +- infra/main.bicep | 2 +- infra/main.json | 20 ++++++++++---------- infra/main.waf.parameters.json | 3 +++ infra/main_custom.bicep | 2 +- infra/modules/virtualNetwork.bicep | 6 +++--- 7 files changed, 20 insertions(+), 16 deletions(-) diff --git a/docs/CustomizingAzdParameters.md b/docs/CustomizingAzdParameters.md index 7989a84..8f4062e 100644 --- a/docs/CustomizingAzdParameters.md +++ b/docs/CustomizingAzdParameters.md @@ -20,6 +20,7 @@ By default this template will use the environment name as the prefix to prevent | `AZURE_ENV_VM_ADMIN_USERNAME` | string | `` | The administrator username for the virtual machine. | | `AZURE_ENV_VM_ADMIN_PASSWORD` | string | `` | The administrator password for the virtual machine. | | `AZURE_ENV_IMAGETAG` | string | `latest` | Specifies the container image tag to use for deployment. | +| `AZURE_ENV_VM_SIZE` | string | `Standard_D2s_v5` | Specifies the VM size for the jumpbox virtual machine (production deployment only). | ## How to Set a Parameter diff --git a/docs/TroubleShootingSteps.md b/docs/TroubleShootingSteps.md index 5426ecf..73a417b 100644 --- a/docs/TroubleShootingSteps.md +++ b/docs/TroubleShootingSteps.md @@ -61,7 +61,7 @@ Use these as quick reference guides to unblock your deployments. | **ServiceQuotaExceeded** | Free tier service quota limit reached for Azure AI Search | This error occurs when you attempt to deploy an Azure AI Search service but have already reached the **free tier quota limit** for your subscription. Each Azure subscription is limited to **one free tier Search service**.

**Example error message:**
`ServiceQuotaExceeded: Operation would exceed 'free' tier service quota. You are using 1 out of 1 'free' tier service quota.`

**Common causes:**

**Resolution:**

**Reference:**
| | **InsufficientQuota** | Not enough quota available in subscription | | | **MaxNumberOfRegionalEnvironmentsInSubExceeded** | Maximum Container App Environments limit reached for region |This error occurs when you attempt to create more **Azure Container App Environments** than the regional quota limit allows for your subscription. Each Azure region has a specific limit on the number of Container App Environments that can be created per subscription.

**Common Causes:**

**Resolution:**

**Reference:**
| -| **SkuNotAvailable** | Requested SKU not available in selected location or zone | You receive this error in the following scenarios:
| +| **SkuNotAvailable** | Requested SKU not available in selected location or zone | This error occurs when the resource SKU you've selected (such as VM size) isn't available for the target location or availability zone.

**In this deployment**, the jumpbox VM defaults to `Standard_D2s_v5`. While this size is available in most regions, certain regions or zones may not support it.

**Resolution:**

**Reference:**
| | **Conflict - No available instances to satisfy this request** | Azure App Service has insufficient capacity in the region | This error occurs when Azure App Service doesn't have enough available compute instances in the selected region to provision or scale your app.

**Common Causes:**

**Resolution:**

**Reference:** [Azure App Service Plans](https://learn.microsoft.com/en-us/azure/app-service/overview-hosting-plans) | -------------------------------- diff --git a/infra/main.bicep b/infra/main.bicep index 8fe3fee..e322571 100644 --- a/infra/main.bicep +++ b/infra/main.bicep @@ -357,7 +357,7 @@ module jumpboxVM 'br/public:avm/res/compute/virtual-machine:0.15.0' = if (enable name: take('avm.res.compute.virtual-machine.${jumpboxVmName}', 64) params: { name: take(jumpboxVmName, 15) // Shorten VM name to 15 characters to avoid Azure limits - vmSize: vmSize ?? 'Standard_DS2_v2' + vmSize: vmSize ?? 'Standard_D2s_v5' location: location adminUsername: vmAdminUsername ?? 'JumpboxAdminUser' adminPassword: vmAdminPassword ?? 'JumpboxAdminP@ssw0rd1234!' diff --git a/infra/main.json b/infra/main.json index 659b68a..d6a3a38 100644 --- a/infra/main.json +++ b/infra/main.json @@ -5,8 +5,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.40.2.10011", - "templateHash": "46164870636097653" + "version": "0.41.2.15936", + "templateHash": "15378128850313943283" } }, "parameters": { @@ -4698,8 +4698,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.40.2.10011", - "templateHash": "13184395339364197836" + "version": "0.41.2.15936", + "templateHash": "10681183203421948888" } }, "definitions": { @@ -8840,7 +8840,7 @@ "value": "[take(variables('jumpboxVmName'), 15)]" }, "vmSize": { - "value": "[coalesce(parameters('vmSize'), 'Standard_DS2_v2')]" + "value": "[coalesce(parameters('vmSize'), 'Standard_D2s_v5')]" }, "location": { "value": "[parameters('location')]" @@ -26118,8 +26118,8 @@ }, "dependsOn": [ "appIdentity", - "[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').storageQueue)]", "[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').storageBlob)]", + "[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').storageQueue)]", "virtualNetwork" ] }, @@ -30068,8 +30068,8 @@ "metadata": { "_generator": { "name": "bicep", - "version": "0.40.2.10011", - "templateHash": "8742987061721021759" + "version": "0.41.2.15936", + "templateHash": "8365054813170845685" } }, "definitions": { @@ -52099,9 +52099,9 @@ }, "dependsOn": [ "appIdentity", - "[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').cognitiveServices)]", - "[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').aiServices)]", "[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').openAI)]", + "[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').aiServices)]", + "[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').cognitiveServices)]", "virtualNetwork" ] }, diff --git a/infra/main.waf.parameters.json b/infra/main.waf.parameters.json index c914e04..d05d3e3 100644 --- a/infra/main.waf.parameters.json +++ b/infra/main.waf.parameters.json @@ -61,6 +61,9 @@ }, "imageTag": { "value": "${AZURE_ENV_IMAGETAG}" + }, + "vmSize": { + "value": "${AZURE_ENV_VM_SIZE}" } } } diff --git a/infra/main_custom.bicep b/infra/main_custom.bicep index 8eba4f7..0a4e2cf 100644 --- a/infra/main_custom.bicep +++ b/infra/main_custom.bicep @@ -335,7 +335,7 @@ module jumpboxVM 'br/public:avm/res/compute/virtual-machine:0.15.0' = if (enable name: take('avm.res.compute.virtual-machine.${jumpboxVmName}', 64) params: { name: take(jumpboxVmName, 15) // Shorten VM name to 15 characters to avoid Azure limits - vmSize: vmSize ?? 'Standard_DS2_v2' + vmSize: vmSize ?? 'Standard_D2s_v5' location: location adminUsername: vmAdminUsername ?? 'JumpboxAdminUser' adminPassword: vmAdminPassword ?? 'JumpboxAdminP@ssw0rd1234!' diff --git a/infra/modules/virtualNetwork.bicep b/infra/modules/virtualNetwork.bicep index 84a2f25..118382b 100644 --- a/infra/modules/virtualNetwork.bicep +++ b/infra/modules/virtualNetwork.bicep @@ -213,9 +213,9 @@ param resourceSuffix string // VM Size Notes: // 1 B-series VMs (like Standard_B2ms) do not support accelerated networking. // 2 Pick a VM size that does support accelerated networking (the usual jump-box candidates): -// Standard_DS2_v2 (2 vCPU, 7 GiB RAM, Premium SSD) // The most broadly available (it’s a legacy SKU supported in virtually every region). -// Standard_D2s_v3 (2 vCPU, 8 GiB RAM, Premium SSD) // next most common -// Standard_D2s_v4 (2 vCPU, 8 GiB RAM, Premium SSD) // Newest, so fewer regions availabl +// Standard_D2s_v5 (2 vCPU, 8 GiB RAM, Premium SSD) // Current gen, widely available, cost-effective. Default. +// Standard_D2s_v4 (2 vCPU, 8 GiB RAM, Premium SSD) +// Standard_D2s_v3 (2 vCPU, 8 GiB RAM, Premium SSD) // Subnet Classless Inter-Doman Routing (CIDR) Sizing Reference Table (Best Practices) // | CIDR | # of Addresses | # of /24s | Notes |