スタンバイ プールを更新または削除する (プレビュー)
- [アーティクル]
-
-
重要
Virtual Machine Scale Sets 用のスタンバイ プールは、現在プレビュー段階です。 プレビュー版は、追加使用条件に同意することを条件に使用できます。 この機能の一部の側面は、一般公開 (GA) 前に変更される可能性があります。
スタンバイ プールを更新する
インスタンスの状態とスタンバイ プールの最大準備容量はいつでも更新できます。 スタンバイ プール名は、スタンバイ プールの作成時にのみ設定できます。
- スタンバイ プールが関連付けられている仮想マシン スケール セットに移動します。
- [可用性とスケール] で、[スタンバイ プール] を選択します。
- [プールの管理] を選択します。
- 構成を更新し、変更を保存します。
az standby-vm-pool update を使用して既存のスタンバイ プールを更新します。
az standby-vm-pool update \
--resource-group myResourceGroup
--name myStandbyPool \
--max-ready-capacity 20 \
--vm-state "Deallocated" \
Update-AzStandbyVMPool を使用して既存のスタンバイ プールを更新します。
Update-AzStandbyVMPool `
-ResourceGroup myResourceGroup
-Name myStandbyPool `
-MaxReadyCapacity 20 `
-VMState "Deallocated" `
既存のスタンバイ プールのデプロイを更新します。 az deployment group create または 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
},
"virtualMachineState" : {
"type": "string",
"defaultValue": "Deallocated"
},
"attachedVirtualMachineScaleSetId" : {
"type": "string",
"defaultValue": "/subscriptions/{subscriptionID}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/myScaleSet"
}
},
"resources": [
{
"type": "Microsoft.StandbyPool/standbyVirtualMachinePools",
"apiVersion": "2023-12-01-preview",
"name": "[parameters('name')]",
"location": "[parameters('location')]",
"properties": {
"elasticityProfile": {
"maxReadyCapacity": "[parameters('maxReadyCapacity')]"
},
"virtualMachineState": "[parameters('virtualMachineState')]",
"attachedVirtualMachineScaleSetId": "[parameters('attachedVirtualMachineScaleSetId')]"
}
}
]
}
既存のスタンバイ プールのデプロイを更新します。 az deployment group create または New-AzResourceGroupDeployment を使用して、更新したテンプレートをデプロイします。
param location string = resourceGroup().location
param standbyPoolName string = 'myStandbyPool'
param maxReadyCapacity int = 10
@allowed([
'Running'
'Deallocated'
])
param vmState string = 'Deallocated'
param virtualMachineScaleSetId string = '/subscriptions/{subscriptionID}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/myScaleSet'
resource standbyPool 'Microsoft.standbypool/standbyvirtualmachinepools@2023-12-01-preview' = {
name: standbyPoolName
location: location
properties: {
elasticityProfile: {
maxReadyCapacity: maxReadyCapacity
}
virtualMachineState: vmState
attachedVirtualMachineScaleSetId: virtualMachineScaleSetId
}
}
Create または Update を使用して、既存のスタンバイ プールを更新します。
PUT https://management.azure.com/subscriptions/{subscriptionID}/resourceGroups/myResourceGroup/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/myStandbyPool?api-version=2023-12-01-preview
{
"type": "Microsoft.StandbyPool/standbyVirtualMachinePools",
"name": "myStandbyPool",
"location": "east us",
"properties": {
"elasticityProfile": {
"maxReadyCapacity": 20
},
"virtualMachineState":"Deallocated",
"attachedVirtualMachineScaleSetId": "/subscriptions/{subscriptionID}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/myScaleSet"
}
}
スタンバイ プールを削除する
- スタンバイ プールが関連付けられている仮想マシン スケール セットに移動します。
- [可用性とスケール] で、[スタンバイ プール] を選択します。
- [プールの削除] を選択します。
- [削除] を選択します。
az standbypool delete を使用して既存のスタンバイ プールを削除します。
az standby-vm-pool delete \
--resource-group myResourceGroup \
--name myStandbyPool
Remove-AzStandbyVMPool を使用して既存のスタンバイ プールを削除します。
Remove-AzStandbyVMPool `
-ResourceGroup myResourceGroup `
-Name myStandbyPool `
-Nowait
Delete を使用して既存のスタンバイ プールを削除します。
DELETE https://management.azure.com/subscriptions/{subscriptionID}/resourceGroups/myResourceGroup/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/myStandbyPool?api-version=2023-12-01-preview
次のステップ
Virtual Machine Scale Sets 用のスタンバイ プールについてよく寄せられる質問を確認します。