Skip to content

Commit d3ec77f

Browse files
add and update virtual machine size parameter and update documentation for VM sizing
1 parent 47f28ee commit d3ec77f

7 files changed

Lines changed: 39 additions & 25 deletions

File tree

docs/CustomizingAzdParameters.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ By default this template will use the environment name as the prefix to prevent
2929
| `AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID` | string | Guide to get your [Existing Workspace ID](/docs/re-use-log-analytics.md) | Set this if you want to reuse an existing Log Analytics Workspace instead of creating a new one. |
3030
| `AZURE_ENV_VM_ADMIN_USERNAME` | string | `take(newGuid(), 20)` | The administrator username for the virtual machine. |
3131
| `AZURE_ENV_VM_ADMIN_PASSWORD` | string | `newGuid()` | The administrator password for the virtual machine. |
32+
| `AZURE_ENV_VM_SIZE` | string | `Standard_D2s_v5` | The size of the virtual machine deployed with private networking. |
3233
| `AZURE_ENV_CONTAINER_REGISTRY_ENDPOINT` | string | `<Container Registry Endpoint>` | Sets container registry used by backend, frontend and Mcp containers. |
3334
---
3435

docs/TroubleShootingSteps.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Use these as quick reference guides to unblock your deployments.
6161
| **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**.<br><br>**Example error message:**<br>`ServiceQuotaExceeded: Operation would exceed 'free' tier service quota. You are using 1 out of 1 'free' tier service quota.`<br><br>**Common causes:**<br><ul><li>Already have a free tier Azure AI Search service in the subscription</li><li>Previous deployment created a free tier Search service that wasn't deleted</li><li>Attempting to deploy multiple environments with free tier Search services</li></ul><br>**Resolution:**<br><ul><li>**Option 1: Delete existing free tier Search service:**<br>`az search service list --query "[?sku.name=='free']" -o table`<br>`az search service delete --name <service-name> --resource-group <rg-name> --yes`</li><li>**Option 2: Upgrade to a paid SKU:**<br>Modify your Bicep/ARM template to use `basic`, `standard`, or higher SKU instead of `free`</li><li>**Option 3: Use existing Search service:**<br>Reference the existing free tier Search service in your deployment instead of creating a new one</li><li>**Request quota increase:**<br>Submit a support request with issue type 'Service and subscription limits (quota)' and quota type 'Search' via [Azure Quota Request](https://aka.ms/AddQuotaSubscription)</li></ul><br>**Reference:**<br><ul><li>[Azure AI Search service limits](https://learn.microsoft.com/en-us/azure/search/search-limits-quotas-capacity)</li><li>[Azure AI Search pricing tiers](https://learn.microsoft.com/en-us/azure/search/search-sku-tier)</li></ul> |
6262
| **InsufficientQuota** | Not enough quota available in subscription | <ul><li>Check if you have sufficient quota available in your subscription before deployment</li><li>To verify, refer to the [quota_check](../docs/quota_check.md) file for details</li></ul> |
6363
| **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.<br><br>**Common Causes:**<br><ul><li>Deploying to regions with low quota limits (e.g., Sweden Central allows only 1 environment)</li><li>Multiple deployments without cleaning up previous environments</li><li>Exceeding the standard limit of 15 environments in most major regions</li></ul><br>**Resolution:**<br><ul><li>**Delete unused environments** in the target region, OR</li><li>**Deploy to a different region** with available capacity, OR</li><li>**Request quota increase** via [Azure Support](https://go.microsoft.com/fwlink/?linkid=2208872)</li></ul><br>**Reference:**<br><ul><li>[Azure Container Apps quotas](https://learn.microsoft.com/en-us/azure/container-apps/quotas)</li><li>[Azure subscription and service limits](https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/azure-subscription-service-limits)</li></ul> |
64-
| **SkuNotAvailable** | Requested SKU not available in selected location or zone | You receive this error in the following scenarios:<br><ul><li>When the resource SKU you've selected, such as VM size, isn't available for a location or zone</li><li>If you're deploying an Azure Spot VM or Spot scale set instance, and there isn't any capacity for Azure Spot in this location. For more information, see Spot error messages</li></ul> |
64+
| **SkuNotAvailable** | Requested SKU not available in selected location or zone | This error occurs when the resource SKU you've selected isn't available in the target location or availability zone.<br><br>**For this deployment:**<br>This solution uses **`Standard_D2s_v5`** VM size for the jumpbox when `enablePrivateNetworking=true`. This VM size is widely available, but occasional capacity constraints may occur.<br><br>**Common causes:**<br><ul><li>VM size not available in selected region or availability zone</li><li>Temporary capacity constraints in the region</li><li>Deploying Azure Spot VMs with insufficient spot capacity</li></ul><br>**Resolution:**<br><ul><li>**Check VM size availability in your region:**<br>`az vm list-skus --location <region> --size Standard_D2s_v5 --output table`</li><li>**Try alternative VM sizes** (modify `virtualMachineSize` in `main.bicep`):<br>- `Standard_D2s_v5` (current - 2 vCPU, 8 GiB RAM, Premium SSD)<br>- `Standard_D2s_v4` (previous gen - 2 vCPU, 8 GiB RAM, Premium SSD)<br>- `Standard_DS2_v2` (older but most widely available - 2 vCPU, 7 GiB RAM)<br>- `Standard_D4s_v5` (if more capacity needed - 4 vCPU, 16 GiB RAM)</li><li>**Deploy to a different region** with better availability</li><li>**Remove availability zone constraint** if acceptable (modify `virtualMachineAvailabilityZone` in `main.bicep`)</li><li>**For Spot VMs:** Check spot pricing/availability: `az vm list-skus --location <region> --all --output table`</li></ul><br>**Reference:**<br><ul><li>[Azure VM sizes documentation](https://learn.microsoft.com/en-us/azure/virtual-machines/sizes)</li></ul> |
6565
| **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.<br><br>**Common Causes:**<br><ul><li>High demand in the selected region (e.g., East US, West Europe)</li><li>Specific SKUs experiencing capacity constraints (Free, Shared, or certain Premium tiers)</li><li>Multiple rapid deployments in the same region</li></ul><br>**Resolution:**<br><ul><li>**Wait and Retry** (15-30 minutes): `azd up`</li><li>**Deploy to a New Resource Group** (Recommended for urgent cases):<br>```<br>azd down --force --purge<br>azd up<br>```</li><li>**Try a Different Region:**<br>Update region in `main.bicep` or `azure.yaml` to a less congested region (e.g., `westus2`, `centralus`, `northeurope`)</li><li>**Use a Different SKU/Tier:**<br>If using Free/Shared tier, upgrade to Basic or Standard<br>Check SKU availability: `az appservice list-locations --sku <sku-name>`</li></ul><br>**Reference:** [Azure App Service Plans](https://learn.microsoft.com/en-us/azure/app-service/overview-hosting-plans) |
6666

6767
--------------------------------
@@ -121,7 +121,7 @@ Use these as quick reference guides to unblock your deployments.
121121
|-----------------|-------------|------------------|
122122
| **NetcfgSubnetRangeOutsideVnet** | Subnet IP range outside virtual network address space | <ul><li>Ensure the subnet's IP address range falls within the virtual network's address space</li><li>Always validate that the subnet CIDR block is a subset of the VNet range</li><li>For Azure Bastion, the AzureBastionSubnet must be at least /27</li><li>Confirm that the AzureBastionSubnet is deployed inside the VNet</li></ul> |
123123
| **DisableExport_PublicNetworkAccessMustBeDisabled** | Public network access must be disabled when export is disabled | <ul><li>**Check container source:** Confirm whether the deployment is using a Docker image or Azure Container Registry (ACR)</li><li>**Verify ACR configuration:** If ACR is included, review its settings to ensure they comply with Azure requirements</li><li>**Check export settings:** If export is disabled in ACR, make sure public network access is also disabled</li><li>**Redeploy after fix:** Correct the configuration and redeploy. This will prevent the Conflict error during deployment</li><li>For more information refer [ACR Data Loss Prevention](https://learn.microsoft.com/en-us/azure/container-registry/data-loss-prevention) document</li></ul> |
124-
| **VMSizeIsNotPermittedToEnableAcceleratedNetworking** | VM size does not support accelerated networking | This error occurs when you attempt to enable accelerated networking on a VM size that does not support it.<br><br>**How to reproduce:**<br><ul><li>Create or deploy a VM (e.g., via ARM/Bicep) with size `Standard_A2m_v2`</li><li>In the network interface configuration, set `"enableAcceleratedNetworking": true`</li><li>Submit the request → Azure throws `VMSizeIsNotPermittedToEnableAcceleratedNetworking`</li></ul><br>**Resolution:**<br><ul><li>Use a supported VM size that supports accelerated networking</li><li>Check the [Microsoft list of supported VM sizes for accelerated networking](https://learn.microsoft.com/en-us/azure/virtual-network/accelerated-networking-overview#supported-vm-instances)</li><li>Alternatively, disable accelerated networking if the feature is not required for your workload</li></ul> |
124+
| **VMSizeIsNotPermittedToEnableAcceleratedNetworking** | VM size does not support accelerated networking | This error occurs when you attempt to enable accelerated networking on a VM size that does not support it.<br><br>**Note:** This solution uses `Standard_D2s_v5` which **fully supports accelerated networking**, so this error should not occur with the default configuration.<br><br>**How to reproduce:**<br><ul><li>Create or deploy a VM (e.g., via ARM/Bicep) with an unsupported size like `Standard_A2m_v2` or `Standard_B2ms`</li><li>In the network interface configuration, set `"enableAcceleratedNetworking": true`</li><li>Submit the request → Azure throws `VMSizeIsNotPermittedToEnableAcceleratedNetworking`</li></ul><br>**Resolution:**<br><ul><li>Use a supported VM size that supports accelerated networking (e.g., `Standard_D2s_v5`, `Standard_D2s_v4`, `Standard_DS2_v2`)</li><li>Check the [Microsoft list of supported VM sizes for accelerated networking](https://learn.microsoft.com/en-us/azure/virtual-network/accelerated-networking-overview#supported-vm-instances)</li><li>Alternatively, disable accelerated networking in the NIC configuration if the feature is not required</li></ul> |
125125
**NetworkSecurityGroupNotCompliantForAzureBastionSubnet** / **SecurityRuleParameterContainsUnsupportedValue** | NSG rules blocking required Azure Bastion ports | This error occurs when the Network Security Group (NSG) attached to `AzureBastionSubnet` explicitly denies inbound TCP ports 443 and/or 4443, which Azure Bastion requires for management and tunneling.<br><br>**How to reproduce:**<br><ul><li>Deploy the template with `enablePrivateNetworking=true` so the virtualNetwork module creates `AzureBastionSubnet` and a Network Security Group that denies ports 443 and 4443</li><li>Attempt to deploy Azure Bastion into that subnet</li><li>During validation, Bastion detects the deny rules and fails with `NetworkSecurityGroupNotCompliantForAzureBastionSubnet`</li></ul><br>**Resolution:**<br><ul> <li>Allow inbound TCP 443 and 4443 on `AzureBastionSubnet` by updating or removing the NSG deny rules</li><li>Alternatively, deploy Bastion to a subnet without restrictive NSG rules</li><li>For more details, refer to [Azure Bastion NSG requirements](https://learn.microsoft.com/en-us/azure/bastion/bastion-nsg)</li></ul> |
126126
| **RouteTableCannotBeAttachedForAzureBastionSubnet** | Route table attached to Azure Bastion subnet | This error occurs because Azure Bastion subnet (`AzureBastionSubnet`) has a platform restriction that prevents route tables from being attached.<br><br>**How to reproduce:**<br><ul><li>In `virtualNetwork.bicep`, add `attachRouteTable: true` to the `AzureBastionSubnet` configuration:<br>`{ name: 'AzureBastionSubnet', addressPrefixes: ['10.0.10.0/26'], attachRouteTable: true }`</li><li>Add a Route Table module to the template</li><li>Update subnet creation to attach route table conditionally:<br>`routeTableResourceId: subnet.?attachRouteTable == true ? routeTable.outputs.resourceId : null`</li><li>Deploy the template → Azure throws `RouteTableCannotBeAttachedForAzureBastionSubnet`</li></ul><br>**Resolution:**<br><ul><li>Remove the `attachRouteTable: true` flag from `AzureBastionSubnet` configuration</li><li>Ensure no route table is associated with `AzureBastionSubnet`</li><li>Route tables can only be attached to other subnets, not `AzureBastionSubnet`</li><li>For more details, refer to [Azure Bastion subnet requirements](https://learn.microsoft.com/en-us/azure/bastion/configuration-settings#subnet)</li></ul> |
127127

infra/main.bicep

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,9 @@ param virtualMachineAdminUsername string?
132132
@secure()
133133
param virtualMachineAdminPassword string?
134134

135+
@description('Optional. The size of the virtual machine. Defaults to Standard_D2s_v5.')
136+
param virtualMachineSize string = 'Standard_D2s_v5'
137+
135138
// These parameters are changed for testing - please reset as part of publication
136139

137140
@description('Optional. The Container Registry hostname where the docker images for the backend are located.')
@@ -604,7 +607,6 @@ module proximityPlacementGroup 'br/public:avm/res/compute/proximity-placement-gr
604607

605608
var virtualMachineResourceName = 'vm-${solutionSuffix}'
606609
var virtualMachineAvailabilityZone = 1
607-
var virtualMachineSize = 'Standard_D2s_v4'
608610
module virtualMachine 'br/public:avm/res/compute/virtual-machine:0.17.0' = if (enablePrivateNetworking) {
609611
name: take('avm.res.compute.virtual-machine.${virtualMachineResourceName}', 64)
610612
params: {

infra/main.json

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"metadata": {
66
"_generator": {
77
"name": "bicep",
8-
"version": "0.40.2.10011",
9-
"templateHash": "17476534152468179054"
8+
"version": "0.41.2.15936",
9+
"templateHash": "576514245908514889"
1010
},
1111
"name": "Multi-Agent Custom Automation Engine",
1212
"description": "This module contains the resources required to deploy the [Multi-Agent Custom Automation Engine solution accelerator](https://github.com/microsoft/Multi-Agent-Custom-Automation-Engine-Solution-Accelerator) for both Sandbox environments and WAF aligned environments.\n\n> **Note:** This module is not intended for broad, generic use, as it was designed by the Commercial Solution Areas CTO team, as a Microsoft Solution Accelerator. Feature requests and bug fix requests are welcome if they support the needs of this organization but may not be incorporated if they aim to make this module more generic than what it needs to be for its primary use case. This module will likely be updated to leverage AVM resource modules in the future. This may result in breaking changes in upcoming versions when these features are implemented.\n"
@@ -240,6 +240,13 @@
240240
"description": "Optional. The password for the administrator account of the virtual machine. Allows to customize credentials if `enablePrivateNetworking` is set to true."
241241
}
242242
},
243+
"virtualMachineSize": {
244+
"type": "string",
245+
"defaultValue": "Standard_D2s_v5",
246+
"metadata": {
247+
"description": "Optional. The size of the virtual machine. Defaults to Standard_D2s_v5."
248+
}
249+
},
243250
"backendContainerRegistryHostname": {
244251
"type": "string",
245252
"defaultValue": "biabcontainerreg.azurecr.io",
@@ -415,7 +422,6 @@
415422
"proximityPlacementGroupResourceName": "[format('ppg-{0}', variables('solutionSuffix'))]",
416423
"virtualMachineResourceName": "[format('vm-{0}', variables('solutionSuffix'))]",
417424
"virtualMachineAvailabilityZone": 1,
418-
"virtualMachineSize": "Standard_D2s_v4",
419425
"keyVaultPrivateDNSZone": "[format('privatelink.{0}', if(equals(toLower(environment().name), 'azureusgovernment'), 'vaultcore.usgovcloudapi.net', 'vaultcore.azure.net'))]",
420426
"privateDnsZones": [
421427
"privatelink.cognitiveservices.azure.com",
@@ -4921,8 +4927,8 @@
49214927
"metadata": {
49224928
"_generator": {
49234929
"name": "bicep",
4924-
"version": "0.40.2.10011",
4925-
"templateHash": "16969845928384020185"
4930+
"version": "0.41.2.15936",
4931+
"templateHash": "8667922205584012198"
49264932
}
49274933
},
49284934
"definitions": {
@@ -10446,7 +10452,7 @@
1044610452
"intent": {
1044710453
"value": {
1044810454
"vmSizes": [
10449-
"[variables('virtualMachineSize')]"
10455+
"[parameters('virtualMachineSize')]"
1045010456
]
1045110457
}
1045210458
}
@@ -10804,7 +10810,7 @@
1080410810
"value": "Windows"
1080510811
},
1080610812
"vmSize": {
10807-
"value": "[variables('virtualMachineSize')]"
10813+
"value": "[parameters('virtualMachineSize')]"
1080810814
},
1080910815
"adminUsername": {
1081010816
"value": "[coalesce(parameters('virtualMachineAdminUsername'), 'JumpboxAdminUser')]"
@@ -22453,8 +22459,8 @@
2245322459
"metadata": {
2245422460
"_generator": {
2245522461
"name": "bicep",
22456-
"version": "0.40.2.10011",
22457-
"templateHash": "8742987061721021759"
22462+
"version": "0.41.2.15936",
22463+
"templateHash": "8365054813170845685"
2245822464
}
2245922465
},
2246022466
"definitions": {
@@ -25440,9 +25446,9 @@
2544025446
}
2544125447
},
2544225448
"dependsOn": [
25443-
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').openAI)]",
25444-
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').aiServices)]",
2544525449
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').cognitiveServices)]",
25450+
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').aiServices)]",
25451+
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').openAI)]",
2544625452
"logAnalyticsWorkspace",
2544725453
"userAssignedIdentity",
2544825454
"virtualNetwork"
@@ -25481,8 +25487,8 @@
2548125487
"metadata": {
2548225488
"_generator": {
2548325489
"name": "bicep",
25484-
"version": "0.40.2.10011",
25485-
"templateHash": "7507285802464480889"
25490+
"version": "0.41.2.15936",
25491+
"templateHash": "5789718034225488560"
2548625492
}
2548725493
},
2548825494
"parameters": {
@@ -34461,8 +34467,8 @@
3446134467
"metadata": {
3446234468
"_generator": {
3446334469
"name": "bicep",
34464-
"version": "0.40.2.10011",
34465-
"templateHash": "8640881069237947782"
34470+
"version": "0.41.2.15936",
34471+
"templateHash": "14525082674956141939"
3446634472
}
3446734473
},
3446834474
"definitions": {
@@ -35474,8 +35480,8 @@
3547435480
"metadata": {
3547535481
"_generator": {
3547635482
"name": "bicep",
35477-
"version": "0.40.2.10011",
35478-
"templateHash": "10706743168754451638"
35483+
"version": "0.41.2.15936",
35484+
"templateHash": "1185169597469996118"
3547935485
},
3548035486
"name": "Site App Settings",
3548135487
"description": "This module deploys a Site App Setting."
@@ -44644,8 +44650,8 @@
4464444650
"metadata": {
4464544651
"_generator": {
4464644652
"name": "bicep",
44647-
"version": "0.40.2.10011",
44648-
"templateHash": "15348022841521786626"
44653+
"version": "0.41.2.15936",
44654+
"templateHash": "8488390916703184584"
4464944655
}
4465044656
},
4465144657
"parameters": {

infra/main.waf.parameters.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@
7474
"virtualMachineAdminPassword": {
7575
"value": "${AZURE_ENV_VM_ADMIN_PASSWORD}"
7676
},
77+
"virtualMachineSize": {
78+
"value": "${AZURE_ENV_VM_SIZE}"
79+
},
7780
"existingLogAnalyticsWorkspaceId": {
7881
"value": "${AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID}"
7982
},

0 commit comments

Comments
 (0)