Abrufen von Standbypool- und Instanzdetails
Ein Standbypool ist eine dynamische Ressource, die mit Ihrer Skalierungsgruppe synchronisiert bleibt, während Ihre Workload nach oben und unten skaliert wird. In diesem Artikel wird erläutert, wie Sie verschiedene Informationen zu Ihrem Standbypool und den darin enthaltenen Instanzen abrufen.
Details zum Standbypool
Verwenden Sie die Standbypool-Laufzeitansicht-APIs, um den aktuellen Status Ihres Standbypools abzurufen, wie Anzahl verfügbarer Instanzen, Bereitstellungsstatus und verwendete Zonen.
az standby-vm-pool status --resource-group myResourceGroup --name myStandbyPool
{
"id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/myStandbyPool/runtimeViews/latest",
{
"zone": 1
},
"instanceCountsByState": [
{
"count": 5,
"state": "Creating"
},
{
"count": 0,
"state": "Starting"
},
{
"count": 5,
"state": "Running"
},
{
"count": 0,
"state": "Deallocating"
},
{
"count": 10,
"state": "Deallocated"
},
{
"count": 0,
"state": "Deleting"
}
],
"zone": 2
},
{
"instanceCountsByState": [
{
"count": 0,
"state": "Creating"
},
{
"count": 10,
"state": "Starting"
},
{
"count": 0,
"state": "Running"
},
{
"count": 5,
"state": "Deallocating"
},
{
"count": 5,
"state": "Deallocated"
},
{
"count": 0,
"state": "Deleting"
}
],
"zone": 3
},
{
"instanceCountsByState": [
{
"count": 0,
"state": "Creating"
},
{
"count": 0,
"state": "Starting"
},
{
"count": 5,
"state": "Running"
},
{
"count": 10,
"state": "Deallocating"
},
{
"count": 3,
"state": "Deallocated"
},
{
"count": 5,
"state": "Deleting"
}
],
"name": "latest",
"provisioningState": "Succeeded",
"resourceGroup": "myResourceGroup",
"type": "Microsoft.StandbyPool/standbyVirtualMachinePools/runtimeViews"
}
Instanzendetails
Wenn sich ein virtueller Computer in einem Standbypool befindet, wird der Parameter isVmInStandbyPool
auf TRUE festgelegt. Wenn der virtuelle Computer aus der Poolinstanz verschoben wird, wird die Skalierungsgruppe automatisch auf FALSE aktualisiert. Dies kann bei der Bestimmung, wann ein virtueller Computer für den Empfang von Datenverkehr bereit ist, nützlich sein.
az vm get-instance-view --resource-group myResourceGroup --name myVM
"extensions": null,
"hyperVGeneration": "V2",
"isVmInStandbyPool": true,
"maintenanceRedeployStatus": null,
"statuses": [
{
"code": "ProvisioningState/succeeded",
"displayStatus": "Provisioning succeeded",
"level": "Info",
"message": null,
"time": "2024-08-02T17:22:46.295536+00:00"
},
{
"code": "PowerState/deallocated",
"displayStatus": "VM deallocated",
"level": "Info",
"message": null,
"time": null
}
],
Nächste Schritte
Sehen Sie sich die am häufigsten gestellten Fragen zu Pools für Virtual Machine Scale Sets an.