Important
For standby pools to successfully create and manage resources, it requires access to the associated resources in your subscription. Ensure the correct permissions are assigned to the standby pool resource provider in order for your standby pool to function properly. For detailed instructions, see configure role permissions for standby pools.
This article steps through creating a standby pool for Virtual Machine Scale Sets with Flexible Orchestration.
Note
Setting the standby pool VM state to hibernated is not yet available in the Azure portal. To configure a standby pool with a hibernated VM state use an alternative SDK such as CLI or PowerShell.
- Navigate to your Virtual Machine Scale Set.
- Under Availability + scale select Standby pool.
- Select Manage pool.
- Provide a name for your pool, select a provisioning state and set the maximum and minimum ready capacity.
- Select Save.
You can also configure a standby pool during Virtual Machine Scale Set creation by navigating to the Management tab and checking the box to enable standby pools.
Create a standby pool and associate it with an existing scale set using az standby-vm-pool create.
az standby-vm-pool create \
--resource-group myResourceGroup \
--___location eastus --name myStandbyPool \
--max-ready-capacity 20 \
--min-ready-capacity 5 \
--vm-state "Deallocated" \
--vmss-id "/subscriptions/{subscriptionID}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/myScaleSet"
Create a standby pool and associate it with an existing scale set using New-AzStandbyVMPool.
New-AzStandbyVMPool `
-ResourceGroup myResourceGroup `
-Location eastus `
-Name myStandbyPool `
-MaxReadyCapacity 20 `
-MinReadyCapacity 5 `
-VMState "Deallocated" `
-VMSSId "/subscriptions/{subscriptionID}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/myScaleSet"
Create a standby pool and associate it with an existing scale set. Create a template and deploy it using az deployment group create or New-AzResourceGroupDeployment.
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"___location": {
"type": "string",
"defaultValue": "east us"
},
"name": {
"type": "string",
"defaultValue": "myStandbyPool"
},
"maxReadyCapacity" : {
"type": "int",
"defaultValue": 20
},
"minReadyCapacity" : {
"type": "int",
"defaultValue": 5
},
"virtualMachineState" : {
"type": "string",
"defaultValue": "Deallocated"
},
"attachedVirtualMachineScaleSetId" : {
"type": "string",
"defaultValue": "/subscriptions/{subscriptionID}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/myScaleSet"
}
},
"resources": [
{
"type": "Microsoft.StandbyPool/standbyVirtualMachinePools",
"apiVersion": "2025-03-01",
"name": "[parameters('name')]",
"___location": "[parameters('___location')]",
"properties": {
"elasticityProfile": {
"maxReadyCapacity": "[parameters('maxReadyCapacity')]",
"minReadyCapacity": "[parameters('minReadyCapacity')]"
},
"virtualMachineState": "[parameters('virtualMachineState')]",
"attachedVirtualMachineScaleSetId": "[parameters('attachedVirtualMachineScaleSetId')]"
}
}
]
}
Create a standby pool and associate it with an existing scale set. Deploy the template using az deployment group create or New-AzResourceGroupDeployment.
param ___location string = resourceGroup().___location
param standbyPoolName string = 'myStandbyPool'
param maxReadyCapacity int = 20
param minReadyCapacity int = 5
@allowed([
'Running'
'Deallocated'
])
param vmState string = 'Deallocated'
param virtualMachineScaleSetId string = '/subscriptions/{subscriptionID}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/myScaleSet'
resource standbyPool 'Microsoft.standbypool/standbyvirtualmachinepools@2025-03-01' = {
name: standbyPoolName
___location: ___location
properties: {
elasticityProfile: {
maxReadyCapacity: maxReadyCapacity
minReadyCapacity: minReadyCapacity
}
virtualMachineState: vmState
attachedVirtualMachineScaleSetId: virtualMachineScaleSetId
}
}
Create a standby pool and associate it with an existing scale set using Create or Update.
PUT https://management.azure.com/subscriptions/{subscriptionID}/resourceGroups/myResourceGroup/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/myStandbyPool?api-version=2025-03-01
{
"type": "Microsoft.StandbyPool/standbyVirtualMachinePools",
"name": "myStandbyPool",
"___location": "east us",
"properties": {
"elasticityProfile": {
"maxReadyCapacity": 20
"minReadyCapacity": 5
},
"virtualMachineState":"Deallocated",
"attachedVirtualMachineScaleSetId": "/subscriptions/{subscriptionID}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/myScaleSet"
}
}