az vm availability-set
Group resources into availability sets.
To provide redundancy to an application, it is recommended to group two or more virtual machines in an availability set. This configuration ensures that during either a planned or unplanned maintenance event, at least one virtual machine will be available.
Commands
Name | Description | Type | Status |
---|---|---|---|
az vm availability-set convert |
Convert an Azure Availability Set to contain VMs with managed disks. |
Core | GA |
az vm availability-set create |
Create an Azure Availability Set. |
Core | GA |
az vm availability-set delete |
Delete an availability set. |
Core | GA |
az vm availability-set list |
List availability sets. |
Core | GA |
az vm availability-set list-sizes |
List all available virtual machine sizes that can be used to create a new virtual machine in an existing availability set. |
Core | GA |
az vm availability-set show |
Get information about an availability set. |
Core | GA |
az vm availability-set update |
Update an Azure Availability Set. |
Core | GA |
az vm availability-set convert
Convert an Azure Availability Set to contain VMs with managed disks.
az vm availability-set convert [--ids]
[--name]
[--resource-group]
[--subscription]
Examples
Convert an availabiity set to use managed disks by name.
az vm availability-set convert -g MyResourceGroup -n MyAvSet
Convert an availability set to use managed disks by ID.
az vm availability-set convert --ids $(az vm availability-set list -g MyResourceGroup --query "[].id" -o tsv)
Optional Parameters
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Name of the availability set.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az vm availability-set create
Create an Azure Availability Set.
For more information, see https://docs.microsoft.com/azure/virtual-machines/availability.
az vm availability-set create --name
--resource-group
[--location]
[--no-wait]
[--platform-fault-domain-count]
[--platform-update-domain-count]
[--ppg]
[--tags]
[--unmanaged]
[--validate]
Examples
Create an availability set.
az vm availability-set create -n MyAvSet -g MyResourceGroup --platform-fault-domain-count 2 --platform-update-domain-count 2
Required Parameters
Name of the availability set.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Location. Values from: az account list-locations
. You can configure the default location using az configure --defaults location=<location>
.
Do not wait for the long-running operation to finish.
Fault Domain count.
Update Domain count. If unspecified, the server will pick the most optimal number like 5.
The name or ID of the proximity placement group the availability set should be associated with.
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
Contained VMs should use unmanaged disks.
Generate and validate the ARM template without creating any resources.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az vm availability-set delete
Delete an availability set.
az vm availability-set delete [--availability-set-name]
[--ids]
[--resource-group]
[--subscription]
Examples
Delete an availability set.
az vm availability-set delete -n MyAvSet -g MyResourceGroup
Optional Parameters
The name of the availability set.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az vm availability-set list
List availability sets.
az vm availability-set list [--resource-group]
Examples
List availability sets.
az vm availability-set list -g MyResourceGroup
Optional Parameters
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az vm availability-set list-sizes
List all available virtual machine sizes that can be used to create a new virtual machine in an existing availability set.
az vm availability-set list-sizes [--availability-set-name]
[--ids]
[--resource-group]
[--subscription]
Examples
List VM sizes for an availability set.
az vm availability-set list-sizes -n MyAvSet -g MyResourceGroup
Optional Parameters
The name of the availability set.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az vm availability-set show
Get information about an availability set.
az vm availability-set show [--availability-set-name]
[--ids]
[--resource-group]
[--subscription]
Examples
Get information about an availability set.
az vm availability-set show -n MyAvSet -g MyResourceGroup
Optional Parameters
The name of the availability set.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az vm availability-set update
Update an Azure Availability Set.
az vm availability-set update [--add]
[--force-string]
[--ids]
[--name]
[--ppg]
[--remove]
[--resource-group]
[--set]
[--subscription]
Examples
Update an availability set.
az vm availability-set update -n MyAvSet -g MyResourceGroup
Update an availability set tag.
az vm availability-set update -n MyAvSet -g MyResourceGroup --set tags.foo=value
Remove an availability set tag.
az vm availability-set update -n MyAvSet -g MyResourceGroup --remove tags.foo
Optional Parameters
Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>
.
When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Name of the availability set.
The name or ID of the proximity placement group the availability set should be associated with.
Remove a property or an element from a list. Example: --remove property.list <indexToRemove>
OR --remove propertyToRemove
.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.