Update or delete a standby pool
Article 02/20/2025
2 contributors
Feedback
In this article
This article covers updating, managing and deleting a standby pool resource.
Prerequisites
To allow standby pools to create and manage virtual machines in your subscription, assign the appropriate permissions to the standby pool resource provider.
In the Azure portal, navigate to your subscriptions.
Select the subscription you want to adjust permissions.
Select Access Control (IAM) .
Select Add and Add role assignment .
Under the Role tab, search for Virtual Machine Contributor and select it.
Move to the Members Tab.
Select + Select members .
Search for Standby Pool Resource Provider and select it.
Move to the Review + assign tab.
Apply the changes.
Repeat the above steps and assign the Network Contributor role and the Managed Identity Operator role to the Standby Pool Resource Provider. If you're using images stored in Compute Gallery assign the Compute Gallery Sharing Admin and Compute Gallery Artifacts Publisher roles as well.
For more information on assigning roles, see assign Azure roles using the Azure portal .
Update a standby pool
You can update the state of the instances and the max ready capacity of your standby pool at any time. The standby pool name can only be set during standby pool creation.
Navigate to Virtual Machine Scale set the standby pool is associated with.
Under Availability + scale select Standby pool .
Select Manage pool .
Update the configuration and save any changes.
Update an existing standby pool using az standby-vm-pool update .
az standby-vm-pool update \
--resource-group myResourceGroup \
--name myStandbyPool \
--max-ready-capacity 20 \
--min-ready-capacity 5 \
--vm-state "Deallocated"
Update an existing standby pool using Update-AzStandbyVMPool .
Update-AzStandbyVMPool `
-ResourceGroup myResourceGroup `
-Name myStandbyPool `
-MaxReadyCapacity 20 `
-MinReadyCapacity 5 `
-VMState "Deallocated"
Update an existing standby pool deployment. Deploy the updated template 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": 10
},
"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": "2024-03-01",
"name": "[parameters('name')]",
"location": "[parameters('location')]",
"properties": {
"elasticityProfile": {
"maxReadyCapacity": "[parameters('maxReadyCapacity')]",
"minReadyCapacity": "[parameters('minReadyCapacity')]"
},
"virtualMachineState": "[parameters('virtualMachineState')]",
"attachedVirtualMachineScaleSetId": "[parameters('attachedVirtualMachineScaleSetId')]"
}
}
]
}
Update an existing standby pool deployment. Deploy the updated template using az deployment group create or New-AzResourceGroupDeployment .
param location string = resourceGroup().location
param standbyPoolName string = 'myStandbyPool'
param maxReadyCapacity int = 10
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@2024-03-01' = {
name: standbyPoolName
location: location
properties: {
elasticityProfile: {
maxReadyCapacity: maxReadyCapacity
minReadyCapacity: minReadyCapacity
}
virtualMachineState: vmState
attachedVirtualMachineScaleSetId: virtualMachineScaleSetId
}
}
Update an existing standby pool using Create or Update .
PUT https://management.azure.com/subscriptions/{subscriptionID}/resourceGroups/myResourceGroup/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/myStandbyPool?api-version=2024-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"
}
}
Delete a standby pool
Navigate to Virtual Machine Scale set the standby pool is associated with.
Under Availability + scale select Standby pool .
Select Delete pool .
Select Delete .
Delete an existing standby pool using az standbypool delete .
az standby-vm-pool delete \
--resource-group myResourceGroup \
--name myStandbyPool
Delete an existing standby pool using Remove-AzStandbyVMPool .
Remove-AzStandbyVMPool `
-ResourceGroup myResourceGroup `
-Name myStandbyPool `
-Nowait
Delete an existing standby pool using Delete .
DELETE https://management.azure.com/subscriptions/{subscriptionID}/resourceGroups/myResourceGroup/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/myStandbyPool?api-version=2024-03-01
Next steps
Review the most frequently asked questions about standby pools for Virtual Machine Scale Sets.