az vmss
Manage groupings of virtual machines in an Azure Virtual Machine Scale Set (VMSS).
Commands
Name | Description | Type | Status |
---|---|---|---|
az vmss application |
Manage applications for VM scale set. |
Core | GA |
az vmss application list |
List applications for VMSS. |
Core | GA |
az vmss application set |
Set applications for VMSS. |
Core | GA |
az vmss create |
Create an Azure Virtual Machine Scale Set. |
Core | GA |
az vmss deallocate |
Deallocate VMs within a VMSS. |
Core | GA |
az vmss delete |
Delete a VM scale set. |
Core | GA |
az vmss delete-instances |
Delete VMs within a VMSS. |
Core | GA |
az vmss diagnostics |
Configure the Azure Virtual Machine Scale Set diagnostics extension. |
Core | GA |
az vmss diagnostics get-default-config |
Show the default config file which defines data to be collected. |
Core | GA |
az vmss diagnostics set |
Enable diagnostics on a VMSS. |
Core | GA |
az vmss disk |
Manage data disks of a VMSS. |
Core | GA |
az vmss disk attach |
Attach managed data disks to a scale set or its instances. |
Core | GA |
az vmss disk detach |
Detach managed data disks from a scale set or its instances. |
Core | GA |
az vmss encryption |
Manage encryption of VMSS. |
Core | GA |
az vmss encryption disable |
Disable the encryption on a VMSS with managed disks. |
Core | GA |
az vmss encryption enable |
Encrypt a VMSS with managed disks. |
Core | GA |
az vmss encryption show |
Show encryption status. |
Core | GA |
az vmss extension |
Manage extensions on a VM scale set. |
Core | GA |
az vmss extension delete |
Delete an extension from a VMSS. |
Core | GA |
az vmss extension image |
Find the available VM extensions for a subscription and region. |
Core | GA |
az vmss extension image list |
List the information on available extensions. |
Core | GA |
az vmss extension image list-names |
List virtual machine extension image types. |
Core | GA |
az vmss extension image list-versions |
List virtual machine extension image versions. |
Core | GA |
az vmss extension image show |
Get a virtual machine extension image. |
Core | GA |
az vmss extension list |
List extensions associated with a VMSS. |
Core | GA |
az vmss extension set |
Add an extension to a VMSS or update an existing extension. |
Core | GA |
az vmss extension show |
Show details on a VMSS extension. |
Core | GA |
az vmss extension upgrade |
Upgrade all extensions for all VMSS instances to the latest version. |
Core | GA |
az vmss get-instance-view |
View an instance of a VMSS. |
Core | GA |
az vmss get-os-upgrade-history |
List the OS upgrades on a VM scale set instance. |
Core | GA |
az vmss identity |
Manage service identities of a VM scaleset. |
Core | GA |
az vmss identity assign |
Enable managed service identity on a VMSS. |
Core | GA |
az vmss identity remove |
Remove user assigned identities from a VM scaleset. |
Core | Preview |
az vmss identity show |
Display VM scaleset's managed identity info. |
Core | GA |
az vmss list |
List all VM scale sets under a resource group. |
Core | GA |
az vmss list-instance-connection-info |
Get the IP address and port number used to connect to individual VM instances within a set. |
Core | GA |
az vmss list-instance-public-ips |
List public IP addresses of VM instances within a set. |
Core | GA |
az vmss list-instances |
List all virtual machines in a VM scale sets. |
Core | GA |
az vmss list-skus |
List SKUs available for your VM scale set, including the minimum and maximum VM instances allowed for each SKU. |
Core | GA |
az vmss nic |
Manage network interfaces of a VMSS. |
Core | GA |
az vmss nic list |
Get all network interfaces in a virtual machine scale set. |
Core | GA |
az vmss nic list-vm-nics |
Get information about all network interfaces in a virtual machine in a virtual machine scale set. |
Core | GA |
az vmss nic show |
Get the specified network interface in a virtual machine scale set. |
Core | GA |
az vmss perform-maintenance |
Perform maintenance on one or more virtual machines in a VM scale set. Operation on instances which are not eligible for perform maintenance will be failed. Please refer to best practices for more details: https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications. |
Core | GA |
az vmss reimage |
Reimage VMs within a VMSS. |
Core | GA |
az vmss restart |
Restart VMs within a VMSS. |
Core | GA |
az vmss rolling-upgrade |
Manage rolling upgrades. |
Core | GA |
az vmss rolling-upgrade cancel |
Cancel the current virtual machine scale set rolling upgrade. |
Core | GA |
az vmss rolling-upgrade get-latest |
Get the status of the latest virtual machine scale set rolling upgrade. |
Core | GA |
az vmss rolling-upgrade start |
Start a rolling upgrade to move all virtual machine scale set instances to the latest available Platform Image OS version. Instances which are already running the latest available OS version are not affected. |
Core | GA |
az vmss run-command |
Manage run commands on a Virtual Machine Scale Set. |
Core | GA |
az vmss run-command create |
The operation to Create the VMSS VM run command. |
Core | GA |
az vmss run-command delete |
The operation to delete the run command. |
Core | GA |
az vmss run-command invoke |
Execute a specific run command on a Virtual Machine Scale Set instance. |
Core | GA |
az vmss run-command list |
The operation to get all run commands of an instance in Virtual Machine Scaleset. |
Core | GA |
az vmss run-command show |
The operation to get the VMSS run command. |
Core | GA |
az vmss run-command update |
The operation to update the VMSS run command. |
Core | GA |
az vmss scale |
Change the number of VMs within a VMSS. |
Core | GA |
az vmss set-orchestration-service-state |
Change ServiceState property for a given service within a VMSS. |
Core | GA |
az vmss show |
Get details on VMs within a VMSS. |
Core | GA |
az vmss simulate-eviction |
Simulate the eviction of a Spot virtual machine in a VM scale set. |
Core | GA |
az vmss start |
Start VMs within a VMSS. |
Core | GA |
az vmss stop |
Power off (stop) VMs within a VMSS. |
Core | GA |
az vmss update |
Update a VMSS. Run 'az vmss update-instances' command to roll out the changes to VMs if you have not configured upgrade policy. |
Core | GA |
az vmss update-domain-walk |
Manual platform update domain walk to update virtual machines in a service fabric virtual machine scale set. |
Core | GA |
az vmss update-instances |
Upgrade VMs within a VMSS. |
Core | GA |
az vmss wait |
Place the CLI in a waiting state until a condition of a scale set is met. |
Core | GA |
az vmss create
Create an Azure Virtual Machine Scale Set.
For an end-to-end tutorial, see https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-linux-create-cli.
az vmss create --name
--resource-group
[--accelerated-networking {false, true}]
[--accept-term]
[--additional-events {false, true}]
[--admin-password]
[--admin-username]
[--app-gateway]
[--app-gateway-capacity]
[--app-gateway-sku]
[--app-gateway-subnet-address-prefix]
[--asgs]
[--assign-identity]
[--authentication-type {all, password, ssh}]
[--automatic-repairs-action {Reimage, Replace, Restart}]
[--automatic-repairs-grace-period]
[--backend-pool-name]
[--backend-port]
[--capacity-reservation-group]
[--computer-name-prefix]
[--custom-data]
[--data-disk-caching]
[--data-disk-delete-option {Delete, Detach}]
[--data-disk-encryption-sets]
[--data-disk-iops]
[--data-disk-mbps]
[--data-disk-sizes-gb]
[--disable-integrity-monitoring]
[--disable-integrity-monitoring-autoupgrade]
[--disable-overprovision]
[--disk-controller-type {NVMe, SCSI}]
[--dns-servers]
[--edge-zone]
[--enable-agent {false, true}]
[--enable-auto-os-upgrade {false, true}]
[--enable-auto-update {false, true}]
[--enable-cross-zone-upgrade {false, true}]
[--enable-hibernation {false, true}]
[--enable-integrity-monitoring]
[--enable-osimage-notification {false, true}]
[--enable-proxy-agent {false, true}]
[--enable-reboot {false, true}]
[--enable-redeploy {false, true}]
[--enable-resilient-creation {false, true}]
[--enable-resilient-deletion {false, true}]
[--enable-secure-boot {false, true}]
[--enable-spot-restore {false, true}]
[--enable-vtpm {false, true}]
[--encryption-at-host {false, true}]
[--ephemeral-os-disk {false, true}]
[--ephemeral-os-disk-placement {CacheDisk, NvmeDisk, ResourceDisk}]
[--eviction-policy {Deallocate, Delete}]
[--exclude-extensions]
[--generate-ssh-keys]
[--health-probe]
[--host-group]
[--image]
[--instance-count]
[--lb]
[--lb-nat-pool-name]
[--lb-nat-rule-name]
[--lb-sku {Basic, Gateway, Standard}]
[--license-type {None, RHEL_BASE, RHEL_BASESAPAPPS, RHEL_BASESAPHA, RHEL_BYOS, RHEL_ELS_6, RHEL_EUS, RHEL_SAPAPPS, RHEL_SAPHA, SLES, SLES_BYOS, SLES_HPC, SLES_SAP, SLES_STANDARD, UBUNTU, UBUNTU_PRO, Windows_Client, Windows_Server}]
[--location]
[--max-batch-instance-percent]
[--max-price]
[--max-surge {false, true}]
[--max-unhealthy-instance-percent]
[--max-unhealthy-upgraded-instance-percent]
[--network-api-version]
[--no-wait]
[--nsg]
[--orchestration-mode {Flexible, Uniform}]
[--os-disk-caching {None, ReadOnly, ReadWrite}]
[--os-disk-delete-option {Delete, Detach}]
[--os-disk-encryption-set]
[--os-disk-name]
[--os-disk-secure-vm-disk-encryption-set]
[--os-disk-security-encryption-type {DiskWithVMGuestState, NonPersistedTPM, VMGuestStateOnly}]
[--os-disk-size-gb]
[--os-type {linux, windows}]
[--patch-mode {AutomaticByOS, AutomaticByPlatform, ImageDefault, Manual}]
[--pause-time-between-batches]
[--plan-name]
[--plan-product]
[--plan-promotion-code]
[--plan-publisher]
[--platform-fault-domain-count]
[--ppg]
[--prioritize-unhealthy-instances {false, true}]
[--priority {Low, Regular, Spot}]
[--proxy-agent-mode {Audit, Enforce}]
[--public-ip-address]
[--public-ip-address-allocation {dynamic, static}]
[--public-ip-address-dns-name]
[--public-ip-per-vm]
[--regular-priority-count]
[--regular-priority-percentage]
[--role]
[--scale-in-policy {Default, NewestVM, OldestVM}]
[--scope]
[--secrets]
[--security-posture-id]
[--security-type {ConfidentialVM, Standard, TrustedLaunch}]
[--single-placement-group {false, true}]
[--specialized {false, true}]
[--spot-restore-timeout]
[--ssh-dest-key-path]
[--ssh-key-type {Ed25519, RSA}]
[--ssh-key-values]
[--storage-container-name]
[--storage-sku]
[--subnet]
[--subnet-address-prefix]
[--tags]
[--terminate-notification-time]
[--ultra-ssd-enabled {false, true}]
[--upgrade-policy-mode {Automatic, Manual, Rolling}]
[--use-unmanaged-disk]
[--user-data]
[--v-cpus-available]
[--v-cpus-per-core]
[--validate]
[--vm-domain-name]
[--vm-sku]
[--vnet-address-prefix]
[--vnet-name]
[--zones]
Examples
Create a Windows VM scale set with 5 instances, a load balancer, a public IP address, a 2GB data disk and 40GB OS disk.
az vmss create -n MyVmss -g MyResourceGroup --instance-count 5 --image Win2016Datacenter --data-disk-sizes-gb 2 --os-disk-size-gb 40
Create a Linux VM scale set with an auto-generated ssh key pair, a public IP address, a DNS entry, an existing load balancer, and an existing virtual network.
az vmss create -n MyVmss -g MyResourceGroup --public-ip-address-dns-name my-globally-dns-name \
--load-balancer MyLoadBalancer --vnet-name MyVnet --subnet MySubnet --image Ubuntu2204 \
--generate-ssh-keys
Create a Linux VM scale set from a custom image using the default existing public SSH key.
az vmss create -n MyVmss -g MyResourceGroup --image MyImage
Create a Linux VM scale set with a load balancer and custom DNS servers. Each VM has a public-ip address and a custom domain name.
az vmss create -n MyVmss -g MyResourceGroup --image CentOS85Gen2 \
--public-ip-per-vm --vm-domain-name myvmss --dns-servers 10.0.0.6 10.0.0.5
Create a Linux VM scale set using a cloud-init script for configuration. See: https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init
az vmss create -g MyResourceGroup -n MyVmss --image Debian11 --custom-data MyCloudInitScript.yml
Create a VMSS from a generalized gallery image version.
az vmss create -g MyResourceGroup -n MyVmss --image /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.Compute/galleries/myGallery/images/myImage/versions/1.0.0
Create a VMSS from a specialized gallery image version.
az vmss create -g MyResourceGroup -n MyVmss --image /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.Compute/galleries/myGallery/images/myImage/versions/1.0.0 --specialized
Create a VMSS from the latest version of a gallery image
az vmss create -g MyResourceGroup -n MyVmss --image /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.Compute/galleries/myGallery/images/myImage
Create a Debian11 VM scaleset using Key Vault secrets.
az keyvault certificate create --vault-name vaultname -n cert1 \
-p "$(az keyvault certificate get-default-policy)"
secrets=$(az keyvault secret list-versions --vault-name vaultname \
-n cert1 --query "[?attributes.enabled].id" -o tsv)
vm_secrets=$(az vm secret format -s "$secrets")
az vmss create -g group-name -n vm-name --admin-username deploy \
--image Debian11 --secrets "$vm_secrets"
Create a VM scaleset with system assigned identity. The VM will have a 'Contributor' Role with access to a storage account.
az vmss create -n MyVmss -g MyResourceGroup --image CentOS85Gen2 --assign-identity --scope /subscriptions/99999999-1bf0-4dda-aec3-cb9272f09590/MyResourceGroup/myRG/providers/Microsoft.Storage/storageAccounts/storage1 --role Contributor
Create a Debian11 VM scaleset with a user assigned identity.
az vmss create -n MyVmss -g rg1 --image Debian11 --assign-identity /subscriptions/99999999-1bf0-4dda-aec3-cb9272f09590/resourcegroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myID
Create a Debian11 VM scaleset with both system and user assigned identity.
az vmss create -n MyVmss -g rg1 --image Debian11 --assign-identity [system] /subscriptions/99999999-1bf0-4dda-aec3-cb9272f09590/resourcegroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myID
Create a single zone VM scaleset in the current resource group's region
az vmss create -n MyVmss -g MyResourceGroup --image CentOS85Gen2 --zones 1
Create a VMSS that supports SpotRestore.
az vmss create -n MyVmss -g MyResourceGroup --location NorthEurope --instance-count 2 --image CentOS85Gen2 --priority Spot --eviction-policy Deallocate --single-placement-group --enable-spot-restore True --spot-restore-timeout PT1H
Create a VMSS from shared gallery image.
az vmss create -n MyVmss -g MyResourceGroup --image /SharedGalleries/{gallery_unique_name}/Images/{image}/Versions/{version}
Create a VMSS from community gallery image.
az vmss create -n MyVmss -g MyResourceGroup --image /CommunityGalleries/{gallery_unique_name}/Images/{image}/Versions/{version}
Create a Windows VMSS with patch mode 'Manual' (Currently patch mode 'AutomaticByPlatform' is not supported during VMSS creation as health extension which is required for 'AutomaticByPlatform' mode cannot be set during VMSS creation).
az vmss create -n MyVmss -g MyResourceGroup --image Win2019Datacenter --enable-agent --enable-auto-update false --patch-mode Manual --orchestration-mode Flexible
Create a VMSS with specifying the security posture to be used for all virtual machines in the scale set.
az vmss create -n MyVmss -g MyResourceGroup --image /CommunityGalleries/{gallery_unique_name}/Images/{image}/Versions/{version} --security-posture-reference-id /CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{version} \
--security-posture-reference-exclude-extensions "c:\tmp\exclude_extensions.json"
Required Parameters
Name of the virtual machine scale set.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Enable accelerated networking. Unless specified, CLI will enable it based on machine image and size.
Accept the license agreement and privacy statement.
The configuration parameter used while creating event grid and resource graph scheduled event setting.
Password for the VM if authentication type is 'Password'.
Username for the VM. Default value is current username of OS. If the default value is system reserved, then default value will be set to azureuser. Please refer to https://docs.microsoft.com/rest/api/compute/virtualmachines/createorupdate#osprofile to get a full list of reserved values.
Name to use when creating a new application gateway (default) or referencing an existing one. Can also reference an existing application gateway by ID or specify "" for none.
The number of instances to use when creating a new application gateway.
SKU when creating a new application gateway.
The subnet IP address prefix to use when creating a new application gateway in CIDR format.
Space-separated list of existing application security groups to associate with the VM.
Accept system or user assigned identities separated by spaces. Use '[system]' to refer system assigned identity, or a resource id to refer user assigned identity. Check out help for more examples.
Type of authentication to use with the VM. Defaults to password for Windows and SSH public key for Linux. "all" enables both ssh and password authentication.
Type of repair action that will be used for repairing unhealthy virtual machines in the scale set.
The amount of time (in minutes, between 30 and 90) for which automatic repairs are suspended due to a state change on VM.
Name to use for the backend pool when creating a new load balancer or application gateway.
When creating a new load balancer, backend port to open with NAT rules (Defaults to 22 on Linux and 3389 on Windows). When creating an application gateway, the backend port to use for the backend HTTP settings.
The ID or name of the capacity reservation group that is used to allocate. Pass in "None" to disassociate the capacity reservation group. Please note that if you want to delete a VM/VMSS that has been associated with capacity reservation group, you need to disassociate the capacity reservation group first.
Computer name prefix for all of the virtual machines in the scale set. Computer name prefixes must be 1 to 15 characters long.
Custom init script file or text (cloud-init, cloud-config, etc..).
Storage caching type for data disk(s), including 'None', 'ReadOnly', 'ReadWrite', etc. Use a singular value to apply on all disks, or use <lun>=<vaule1> <lun>=<value2>
to configure individual disk.
Specify whether data disk should be deleted or detached upon VMSS Flex deletion (This feature is only for VMSS with flexible orchestration mode).
Names or IDs (space delimited) of disk encryption sets for data disks.
Specify the Read-Write IOPS (space delimited) for the managed disk. Should be used only when StorageAccountType is UltraSSD_LRS. If not specified, a default value would be assigned based on diskSizeGB.
Specify the bandwidth in MB per second (space delimited) for the managed disk. Should be used only when StorageAccountType is UltraSSD_LRS. If not specified, a default value would be assigned based on diskSizeGB.
Space-separated empty managed data disk sizes in GB to create.
Argument 'disable_integrity_monitoring' has been deprecated and will be removed in a future release.
Disable installing guest attestation extension and enabling System Assigned Identity for Trusted Launch enabled VMs and VMSS. It will become the default behavior, so it will become useless.
Disable auto upgrade of guest attestation extension for Trusted Launch enabled VMs and VMSS.
Overprovision option (see https://azure.microsoft.com/documentation/articles/virtual-machine-scale-sets-overview/ for details).
Specify the disk controller type configured for the VM or VMSS.
Space-separated IP addresses of DNS servers, e.g. 10.0.0.5 10.0.0.6.
The name of edge zone.
Indicate whether virtual machine agent should be provisioned on the virtual machine. When this property is not specified, default behavior is to set it to true. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later.
Indicate whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the OS image becomes available.
Indicate whether Automatic Updates is enabled for the Windows virtual machine.
Set this Boolean property will allow VMSS to ignore AZ boundaries when constructing upgrade batches, and only consider Update Domain and maxBatchInstancePercent to determine the batch size.
The flag that enable or disable hibernation capability on the VMSS.
Enable installing Microsoft propietary and not security supported guest attestation extension and enabling System Assigned Identity for Trusted Launch enabled VMs and VMSS.
Specify whether the OS Image Scheduled event is enabled or disabled.
Specify whether proxy agent feature should be enabled on the virtual machine or virtual machine scale set.
The configuration parameter used while publishing scheduled events additional publishing targets.
The configuration parameter used while creating user initiated redeploy scheduled event setting creation.
Automatically recover customers from OS Provisioning Timeout and VM Start Timeout errors experienced during a VM Create operation by deleting and recreating the affected VM.
Retry VM Delete requests asynchronously in the event of a failed delete operation.
Enable secure boot.
Enable the Spot-Try-Restore feature where evicted VMSS SPOT instances will be tried to be restored opportunistically based on capacity availability and pricing constraints.
Enable vTPM.
Enable Host Encryption for the VM or VMSS. This will enable the encryption for all the disks including Resource/Temp disk at host itself.
Allows you to create an OS disk directly on the host node, providing local disk performance and faster VM/VMSS reimage time.
Only applicable when used with --ephemeral-os-disk
. Allows you to choose the Ephemeral OS disk provisioning location.
The eviction policy for virtual machines in a Spot priority scale set. Default eviction policy is Deallocate for a Spot priority scale set.
List of virtual machine extensions to exclude when applying the Security Posture. Either a Json string or a file path is acceptable. Please refer to https://docs.microsoft.com/rest/api/compute/virtualmachinescalesets/get#virtualmachineextension for the data format.
Generate SSH public and private key files if missing. The keys will be stored in the ~/.ssh directory.
Probe name from the existing load balancer, mainly used for rolling upgrade or automatic repairs.
Name or ID of dedicated host group that the virtual machine scale set resides in.
The name of the operating system image as a URN alias, URN, custom image name or ID, or VHD blob URI. In addition, it also supports shared gallery image. Please use the image alias including the version of the distribution you want to use. For example: please use Debian11 instead of Debian.' This parameter is required unless using --attach-os-disk.
Valid URN format: "Publisher:Offer:Sku:Version". For more information, see https://docs.microsoft.com/azure/virtual-machines/linux/cli-ps-findimage.
Number of VMs in the scale set.
Name to use when creating a new load balancer (default) or referencing an existing one. Can also reference an existing load balancer by ID or specify "" for none.
Option '--nat-pool-name' has been deprecated and will be removed in a future release. Use '--nat-rule-name' instead.
Name to use for the NAT pool when creating a new load balancer.
Name to use for the NAT rule v2 when creating a new load balancer. (NAT rule V2 is used to replace NAT pool).
Sku of the Load Balancer to create. The public IP is supported to be created on edge zone only when it is 'Standard'.
Specifies that the Windows image or disk was licensed on-premises. To enable Azure Hybrid Benefit for Windows Server, use 'Windows_Server'. To enable Multi-tenant Hosting Rights for Windows 10, use 'Windows_Client'. For more information see the Azure Windows VM online docs.
Location in which to create VM and related resources. If default location is not configured, will default to the resource group's location.
The maximum percent of total virtual machine instances that will be upgraded simultaneously by the rolling upgrade in one batch. Default: 20%.
The maximum price (in US Dollars) you are willing to pay for a Spot VM/VMSS. -1 indicates that the Spot VM/VMSS should not be evicted for price reasons.
Specify it to create new virtual machines to upgrade the scale set, rather than updating the existing virtual machines.
The maximum percentage of the total virtual machine instances in the scale set that can be simultaneously unhealthy. Default: 20%.
The maximum percentage of upgraded virtual machine instances that can be found to be in an unhealthy state. Default: 20%.
Specify the Microsoft.Network API version used when creating networking resources in the Network Interface Configurations for Virtual Machine Scale Set with orchestration mode 'Flexible'. Default value is 2020-11-01.
Do not wait for the long-running operation to finish.
Name or ID of an existing Network Security Group.
Choose how virtual machines are managed by the scale set. In Uniform mode, you define a virtual machine model and Azure will generate identical instances based on that model. In Flexible mode, you manually create and add a virtual machine of any configuration to the scale set or generate identical instances based on virtual machine model defined for the scale set.
Storage caching type for the VM OS disk. Default: ReadWrite.
Specify whether OS disk should be deleted or detached upon VMSS Flex deletion (This feature is only for VMSS with flexible orchestration mode).
Name or ID of disk encryption set for OS disk.
The name of the new VM OS disk.
Specify the customer managed disk encryption set resource ID or name for the managed disk that is used for customer managed key encrypted Confidential VM OS disk and VM guest blob.
Specify the encryption type of the OS managed disk.
OS disk size in GB to create.
Type of OS installed on a custom VHD. Do not use when specifying an URN or URN alias.
Mode of in-guest patching to IaaS virtual machine. Allowed values for Windows VM: AutomaticByOS, AutomaticByPlatform, Manual. Allowed values for Linux VM: AutomaticByPlatform, ImageDefault. Manual - You control the application of patches to a virtual machine. You do this by applying patches manually inside the VM. In this mode, automatic updates are disabled; the paramater --enable-auto-update must be false. AutomaticByOS - The virtual machine will automatically be updated by the OS. The parameter --enable-auto-update must be true. AutomaticByPlatform - the virtual machine will automatically updated by the OS. ImageDefault - The virtual machine's default patching configuration is used. The parameter --enable-agent and --enable-auto-update must be true.
The wait time between completing the update for all virtual machines in one batch and starting the next batch. Default: 0 seconds.
Plan name.
Plan product.
Plan promotion code.
Plan publisher.
Fault Domain count for each placement group in the availability zone.
The name or ID of the proximity placement group the VMSS should be associated with.
Set this Boolean property will lead to all unhealthy instances in a scale set getting upgraded before any healthy instances.
Priority. Use 'Spot' to run short-lived workloads in a cost-effective way. 'Low' enum will be deprecated in the future. Please use 'Spot' to deploy Azure spot VM and/or VMSS. Default to Regular.
Specify the mode that proxy agent will execute on if the feature is enabled.
Name of the public IP address when creating one (default) or referencing an existing one. Can also reference an existing public IP by ID or specify "" for None ('""' in Azure CLI using PowerShell or --% operator). For Azure CLI using powershell core edition 7.3.4, specify or "" (--public-ip-address or --public-ip-address "").
Globally unique DNS name for a newly created public IP.
Each VM instance will have a public ip. For security, you can use '--nsg' to apply appropriate rules.
The base number of regular priority VMs that will be created in this scale set as it scales out. Must be greater than 0.
The percentage of VM instances, after the base regular priority count has been reached, that are expected to use regular priority. Must be between 0 and 100.
Role name or id the system assigned identity will have.
Specify the scale-in policy (space delimited) that decides which virtual machines are chosen for removal when a Virtual Machine Scale Set is scaled-in.
Scope that the system assigned identity can access.
One or many Key Vault secrets as JSON strings or files via @{path}
containing [{ "sourceVault": { "id": "value" }, "vaultCertificates": [{ "certificateUrl": "value", "certificateStore": "cert store name (only on windows)"}] }]
.
The security posture reference id in the form of /CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest.
Specify the security type of the virtual machine.
Limit the scale set to a single placement group. See https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-placement-groups for details.
Indicate whether the source image is specialized.
Timeout value expressed as an ISO 8601 time duration after which the platform will not try to restore the VMSS SPOT instances.
Destination file path on the VM for the SSH key. If the file already exists, the specified key(s) are appended to the file. Destination path for SSH public keys is currently limited to its default value "/home/username/.ssh/authorized_keys" due to a known issue in Linux provisioning agent.
Specify the type of SSH public and private key files to be generated if missing.
Space-separated list of SSH public keys or public key file paths.
Only applicable when used with --use-unmanaged-disk
. Name of the storage container for the VM OS disk. Default: vhds.
The SKU of the storage account with which to persist VM. Use a singular sku that would be applied across all disks, or specify individual disks. Usage: [--storage-sku SKU | --storage-sku ID=SKU ID=SKU ID=SKU...], where each ID is "os" or a 0-indexed lun. Allowed values: Standard_LRS, Premium_LRS, StandardSSD_LRS, UltraSSD_LRS, Premium_ZRS, StandardSSD_ZRS, PremiumV2_LRS.
The name of the subnet when creating a new VNet or referencing an existing one. Can also reference an existing subnet by ID. If both vnet-name and subnet are omitted, an appropriate VNet and subnet will be selected automatically, or a new one will be created.
The subnet IP address prefix to use when creating a new VNet in CIDR format.
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
Length of time (in minutes, between 5 and 15) a notification to be sent to the VM on the instance metadata server till the VM gets deleted.
Enables or disables the capability to have 1 or more managed data disks with UltraSSD_LRS storage account.
Specify the mode of an upgrade to virtual machines in the scale set.
Do not use managed disk to persist VM.
UserData for the virtual machines in the scale set. It can be passed in as file or string.
Specify the number of vCPUs available.
Specify the ratio of vCPU to physical core. Setting this property to 1 also means that hyper-threading is disabled.
Generate and validate the ARM template without creating any resources.
Domain name of VM instances, once configured, the FQDN is vm<vm-index>.<vm-domain-name>.<..rest..>
.
Size of VMs in the scale set. Default to "Standard_DS1_v2". See https://azure.microsoft.com/pricing/details/virtual-machines/ for size info.
The IP address prefix to use when creating a new VNet in CIDR format.
Name of the virtual network when creating a new one or referencing an existing one.
Space-separated list of availability zones into which to provision the resource.
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 vmss deallocate
Deallocate VMs within a VMSS.
az vmss deallocate --name
--resource-group
[--hibernate {false, true}]
[--instance-ids]
[--no-wait]
Examples
Deallocate VMs within a VMSS. (autogenerated)
az vmss deallocate --instance-ids 1 --name MyScaleSet --resource-group MyResourceGroup
Required Parameters
Scale set name. You can configure the default using az configure --defaults vmss=<name>
.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Hibernate a virtual machine from the VM scale set. Available for VMSS with Flexible OrchestrationMode only.
Space-separated list of IDs (ex: 1 2 3 ...) or * for all instances. If not provided, the action will be applied on the scaleset itself.
Do not wait for the long-running operation to finish.
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 vmss delete
Delete a VM scale set.
az vmss delete [--force-deletion {0, 1, f, false, n, no, t, true, y, yes}]
[--ids]
[--name]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--resource-group]
[--subscription]
Optional Parameters
Optional parameter to force delete a VM scale set. (Feature in Preview).
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.
The name of the VM scale set.
Do not wait for the long-running operation to finish.
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 vmss delete-instances
Delete VMs within a VMSS.
az vmss delete-instances --instance-ids
--name
--resource-group
[--no-wait]
Examples
Delete VMs within a VMSS. (autogenerated)
az vmss delete-instances --instance-ids 0 --name MyScaleSet --resource-group MyResourceGroup
Required Parameters
Space-separated list of IDs (ex: 1 2 3 ...) or * for all instances.
Scale set name. You can configure the default using az configure --defaults vmss=<name>
.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Do not wait for the long-running operation to finish.
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 vmss get-instance-view
View an instance of a VMSS.
az vmss get-instance-view [--ids]
[--instance-id]
[--name]
[--resource-group]
[--subscription]
Examples
View an instance of a VMSS. (autogenerated)
az vmss get-instance-view --name MyScaleSet --resource-group MyResourceGroup
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.
A VM instance ID or "*" to list instance view for all VMs in a scale set.
Scale set name. You can configure the default using az configure --defaults vmss=<name>
.
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 vmss get-os-upgrade-history
List the OS upgrades on a VM scale set instance.
az vmss get-os-upgrade-history --name
--resource-group
[--max-items]
[--next-token]
Required Parameters
The name of the VM scale set.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Total number of items to return in the command's output. If the total number of items available is more than the value specified, a token is provided in the command's output. To resume pagination, provide the token value in --next-token
argument of a subsequent command.
Token to specify where to start paginating. This is the token value from a previously truncated response.
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 vmss list
List all VM scale sets under a resource group.
az vmss list [--max-items]
[--next-token]
[--resource-group]
Examples
List VMSS
az vmss list --resource-group MyResourceGroup
Optional Parameters
Total number of items to return in the command's output. If the total number of items available is more than the value specified, a token is provided in the command's output. To resume pagination, provide the token value in --next-token
argument of a subsequent command.
Token to specify where to start paginating. This is the token value from a previously truncated response.
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 vmss list-instance-connection-info
Get the IP address and port number used to connect to individual VM instances within a set.
az vmss list-instance-connection-info [--ids]
[--name]
[--resource-group]
[--subscription]
Examples
Get the IP address and port number used to connect to individual VM instances within a set. (autogenerated)
az vmss list-instance-connection-info --name MyScaleSet --resource-group MyResourceGroup
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.
Scale set name. You can configure the default using az configure --defaults vmss=<name>
.
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 vmss list-instance-public-ips
List public IP addresses of VM instances within a set.
az vmss list-instance-public-ips [--ids]
[--name]
[--resource-group]
[--subscription]
Examples
List public IP addresses of VM instances within a set. (autogenerated)
az vmss list-instance-public-ips --name MyScaleSet --resource-group MyResourceGroup
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.
Scale set name. You can configure the default using az configure --defaults vmss=<name>
.
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 vmss list-instances
List all virtual machines in a VM scale sets.
Return a list of virtual machines managed by VMSS. For VMSS in Flexible Orchestration mode, please use "az vm list" to get full details.
az vmss list-instances --name
--resource-group
[--expand]
[--filter]
[--max-items]
[--next-token]
[--select]
Required Parameters
The name of the VM scale set.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
The expand expression to apply to the operation. Allowed values are 'instanceView'.
The filter to apply to the operation. Allowed values are 'startswith(instanceView/statuses/code, 'PowerState') eq true', 'properties/latestModelApplied eq true', 'properties/latestModelApplied eq false'.
Total number of items to return in the command's output. If the total number of items available is more than the value specified, a token is provided in the command's output. To resume pagination, provide the token value in --next-token
argument of a subsequent command.
Token to specify where to start paginating. This is the token value from a previously truncated response.
The list parameters. Allowed values are 'instanceView', 'instanceView/statuses'.
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 vmss list-skus
List SKUs available for your VM scale set, including the minimum and maximum VM instances allowed for each SKU.
az vmss list-skus --name
--resource-group
[--max-items]
[--next-token]
Required Parameters
The name of the VM scale set.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Total number of items to return in the command's output. If the total number of items available is more than the value specified, a token is provided in the command's output. To resume pagination, provide the token value in --next-token
argument of a subsequent command.
Token to specify where to start paginating. This is the token value from a previously truncated response.
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 vmss perform-maintenance
Perform maintenance on one or more virtual machines in a VM scale set. Operation on instances which are not eligible for perform maintenance will be failed. Please refer to best practices for more details: https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications.
az vmss perform-maintenance [--ids]
[--instance-ids]
[--name]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--resource-group]
[--subscription]
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.
The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
The name of the VM scale set.
Do not wait for the long-running operation to finish.
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 vmss reimage
Reimage VMs within a VMSS.
az vmss reimage [--force-update-os-disk-for-ephemeral {false, true}]
[--ids]
[--instance-ids]
[--name]
[--no-wait]
[--resource-group]
[--subscription]
Examples
Reimage a VM instance within a VMSS.
az vmss reimage --instance-ids 1 --name MyScaleSet --resource-group MyResourceGroup --subscription MySubscription
Reimage a batch of VM instances within a VMSS.
az vmss reimage --instance-ids 1 2 3 --name MyScaleSet --resource-group MyResourceGroup --subscription MySubscription
Reimage all the VM instances within a VMSS.
az vmss reimage --name MyScaleSet --resource-group MyResourceGroup --subscription MySubscription
Optional Parameters
Force update ephemeral OS disk for a virtual machine scale set VM.
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.
Space-separated list of VM instance ID. If missing, reimage all instances.
Scale set name. You can configure the default using az configure --defaults vmss=<name>
.
Do not wait for the long-running operation to finish.
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 vmss restart
Restart VMs within a VMSS.
az vmss restart --name
--resource-group
[--instance-ids]
[--no-wait]
Examples
Restart VMs within a VMSS. (autogenerated)
az vmss restart --instance-ids 1 --name MyScaleSet --resource-group MyResourceGroup
Required Parameters
Scale set name. You can configure the default using az configure --defaults vmss=<name>
.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Space-separated list of IDs (ex: 1 2 3 ...) or * for all instances. If not provided, the action will be applied on the scaleset itself.
Do not wait for the long-running operation to finish.
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 vmss scale
Change the number of VMs within a VMSS.
az vmss scale --new-capacity
[--ids]
[--name]
[--no-wait]
[--resource-group]
[--subscription]
Examples
Change the number of VMs within a VMSS. (autogenerated)
az vmss scale --name MyScaleSet --new-capacity 6 --resource-group MyResourceGroup
Required Parameters
Number of VMs in the VMSS.
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.
Scale set name. You can configure the default using az configure --defaults vmss=<name>
.
Do not wait for the long-running operation to finish.
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 vmss set-orchestration-service-state
Change ServiceState property for a given service within a VMSS.
az vmss set-orchestration-service-state --action {Resume, Suspend}
--service-name {AutomaticRepairs, DummyOrchestrationServiceName}
[--ids]
[--name]
[--no-wait]
[--resource-group]
[--subscription]
Examples
Change ServiceState property for AutomaticRepairs
az vmss set-orchestration-service-state --service-name AutomaticRepairs --action Resume --name MyScaleSet --resource-group MyResourceGroup
Required Parameters
The action to be performed.
The name of the orchestration service.
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.
Scale set name. You can configure the default using az configure --defaults vmss=<name>
.
Do not wait for the long-running operation to finish.
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 vmss show
Get details on VMs within a VMSS.
az vmss show --name
--resource-group
[--include-user-data]
[--instance-id]
Examples
Get details on VMs within a VMSS. (autogenerated)
az vmss show --name MyScaleSet --resource-group MyResourceGroup
Required Parameters
Scale set name. You can configure the default using az configure --defaults vmss=<name>
.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Include the user data properties in the query result.
VM instance ID. If missing, show the VMSS.
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 vmss simulate-eviction
Simulate the eviction of a Spot virtual machine in a VM scale set.
az vmss simulate-eviction [--ids]
[--instance-id]
[--name]
[--resource-group]
[--subscription]
Examples
Simulate the eviction of a Spot virtual machine in a VM scale set.
az vmss simulate-eviction --resource-group MyResourceGroup --name MyScaleSet --instance-id 0
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.
The instance ID of the virtual machine.
The name of the VM scale 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 vmss start
Start VMs within a VMSS.
az vmss start --name
--resource-group
[--instance-ids]
[--no-wait]
Examples
Start VMs within a VMSS. (autogenerated)
az vmss start --instance-ids 1 --name MyScaleSet --resource-group MyResourceGroup
Required Parameters
Scale set name. You can configure the default using az configure --defaults vmss=<name>
.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Space-separated list of IDs (ex: 1 2 3 ...) or * for all instances. If not provided, the action will be applied on the scaleset itself.
Do not wait for the long-running operation to finish.
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 vmss stop
Power off (stop) VMs within a VMSS.
The VMs will continue to be billed. To avoid this, you can deallocate VM instances within a VMSS through "az vmss deallocate".
az vmss stop --name
--resource-group
[--instance-ids]
[--no-wait]
[--skip-shutdown]
Examples
Power off VMs within a VMSS without shutting down.
az vmss stop --name MyScaleSet --resource-group MyResourceGroup --skip-shutdown
Power off (stop) VMs within a VMSS. (autogenerated)
az vmss stop --instance-ids 1 --name MyScaleSet --resource-group MyResourceGroup
Required Parameters
Scale set name. You can configure the default using az configure --defaults vmss=<name>
.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Space-separated list of IDs (ex: 1 2 3 ...) or * for all instances. If not provided, the action will be applied on the scaleset itself.
Do not wait for the long-running operation to finish.
Skip shutdown and power-off immediately.
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 vmss update
Update a VMSS. Run 'az vmss update-instances' command to roll out the changes to VMs if you have not configured upgrade policy.
az vmss update [--add]
[--additional-events {false, true}]
[--automatic-repairs-action {Reimage, Replace, Restart}]
[--automatic-repairs-grace-period]
[--capacity-reservation-group]
[--custom-data]
[--disk-controller-type {NVMe, SCSI}]
[--enable-auto-os-upgrade {false, true}]
[--enable-automatic-repairs {false, true}]
[--enable-cross-zone-upgrade {false, true}]
[--enable-hibernation {false, true}]
[--enable-osimage-notification {false, true}]
[--enable-proxy-agent {false, true}]
[--enable-reboot {false, true}]
[--enable-redeploy {false, true}]
[--enable-resilient-creation {false, true}]
[--enable-resilient-deletion {false, true}]
[--enable-secure-boot {false, true}]
[--enable-spot-restore {false, true}]
[--enable-terminate-notification {false, true}]
[--enable-vtpm {false, true}]
[--ephemeral-option {Local}]
[--ephemeral-os-disk {false, true}]
[--ephemeral-os-disk-placement {CacheDisk, NvmeDisk, ResourceDisk}]
[--exclude-extensions]
[--force-deletion]
[--force-string]
[--ids]
[--instance-id]
[--license-type {None, RHEL_BASE, RHEL_BASESAPAPPS, RHEL_BASESAPHA, RHEL_BYOS, RHEL_ELS_6, RHEL_EUS, RHEL_SAPAPPS, RHEL_SAPHA, SLES, SLES_BYOS, SLES_HPC, SLES_SAP, SLES_STANDARD, UBUNTU, UBUNTU_PRO, Windows_Client, Windows_Server}]
[--max-batch-instance-percent]
[--max-price]
[--max-surge {false, true}]
[--max-unhealthy-instance-percent]
[--max-unhealthy-upgraded-instance-percent]
[--name]
[--no-wait]
[--pause-time-between-batches]
[--ppg]
[--prioritize-unhealthy-instances {false, true}]
[--priority {Low, Regular, Spot}]
[--protect-from-scale-in {false, true}]
[--protect-from-scale-set-actions {false, true}]
[--proxy-agent-mode {Audit, Enforce}]
[--regular-priority-count]
[--regular-priority-percentage]
[--remove]
[--resource-group]
[--scale-in-policy {Default, NewestVM, OldestVM}]
[--security-posture-id]
[--security-type {Standard, TrustedLaunch}]
[--set]
[--spot-restore-timeout]
[--subscription]
[--terminate-notification-time]
[--ultra-ssd-enabled {false, true}]
[--upgrade-policy-mode {Automatic, Manual, Rolling}]
[--user-data]
[--v-cpus-available]
[--v-cpus-per-core]
[--vm-sku]
[--zones]
Examples
Update a VMSS' license type for Azure Hybrid Benefit.
az vmss update --name MyScaleSet --resource-group MyResourceGroup --license-type windows_server
Update a VM instance's protection policies.
az vmss update --name MyScaleSet --resource-group MyResourceGroup --instance-id 4 --protect-from-scale-set-actions False --protect-from-scale-in
Update a VM instance's protection policies.
az vmss update --name MyScaleSet --resource-group MyResourceGroup --instance-id 4 --set protectionPolicy.protectFromScaleIn=True protectionPolicy.protectFromScaleSetActions=False
Update a VM instance's Read-Write IOPS of the managed disk.
az vmss update --name MyScaleSet --resource-group MyResourceGroup --set virtualMachineProfile.storageProfile.dataDisks[0].diskIOPSReadWrite=444
Update a VM instance's bandwidth in MB per second of the managed disk.
az vmss update --name MyScaleSet --resource-group MyResourceGroup --set virtualMachineProfile.storageProfile.dataDisks[0].diskMBpsReadWrite=66
Update a VM to use a custom image.
az vmss update --name MyScaleSet --resource-group MyResourceGroup --set virtualMachineProfile.storageProfile.imageReference.id=imageID
Update a Linux VMSS to patch mode 'AutomaticByPlatform'.
az vmss update -n MyVmss -g MyResourceGroup --set virtualMachineProfile.osProfile.linuxConfiguration.patchSettings.patchMode=AutomaticByPlatform
Update a VMSS with specifying the security posture to be used for all virtual machines in the scale set.
az vmss update -n MyVmss -g MyResourceGroup --security-posture-reference-id /CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{version} \
--security-posture-reference-exclude-extensions "c:\tmp\exclude_extensions.json"
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>
.
The configuration parameter used while creating event grid and resource graph scheduled event setting.
Type of repair action that will be used for repairing unhealthy virtual machines in the scale set.
The amount of time (in minutes, between 30 and 90) for which automatic repairs are suspended due to a state change on VM.
The ID or name of the capacity reservation group that is used to allocate. Pass in "None" to disassociate the capacity reservation group. Please note that if you want to delete a VM/VMSS that has been associated with capacity reservation group, you need to disassociate the capacity reservation group first.
Custom init script file or text (cloud-init, cloud-config, etc..).
Specify the disk controller type configured for the VM or VMSS.
Indicate whether OS upgrades should automatically be applied to scale set instances in a rolling fashion when a newer version of the OS image becomes available.
Enable automatic repairs.
Set this Boolean property will allow VMSS to ignore AZ boundaries when constructing upgrade batches, and only consider Update Domain and maxBatchInstancePercent to determine the batch size.
The flag that enable or disable hibernation capability on the VMSS.
Specify whether the OS Image Scheduled event is enabled or disabled.
Specify whether proxy agent feature should be enabled on the virtual machine or virtual machine scale set.
The configuration parameter used while publishing scheduled events additional publishing targets.
The configuration parameter used while creating user initiated redeploy scheduled event setting creation.
Automatically recover customers from OS Provisioning Timeout and VM Start Timeout errors experienced during a VM Create operation by deleting and recreating the affected VM.
Retry VM Delete requests asynchronously in the event of a failed delete operation.
Enable secure boot.
Enable the Spot-Try-Restore feature where evicted VMSS SPOT instances will be tried to be restored opportunistically based on capacity availability and pricing constraints.
Enable terminate notification.
Enable vTPM.
Specify the ephemeral disk settings for operating system disk.
Allow you to specify the ephemeral disk settings for the operating system disk. Specify it to false to set ephemeral disk setting as empty and migrate it to non ephemeral.
Only applicable when used with --vm-sku
. Allows you to choose the Ephemeral OS disk provisioning location.
List of virtual machine extensions to exclude when applying the Security Posture. Either a Json string or a file path is acceptable. Please refer to https://docs.microsoft.com/rest/api/compute/virtualmachinescalesets/get#virtualmachineextension for the data format.
This property allow you to specify if virtual machines chosen for removal have to be force deleted when a virtual machine scale set is being scaled-in.
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.
Update the VM instance with this ID. If missing, Update the VMSS.
Specifies that the Windows image or disk was licensed on-premises. To enable Azure Hybrid Benefit for Windows Server, use 'Windows_Server'. To enable Multi-tenant Hosting Rights for Windows 10, use 'Windows_Client'. For more information see the Azure Windows VM online docs.
The maximum percent of total virtual machine instances that will be upgraded simultaneously by the rolling upgrade in one batch. Default: 20%.
The maximum price (in US Dollars) you are willing to pay for a Spot VM/VMSS. -1 indicates that the Spot VM/VMSS should not be evicted for price reasons.
Specify it to create new virtual machines to upgrade the scale set, rather than updating the existing virtual machines.
The maximum percentage of the total virtual machine instances in the scale set that can be simultaneously unhealthy. Default: 20%.
The maximum percentage of upgraded virtual machine instances that can be found to be in an unhealthy state. Default: 20%.
Scale set name. You can configure the default using az configure --defaults vmss=<name>
.
Do not wait for the long-running operation to finish.
The wait time between completing the update for all virtual machines in one batch and starting the next batch. Default: 0 seconds.
The name or ID of the proximity placement group the VMSS should be associated with.
Set this Boolean property will lead to all unhealthy instances in a scale set getting upgraded before any healthy instances.
Priority. Use 'Spot' to run short-lived workloads in a cost-effective way. 'Low' enum will be deprecated in the future. Please use 'Spot' to deploy Azure spot VM and/or VMSS. Default to Regular.
Protect the VM instance from scale-in operations.
Protect the VM instance from scale set actions (including scale-in).
Specify the mode that proxy agent will execute on if the feature is enabled.
The base number of regular priority VMs that will be created in this scale set as it scales out. Must be greater than 0.
The percentage of VM instances, after the base regular priority count has been reached, that are expected to use regular priority. Must be between 0 and 100.
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>
.
Specify the scale-in policy (space delimited) that decides which virtual machines are chosen for removal when a Virtual Machine Scale Set is scaled-in.
The security posture reference id in the form of /CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest.
Specify the security type of the virtual machine scale set.
Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>
.
Timeout value expressed as an ISO 8601 time duration after which the platform will not try to restore the VMSS SPOT instances.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Length of time (in minutes, between 5 and 15) a notification to be sent to the VM on the instance metadata server till the VM gets deleted.
Enables or disables the capability to have 1 or more managed data disks with UltraSSD_LRS storage account.
Specify the mode of an upgrade to virtual machines in the scale set.
UserData for the virtual machines in the scale set. It can be passed in as file or string. If empty string is passed in, the existing value will be deleted.
Specify the number of vCPUs available.
Specify the ratio of vCPU to physical core. Setting this property to 1 also means that hyper-threading is disabled.
The new size of the virtual machine instances in the scale set. Default to "Standard_DS1_v2". See https://azure.microsoft.com/pricing/details/virtual-machines/ for size info.
Space-separated list of availability zones into which to provision the resource.
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 vmss update-domain-walk
Manual platform update domain walk to update virtual machines in a service fabric virtual machine scale set.
az vmss update-domain-walk --platform-update-domain
[--ids]
[--placement-group-id]
[--resource-group]
[--subscription]
[--vmss-name]
[--zone]
Examples
Force recovery service fabric platform update domain walk
az vmss update-domain-walk -g rg --vmss-name vmss --platform-update-domain
Required Parameters
The platform update domain for which a manual recovery walk is requested.
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.
The placement group id for which the manual recovery walk is requested.
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
.
The name of the VM scale set.
The zone in which the manual recovery walk is requested for cross zone virtual machine scale set.
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 vmss update-instances
Upgrade VMs within a VMSS.
az vmss update-instances --instance-ids
--name
--resource-group
[--no-wait]
Examples
Upgrade VMs within a VMSS. (autogenerated)
az vmss update-instances --instance-ids 1 --name MyScaleSet --resource-group MyResourceGroup
Required Parameters
Space-separated list of IDs (ex: 1 2 3 ...) or * for all instances.
Scale set name. You can configure the default using az configure --defaults vmss=<name>
.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Do not wait for the long-running operation to finish.
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 vmss wait
Place the CLI in a waiting state until a condition of a scale set is met.
az vmss wait [--created]
[--custom]
[--deleted]
[--exists]
[--ids]
[--instance-id]
[--interval]
[--name]
[--resource-group]
[--subscription]
[--timeout]
[--updated]
Examples
Place the CLI in a waiting state until the VMSS has been updated.
az vmss wait --updated --name MyScaleSet --resource-group MyResourceGroup
Place the CLI in a waiting state until the VMSS instance has been updated.
az vmss wait --updated --instance-id 1 --name MyScaleSet --resource-group MyResourceGroup
Place the CLI in a waiting state until a condition of a scale set is met. (autogenerated)
az vmss wait --created --name MyScaleSet --resource-group MyResourceGroup
Optional Parameters
Wait until created with 'provisioningState' at 'Succeeded'.
Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].
Wait until deleted.
Wait until the resource exists.
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.
Wait on the VM instance with this ID. If missing, Wait on the VMSS.
Polling interval in seconds.
Scale set name. You can configure the default using az configure --defaults vmss=<name>
.
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
.
Maximum wait in seconds.
Wait until updated with provisioningState at 'Succeeded'.
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.