Share via


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://learn.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.

az vmss create --name
               --resource-group
               [--accelerated-networking {false, true}]
               [--accept-term]
               [--additional-events --additional-scheduled-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]
               [--automatic-zone-balancing-behavior --balancing-behavior {CreateBeforeDelete}]
               [--automatic-zone-balancing-strategy --balancing-strategy {Recreate}]
               [--backend-pool-name]
               [--backend-port]
               [--capacity-reservation-group --crg]
               [--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-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-automatic-zone-balancing --enable-zone-balancing {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 --enable-user-reboot-scheduled-events {false, true}]
               [--enable-redeploy --enable-user-redeploy-scheduled-events {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}]
               [--encryption-identity]
               [--ephemeral-os-disk {false, true}]
               [--ephemeral-os-disk-placement --ephemeral-placement {CacheDisk, NvmeDisk, ResourceDisk}]
               [--eviction-policy {Deallocate, Delete}]
               [--exclude-extensions --security-posture-reference-exclude-extensions]
               [--generate-ssh-keys]
               [--health-probe]
               [--host-group]
               [--image]
               [--imds-access-control-profile-reference-id --imds-profile-id]
               [--imds-mode {Audit, Enforce}]
               [--instance-count]
               [--is-overridable --security-posture-reference-is-overridable {false, true}]
               [--lb --load-balancer]
               [--lb-nat-rule-name --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-posture-reference-id]
               [--security-type {ConfidentialVM, Standard, TrustedLaunch}]
               [--single-placement-group {false, true}]
               [--sku-allocat-strat --skuprofile-allocation-strategy {CapacityOptimized, LowestPrice, Prioritized}]
               [--skuprofile-rank]
               [--skuprofile-vmsizes]
               [--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]
               [--wire-server-access-control-profile-reference-id --wire-server-profile-id]
               [--wire-server-mode {Audit, Enforce}]
               [--zone-balance {false, true}]
               [--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://learn.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 vmss with user assigned identity and add encryption identity for Azure disk encryption

az vmss create -n MyVm -g rg1 --image Debian11 --assign-identity myID --encryption-identity /subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myID --orchestration-mode Uniform --lb-sku Standard

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 -n

Name of the virtual machine scale set.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--accelerated-networking

Enable accelerated networking. Unless specified, CLI will enable it based on machine image and size.

Property Value
Parameter group: Network Arguments
Accepted values: false, true
--accept-term

Accept the license agreement and privacy statement.

--additional-events --additional-scheduled-events

The configuration parameter used while creating event grid and resource graph scheduled event setting.

Property Value
Accepted values: false, true
--admin-password

Password for the VM if authentication type is 'Password'.

Property Value
Parameter group: Authentication Arguments
--admin-username

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://learn.microsoft.com/rest/api/compute/virtualmachines/createorupdate#osprofile to get a full list of reserved values.

Property Value
Parameter group: Authentication Arguments
--app-gateway

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.

Property Value
Parameter group: Network Balancer Arguments
--app-gateway-capacity

The number of instances to use when creating a new application gateway.

Property Value
Parameter group: Network Balancer Arguments
Default value: 10
--app-gateway-sku

SKU when creating a new application gateway.

Property Value
Parameter group: Network Balancer Arguments
Default value: Standard_Large
--app-gateway-subnet-address-prefix

The subnet IP address prefix to use when creating a new application gateway in CIDR format.

Property Value
Parameter group: Network Balancer Arguments
--asgs

Space-separated list of existing application security groups to associate with the VM.

Property Value
Parameter group: Network Arguments
--assign-identity

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.

Property Value
Parameter group: Managed Service Identity Arguments
--authentication-type

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.

Property Value
Parameter group: Authentication Arguments
Accepted values: all, password, ssh
--automatic-repairs-action

Type of repair action that will be used for repairing unhealthy virtual machines in the scale set.

Property Value
Accepted values: Reimage, Replace, Restart
--automatic-repairs-grace-period

The amount of time (in minutes, between 30 and 90) for which automatic repairs are suspended due to a state change on VM.

--automatic-zone-balancing-behavior --balancing-behavior

Type of rebalance behavior that will be used for recreating virtualmachines in the scale set across availability zones.

Property Value
Accepted values: CreateBeforeDelete
--automatic-zone-balancing-strategy --balancing-strategy

Type of rebalance strategy that will be used for rebalancing virtualmachines in the scale set across availability zones.

Property Value
Accepted values: Recreate
--backend-pool-name

Name to use for the backend pool when creating a new load balancer or application gateway.

Property Value
Parameter group: Network Balancer Arguments
--backend-port

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.

Property Value
Parameter group: Network Balancer Arguments
--capacity-reservation-group --crg
Preview

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

Computer name prefix for all of the virtual machines in the scale set. Computer name prefixes must be 1 to 15 characters long.

--custom-data

Custom init script file or text (cloud-init, cloud-config, etc..).

--data-disk-caching

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.

Property Value
Parameter group: Storage Arguments
--data-disk-delete-option

Specify whether data disk should be deleted or detached upon VMSS Flex deletion (This feature is only for VMSS with flexible orchestration mode).

Property Value
Parameter group: Storage Arguments
Accepted values: Delete, Detach
--data-disk-encryption-sets

Names or IDs (space delimited) of disk encryption sets for data disks.

Property Value
Parameter group: Storage Arguments
--data-disk-iops

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.

Property Value
Parameter group: Storage Arguments
--data-disk-mbps

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.

Property Value
Parameter group: Storage Arguments
--data-disk-sizes-gb

Space-separated empty managed data disk sizes in GB to create.

Property Value
Parameter group: Storage Arguments
--disable-integrity-monitoring-autoupgrade

Disable auto upgrade of guest attestation extension for Trusted Launch enabled VMs and VMSS.

Property Value
Default value: False
--disable-overprovision
--disk-controller-type
Preview

Specify the disk controller type configured for the VM or VMSS.

Property Value
Parameter group: Storage Arguments
Accepted values: NVMe, SCSI
--dns-servers

Space-separated IP addresses of DNS servers, e.g. 10.0.0.5 10.0.0.6.

Property Value
Parameter group: Network Arguments
--edge-zone

The name of edge zone.

--enable-agent

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.

Property Value
Accepted values: false, true
--enable-auto-os-upgrade

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.

Property Value
Accepted values: false, true
--enable-auto-update

Indicate whether Automatic Updates is enabled for the Windows virtual machine.

Property Value
Accepted values: false, true
--enable-automatic-zone-balancing --enable-zone-balancing

Specify whether automatic AZ balancing should be enabled on the virtualmachine scale set.

Property Value
Accepted values: false, true
--enable-cross-zone-upgrade

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.

Property Value
Accepted values: false, true
--enable-hibernation

The flag that enable or disable hibernation capability on the VMSS.

Property Value
Accepted values: false, true
--enable-integrity-monitoring

Enable installing Microsoft propietary and not security supported guest attestation extension and enabling System Assigned Identity for Trusted Launch enabled VMs and VMSS.

Property Value
Default value: False
--enable-osimage-notification

Specify whether the OS Image Scheduled event is enabled or disabled.

Property Value
Accepted values: false, true
--enable-proxy-agent

Specify whether proxy agent feature should be enabled on the virtual machine or virtual machine scale set.

Property Value
Accepted values: false, true
--enable-reboot --enable-user-reboot-scheduled-events

The configuration parameter used while publishing scheduled events additional publishing targets.

Property Value
Accepted values: false, true
--enable-redeploy --enable-user-redeploy-scheduled-events

The configuration parameter used while creating user initiated redeploy scheduled event setting creation.

Property Value
Accepted values: false, true
--enable-resilient-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.

Property Value
Accepted values: false, true
--enable-resilient-deletion

Retry VM Delete requests asynchronously in the event of a failed delete operation.

Property Value
Accepted values: false, true
--enable-secure-boot

Enable secure boot.

Property Value
Accepted values: false, true
--enable-spot-restore

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.

Property Value
Accepted values: false, true
--enable-vtpm

Enable vTPM.

Property Value
Accepted values: false, true
--encryption-at-host

Enable Host Encryption for the VM or VMSS. This will enable the encryption for all the disks including Resource/Temp disk at host itself.

Property Value
Parameter group: Storage Arguments
Accepted values: false, true
--encryption-identity

Resource Id of the user managed identity which can be used for Azure disk encryption.

--ephemeral-os-disk

Allows you to create an OS disk directly on the host node, providing local disk performance and faster VM/VMSS reimage time.

Property Value
Parameter group: Storage Arguments
Accepted values: false, true
--ephemeral-os-disk-placement --ephemeral-placement

Only applicable when used with --ephemeral-os-disk. Allows you to choose the Ephemeral OS disk provisioning location.

Property Value
Parameter group: Storage Arguments
Accepted values: CacheDisk, NvmeDisk, ResourceDisk
--eviction-policy

The eviction policy for virtual machines in a Spot priority scale set. Default eviction policy is Deallocate for a Spot priority scale set.

Property Value
Accepted values: Deallocate, Delete
--exclude-extensions --security-posture-reference-exclude-extensions

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-keys

Generate SSH public and private key files if missing. The keys will be stored in the ~/.ssh directory.

Property Value
Parameter group: Authentication Arguments
Default value: False
--health-probe

Probe name from the existing load balancer, mainly used for rolling upgrade or automatic repairs.

--host-group

Name or ID of dedicated host group that the virtual machine scale set resides in.

--image

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://learn.microsoft.com/azure/virtual-machines/linux/cli-ps-findimage.

Property Value
Value from: az sig image-version show-shared, az vm image list, az vm image show
--imds-access-control-profile-reference-id --imds-profile-id

Specify the access control profile version resource id resource id of imds.

--imds-mode

Specify the mode that proxy agent will execute on if the feature is enabled.

Property Value
Accepted values: Audit, Enforce
--instance-count

Number of VMs in the scale set.

Property Value
Default value: 2
--is-overridable --security-posture-reference-is-overridable

Whether the security posture can be overridden by the user.

Property Value
Accepted values: false, true
--lb --load-balancer

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.

Property Value
Parameter group: Network Balancer Arguments
--lb-nat-rule-name --nat-rule-name

Name to use for the NAT rule v2 when creating a new load balancer. (NAT rule V2 is used to replace NAT pool).

Property Value
Parameter group: Network Balancer Arguments
--lb-sku

Sku of the Load Balancer to create. The public IP is supported to be created on edge zone only when it is 'Standard'.

Property Value
Parameter group: Network Balancer Arguments
Default value: Standard
Accepted values: Basic, Gateway, Standard
--license-type

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.

Property Value
Accepted values: 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 -l

Location in which to create VM and related resources. If default location is not configured, will default to the resource group's location.

--max-batch-instance-percent

The maximum percent of total virtual machine instances that will be upgraded simultaneously by the rolling upgrade in one batch. Default: 20%.

--max-price
Preview

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.

--max-surge
Preview

Specify it to create new virtual machines to upgrade the scale set, rather than updating the existing virtual machines.

Property Value
Accepted values: false, true
--max-unhealthy-instance-percent

The maximum percentage of the total virtual machine instances in the scale set that can be simultaneously unhealthy. Default: 20%.

--max-unhealthy-upgraded-instance-percent

The maximum percentage of upgraded virtual machine instances that can be found to be in an unhealthy state. Default: 20%.

--network-api-version

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.

--no-wait

Do not wait for the long-running operation to finish.

Property Value
Default value: False
--nsg

Name or ID of an existing Network Security Group.

Property Value
Parameter group: Network Arguments
--orchestration-mode

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.

Property Value
Default value: Flexible
Accepted values: Flexible, Uniform
--os-disk-caching

Storage caching type for the VM OS disk. Default: ReadWrite.

Property Value
Parameter group: Storage Arguments
Accepted values: None, ReadOnly, ReadWrite
--os-disk-delete-option

Specify whether OS disk should be deleted or detached upon VMSS Flex deletion (This feature is only for VMSS with flexible orchestration mode).

Property Value
Parameter group: Storage Arguments
Accepted values: Delete, Detach
--os-disk-encryption-set

Name or ID of disk encryption set for OS disk.

Property Value
Parameter group: Storage Arguments
--os-disk-name

The name of the new VM OS disk.

Property Value
Parameter group: Storage Arguments
--os-disk-secure-vm-disk-encryption-set

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.

--os-disk-security-encryption-type

Specify the encryption type of the OS managed disk.

Property Value
Accepted values: DiskWithVMGuestState, NonPersistedTPM, VMGuestStateOnly
--os-disk-size-gb

OS disk size in GB to create.

Property Value
Parameter group: Storage Arguments
--os-type

Type of OS installed on a custom VHD. Do not use when specifying an URN or URN alias.

Property Value
Parameter group: Storage Arguments
Accepted values: linux, windows
--patch-mode

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.

Property Value
Accepted values: AutomaticByOS, AutomaticByPlatform, ImageDefault, Manual
--pause-time-between-batches

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 name.

Property Value
Parameter group: Marketplace Image Plan Arguments
--plan-product

Plan product.

Property Value
Parameter group: Marketplace Image Plan Arguments
--plan-promotion-code

Plan promotion code.

Property Value
Parameter group: Marketplace Image Plan Arguments
--plan-publisher

Plan publisher.

Property Value
Parameter group: Marketplace Image Plan Arguments
--platform-fault-domain-count

Fault Domain count for each placement group in the availability zone.

--ppg

The name or ID of the proximity placement group the VMSS should be associated with.

--prioritize-unhealthy-instances

Set this Boolean property will lead to all unhealthy instances in a scale set getting upgraded before any healthy instances.

Property Value
Accepted values: false, true
--priority

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.

Property Value
Accepted values: Low, Regular, Spot
--proxy-agent-mode
Deprecated

Option '--proxy-agent-mode' has been deprecated and will be removed in a future release. Use '--wire-server-mode' instead.

Specify the mode that proxy agent will execute on if the feature is enabled.

Property Value
Accepted values: Audit, Enforce
--public-ip-address

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 "" or '' for None ('""' in Azure CLI using PowerShell).

Property Value
Parameter group: Network Arguments
--public-ip-address-allocation
Property Value
Parameter group: Network Arguments
Accepted values: dynamic, static
--public-ip-address-dns-name

Globally unique DNS name for a newly created public IP.

Property Value
Parameter group: Network Arguments
--public-ip-per-vm

Each VM instance will have a public ip. For security, you can use '--nsg' to apply appropriate rules.

Property Value
Parameter group: Network Arguments
Default value: False
--regular-priority-count
Preview

The base number of regular priority VMs that will be created in this scale set as it scales out. Must be greater than 0.

--regular-priority-percentage
Preview

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

Role name or id the system assigned identity will have.

Property Value
Parameter group: Managed Service Identity Arguments
--scale-in-policy

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.

Property Value
Accepted values: Default, NewestVM, OldestVM
--scope

Scope that the system assigned identity can access.

Property Value
Parameter group: Managed Service Identity Arguments
--secrets

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)"}] }].

--security-posture-id --security-posture-reference-id

The security posture reference id in the form of /CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest.

--security-type

Specify the security type of the virtual machine scale set. The value Standard can be used if subscription has feature flag UseStandardSecurityType registered under Microsoft.Compute namespace. Refer to https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/preview-features for steps to enable required feature.

Property Value
Accepted values: ConfidentialVM, Standard, TrustedLaunch
--single-placement-group

Limit the scale set to a single placement group. See https://learn.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-placement-groups for details.

Property Value
Accepted values: false, true
--sku-allocat-strat --skuprofile-allocation-strategy

Allocation strategy for vm sizes in SKU profile.

Property Value
Accepted values: CapacityOptimized, LowestPrice, Prioritized
--skuprofile-rank

A list for ranks associated with the SKU profile vm sizes.

--skuprofile-vmsizes

A list of VM sizes in the scale set. See https://azure.microsoft.com/pricing/details/virtual-machines/ for size info.

--specialized

Indicate whether the source image is specialized.

Property Value
Parameter group: Storage Arguments
Accepted values: false, true
--spot-restore-timeout

Timeout value expressed as an ISO 8601 time duration after which the platform will not try to restore the VMSS SPOT instances.

--ssh-dest-key-path

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.

Property Value
Parameter group: Authentication Arguments
--ssh-key-type

Specify the type of SSH public and private key files to be generated if missing.

Property Value
Parameter group: Authentication Arguments
Default value: RSA
Accepted values: Ed25519, RSA
--ssh-key-values

Space-separated list of SSH public keys or public key file paths.

Property Value
Parameter group: Authentication Arguments
--storage-container-name

Only applicable when used with --use-unmanaged-disk. Name of the storage container for the VM OS disk. Default: vhds.

Property Value
Parameter group: Storage Arguments
Default value: vhds
--storage-sku

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.

Property Value
Parameter group: Storage Arguments
--subnet

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.

Property Value
Parameter group: Network Arguments
--subnet-address-prefix

The subnet IP address prefix to use when creating a new VNet in CIDR format.

Property Value
Parameter group: Network Arguments
--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

--terminate-notification-time

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.

--ultra-ssd-enabled

Enables or disables the capability to have 1 or more managed data disks with UltraSSD_LRS storage account.

Property Value
Parameter group: Storage Arguments
Accepted values: false, true
--upgrade-policy-mode

Specify the mode of an upgrade to virtual machines in the scale set.

Property Value
Default value: manual
Accepted values: Automatic, Manual, Rolling
--use-unmanaged-disk

Do not use managed disk to persist VM.

Property Value
Parameter group: Storage Arguments
Default value: False
--user-data

UserData for the virtual machines in the scale set. It can be passed in as file or string.

--v-cpus-available

Specify the number of vCPUs available.

--v-cpus-per-core

Specify the ratio of vCPU to physical core. Setting this property to 1 also means that hyper-threading is disabled.

--validate

Generate and validate the ARM template without creating any resources.

Property Value
Default value: False
--vm-domain-name

Domain name of VM instances, once configured, the FQDN is vm<vm-index>.<vm-domain-name>.<..rest..>.

Property Value
Parameter group: Network Arguments
--vm-sku
Deprecated

The default value of '--vm-sku' will be changed to 'Standard_D2s_v5' from 'Standard_DS1_v2' in a future release.

Size of VMs in the scale set. Default to "Standard_DS1_v2". See https://azure.microsoft.com/pricing/details/virtual-machines/ for size info.

--vnet-address-prefix

The IP address prefix to use when creating a new VNet in CIDR format.

Property Value
Parameter group: Network Arguments
Default value: 10.0.0.0/16
--vnet-name

Name of the virtual network when creating a new one or referencing an existing one.

Property Value
Parameter group: Network Arguments
--wire-server-access-control-profile-reference-id --wire-server-profile-id

Specify the access control profile version resource id of wire server.

--wire-server-mode

Specify the mode that proxy agent will execute on if the feature is enabled.

Property Value
Accepted values: Audit, Enforce
--zone-balance

Whether to force strictly even Virtual Machine distribution cross x-zones in case there is zone outage.

Property Value
Accepted values: false, true
--zones -z

Space-separated list of availability zones into which to provision the resource.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

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

--name -n

Scale set name. You can configure the default using az configure --defaults vmss=<name>.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--hibernate

Hibernate a virtual machine from the VM scale set. Available for VMSS with Flexible OrchestrationMode only.

Property Value
Accepted values: false, true
--instance-ids

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.

--no-wait

Do not wait for the long-running operation to finish.

Property Value
Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

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 --vm-scale-set-name]
               [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
               [--resource-group]
               [--subscription]

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--force-deletion

Optional parameter to force delete a VM scale set. (Feature in Preview).

Property Value
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--ids

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.

Property Value
Parameter group: Resource Id Arguments
--name --vm-scale-set-name -n

The name of the VM scale set.

Property Value
Parameter group: Resource Id Arguments
--no-wait

Do not wait for the long-running operation to finish.

Property Value
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

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

--instance-ids

Space-separated list of IDs (ex: 1 2 3 ...) or * for all instances.

--name -n

Scale set name. You can configure the default using az configure --defaults vmss=<name>.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--no-wait

Do not wait for the long-running operation to finish.

Property Value
Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

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

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--ids

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.

Property Value
Parameter group: Resource Id Arguments
--instance-id

A VM instance ID or "*" to list instance view for all VMs in a scale set.

Property Value
Parameter group: Resource Id Arguments
--name -n

Scale set name. You can configure the default using az configure --defaults vmss=<name>.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az vmss get-os-upgrade-history

List the OS upgrades on a VM scale set instance.

az vmss get-os-upgrade-history --name --vm-scale-set-name
                               --resource-group
                               [--max-items]
                               [--next-token]

Required Parameters

--name --vm-scale-set-name -n

The name of the VM scale set.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--max-items

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.

Property Value
Parameter group: Pagination Arguments
--next-token

Token to specify where to start paginating. This is the token value from a previously truncated response.

Property Value
Parameter group: Pagination Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

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

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--max-items

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.

Property Value
Parameter group: Pagination Arguments
--next-token

Token to specify where to start paginating. This is the token value from a previously truncated response.

Property Value
Parameter group: Pagination Arguments
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

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

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--ids

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.

Property Value
Parameter group: Resource Id Arguments
--name -n

Scale set name. You can configure the default using az configure --defaults vmss=<name>.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

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

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--ids

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.

Property Value
Parameter group: Resource Id Arguments
--name -n

Scale set name. You can configure the default using az configure --defaults vmss=<name>.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

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 --virtual-machine-scale-set-name
                       --resource-group
                       [--expand]
                       [--filter]
                       [--max-items]
                       [--next-token]
                       [--select]

Required Parameters

--name --virtual-machine-scale-set-name -n

The name of the VM scale set.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--expand

The expand expression to apply to the operation. Allowed values are 'instanceView'.

--filter

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'.

--max-items

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.

Property Value
Parameter group: Pagination Arguments
--next-token

Token to specify where to start paginating. This is the token value from a previously truncated response.

Property Value
Parameter group: Pagination Arguments
--select

The list parameters. Allowed values are 'instanceView', 'instanceView/statuses'.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

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 --vm-scale-set-name
                  --resource-group
                  [--max-items]
                  [--next-token]

Required Parameters

--name --vm-scale-set-name -n

The name of the VM scale set.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--max-items

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.

Property Value
Parameter group: Pagination Arguments
--next-token

Token to specify where to start paginating. This is the token value from a previously truncated response.

Property Value
Parameter group: Pagination Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

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://learn.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications.

az vmss perform-maintenance [--ids]
                            [--instance-ids]
                            [--name --vm-scale-set-name]
                            [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                            [--resource-group]
                            [--subscription]

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--ids

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.

Property Value
Parameter group: Resource Id Arguments
--instance-ids

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.

Property Value
Parameter group: VmInstanceIDs Arguments
--name --vm-scale-set-name -n

The name of the VM scale set.

Property Value
Parameter group: Resource Id Arguments
--no-wait

Do not wait for the long-running operation to finish.

Property Value
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az vmss reimage

Reimage VMs within a VMSS.

az vmss reimage [--force-update-os-disk-for-ephemeral --update-os-disk {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

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--force-update-os-disk-for-ephemeral --update-os-disk

Force update ephemeral OS disk for a virtual machine scale set VM.

Property Value
Accepted values: false, true
--ids

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.

Property Value
Parameter group: Resource Id Arguments
--instance-ids

Space-separated list of VM instance ID. If missing, reimage all instances.

--name -n

Scale set name. You can configure the default using az configure --defaults vmss=<name>.

Property Value
Parameter group: Resource Id Arguments
--no-wait

Do not wait for the long-running operation to finish.

Property Value
Default value: False
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

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

--name -n

Scale set name. You can configure the default using az configure --defaults vmss=<name>.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--instance-ids

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.

--no-wait

Do not wait for the long-running operation to finish.

Property Value
Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

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

--new-capacity

Number of VMs in the VMSS.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--ids

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.

Property Value
Parameter group: Resource Id Arguments
--name -n

Scale set name. You can configure the default using az configure --defaults vmss=<name>.

Property Value
Parameter group: Resource Id Arguments
--no-wait

Do not wait for the long-running operation to finish.

Property Value
Default value: False
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

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

--action

The action to be performed.

Property Value
Accepted values: Resume, Suspend
--service-name

The name of the orchestration service.

Property Value
Accepted values: AutomaticRepairs, DummyOrchestrationServiceName

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--ids

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.

Property Value
Parameter group: Resource Id Arguments
--name -n

Scale set name. You can configure the default using az configure --defaults vmss=<name>.

Property Value
Parameter group: Resource Id Arguments
--no-wait

Do not wait for the long-running operation to finish.

Property Value
Default value: False
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

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

--name -n

Scale set name. You can configure the default using az configure --defaults vmss=<name>.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--include-user-data -u

Include the user data properties in the query result.

Property Value
Default value: False
--instance-id

VM instance ID. If missing, show the VMSS.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

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 --vm-scale-set-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

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--ids

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.

Property Value
Parameter group: Resource Id Arguments
--instance-id

The instance ID of the virtual machine.

Property Value
Parameter group: Resource Id Arguments
--name --vm-scale-set-name -n

The name of the VM scale set.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

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

--name -n

Scale set name. You can configure the default using az configure --defaults vmss=<name>.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--instance-ids

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.

--no-wait

Do not wait for the long-running operation to finish.

Property Value
Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

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

--name -n

Scale set name. You can configure the default using az configure --defaults vmss=<name>.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--instance-ids

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.

--no-wait

Do not wait for the long-running operation to finish.

Property Value
Default value: False
--skip-shutdown

Skip shutdown and power-off immediately.

Property Value
Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

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 --additional-scheduled-events {false, true}]
               [--automatic-repairs-action {Reimage, Replace, Restart}]
               [--automatic-repairs-grace-period]
               [--automatic-zone-balancing-behavior --balancing-behavior {CreateBeforeDelete}]
               [--automatic-zone-balancing-strategy --balancing-strategy {Recreate}]
               [--capacity-reservation-group --crg]
               [--custom-data]
               [--disk-controller-type {NVMe, SCSI}]
               [--enable-auto-os-upgrade {false, true}]
               [--enable-automatic-repairs {false, true}]
               [--enable-automatic-zone-balancing --enable-zone-balancing {false, true}]
               [--enable-cross-zone-upgrade {false, true}]
               [--enable-hibernation {false, true}]
               [--enable-osimage-notification {false, true}]
               [--enable-proxy-agent {false, true}]
               [--enable-reboot --enable-user-reboot-scheduled-events {false, true}]
               [--enable-redeploy --enable-user-redeploy-scheduled-events {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 --ephemeral-os-disk-option {Local}]
               [--ephemeral-os-disk {false, true}]
               [--ephemeral-os-disk-placement --ephemeral-placement {CacheDisk, NvmeDisk, ResourceDisk}]
               [--exclude-extensions --security-posture-reference-exclude-extensions]
               [--force-deletion]
               [--force-string]
               [--ids]
               [--imds-access-control-profile-reference-id --imds-profile-id]
               [--imds-mode {Audit, Enforce}]
               [--instance-id]
               [--is-overridable --security-posture-reference-is-overridable {false, true}]
               [--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-posture-reference-id]
               [--security-type {ConfidentialVM, Standard, TrustedLaunch}]
               [--set]
               [--sku-allocat-strat --skuprofile-allocation-strategy {CapacityOptimized, LowestPrice, Prioritized}]
               [--skuprofile-rank]
               [--skuprofile-vmsizes]
               [--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]
               [--wire-server-access-control-profile-reference-id --wire-server-profile-id]
               [--wire-server-mode {Audit, Enforce}]
               [--zone-balance {false, true}]
               [--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

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--add

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>.

Property Value
Parameter group: Generic Update Arguments
Default value: []
--additional-events --additional-scheduled-events

The configuration parameter used while creating event grid and resource graph scheduled event setting.

Property Value
Accepted values: false, true
--automatic-repairs-action

Type of repair action that will be used for repairing unhealthy virtual machines in the scale set.

Property Value
Parameter group: Automatic Repairs Arguments
Accepted values: Reimage, Replace, Restart
--automatic-repairs-grace-period

The amount of time (in minutes, between 30 and 90) for which automatic repairs are suspended due to a state change on VM.

Property Value
Parameter group: Automatic Repairs Arguments
--automatic-zone-balancing-behavior --balancing-behavior

Type of rebalance behavior that will be used for recreating virtualmachines in the scale set across availability zones.

Property Value
Accepted values: CreateBeforeDelete
--automatic-zone-balancing-strategy --balancing-strategy

Type of rebalance strategy that will be used for rebalancing virtualmachines in the scale set across availability zones.

Property Value
Accepted values: Recreate
--capacity-reservation-group --crg
Preview

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-data

Custom init script file or text (cloud-init, cloud-config, etc..).

--disk-controller-type
Preview

Specify the disk controller type configured for the VM or VMSS.

Property Value
Parameter group: Storage Arguments
Accepted values: NVMe, SCSI
--enable-auto-os-upgrade

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.

Property Value
Accepted values: false, true
--enable-automatic-repairs

Enable automatic repairs.

Property Value
Parameter group: Automatic Repairs Arguments
Accepted values: false, true
--enable-automatic-zone-balancing --enable-zone-balancing

Specify whether automatic AZ balancing should be enabled on the virtualmachine scale set.

Property Value
Accepted values: false, true
--enable-cross-zone-upgrade

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.

Property Value
Accepted values: false, true
--enable-hibernation

The flag that enable or disable hibernation capability on the VMSS.

Property Value
Accepted values: false, true
--enable-osimage-notification

Specify whether the OS Image Scheduled event is enabled or disabled.

Property Value
Accepted values: false, true
--enable-proxy-agent

Specify whether proxy agent feature should be enabled on the virtual machine or virtual machine scale set.

Property Value
Accepted values: false, true
--enable-reboot --enable-user-reboot-scheduled-events

The configuration parameter used while publishing scheduled events additional publishing targets.

Property Value
Accepted values: false, true
--enable-redeploy --enable-user-redeploy-scheduled-events

The configuration parameter used while creating user initiated redeploy scheduled event setting creation.

Property Value
Accepted values: false, true
--enable-resilient-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.

Property Value
Accepted values: false, true
--enable-resilient-deletion

Retry VM Delete requests asynchronously in the event of a failed delete operation.

Property Value
Accepted values: false, true
--enable-secure-boot

Enable secure boot.

Property Value
Accepted values: false, true
--enable-spot-restore

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.

Property Value
Accepted values: false, true
--enable-terminate-notification

Enable terminate notification.

Property Value
Accepted values: false, true
--enable-vtpm

Enable vTPM.

Property Value
Accepted values: false, true
--ephemeral-option --ephemeral-os-disk-option

Specify the ephemeral disk settings for operating system disk.

Property Value
Accepted values: Local
--ephemeral-os-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.

Property Value
Accepted values: false, true
--ephemeral-os-disk-placement --ephemeral-placement

Only applicable when used with --vm-sku. Allows you to choose the Ephemeral OS disk provisioning location.

Property Value
Accepted values: CacheDisk, NvmeDisk, ResourceDisk
--exclude-extensions --security-posture-reference-exclude-extensions

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.

--force-deletion
Preview

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.

--force-string

When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.

Property Value
Parameter group: Generic Update Arguments
Default value: False
--ids

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.

Property Value
Parameter group: Resource Id Arguments
--imds-access-control-profile-reference-id --imds-profile-id

Specify the access control profile version resource id resource id of imds.

--imds-mode

Specify the mode that proxy agent will execute on if the feature is enabled.

Property Value
Accepted values: Audit, Enforce
--instance-id

Update the VM instance with this ID. If missing, update the VMSS.

Property Value
Parameter group: Resource Id Arguments
--is-overridable --security-posture-reference-is-overridable

Whether the security posture can be overridden by the user.

Property Value
Accepted values: false, true
--license-type

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.

Property Value
Accepted values: 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

The maximum percent of total virtual machine instances that will be upgraded simultaneously by the rolling upgrade in one batch. Default: 20%.

--max-price
Preview

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.

--max-surge
Preview

Specify it to create new virtual machines to upgrade the scale set, rather than updating the existing virtual machines.

Property Value
Accepted values: false, true
--max-unhealthy-instance-percent

The maximum percentage of the total virtual machine instances in the scale set that can be simultaneously unhealthy. Default: 20%.

--max-unhealthy-upgraded-instance-percent

The maximum percentage of upgraded virtual machine instances that can be found to be in an unhealthy state. Default: 20%.

--name -n

Scale set name. You can configure the default using az configure --defaults vmss=<name>.

Property Value
Parameter group: Resource Id Arguments
--no-wait

Do not wait for the long-running operation to finish.

Property Value
Default value: False
--pause-time-between-batches

The wait time between completing the update for all virtual machines in one batch and starting the next batch. Default: 0 seconds.

--ppg

The name or ID of the proximity placement group the VMSS should be associated with.

--prioritize-unhealthy-instances

Set this Boolean property will lead to all unhealthy instances in a scale set getting upgraded before any healthy instances.

Property Value
Accepted values: false, true
--priority

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.

Property Value
Accepted values: Low, Regular, Spot
--protect-from-scale-in

Protect the VM instance from scale-in operations.

Property Value
Parameter group: Protection Policy Arguments
Accepted values: false, true
--protect-from-scale-set-actions

Protect the VM instance from scale set actions (including scale-in).

Property Value
Parameter group: Protection Policy Arguments
Accepted values: false, true
--proxy-agent-mode
Deprecated

Option '--proxy-agent-mode' has been deprecated and will be removed in a future release. Use '--wire-server-mode' instead.

Specify the mode that proxy agent will execute on if the feature is enabled.

Property Value
Accepted values: Audit, Enforce
--regular-priority-count
Preview

The base number of regular priority VMs that will be created in this scale set as it scales out. Must be greater than 0.

--regular-priority-percentage
Preview

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

Remove a property or an element from a list. Example: --remove property.list <indexToRemove> OR --remove propertyToRemove.

Property Value
Parameter group: Generic Update Arguments
Default value: []
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--scale-in-policy

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.

Property Value
Accepted values: Default, NewestVM, OldestVM
--security-posture-id --security-posture-reference-id

The security posture reference id in the form of /CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest.

--security-type

Specify the security type of the virtual machine scale set. The value Standard can be used if subscription has feature flag UseStandardSecurityType registered under Microsoft.Compute namespace. Refer to https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/preview-features for steps to enable required feature.

Property Value
Accepted values: ConfidentialVM, Standard, TrustedLaunch
--set

Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>.

Property Value
Parameter group: Generic Update Arguments
Default value: []
--sku-allocat-strat --skuprofile-allocation-strategy

Allocation strategy for vm sizes in SKU profile.

Property Value
Accepted values: CapacityOptimized, LowestPrice, Prioritized
--skuprofile-rank

A list for ranks associated with the SKU profile vm sizes.

--skuprofile-vmsizes

A list of VM sizes in the scale set. See https://azure.microsoft.com/pricing/details/virtual-machines/ for size info.

--spot-restore-timeout

Timeout value expressed as an ISO 8601 time duration after which the platform will not try to restore the VMSS SPOT instances.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
--terminate-notification-time

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.

--ultra-ssd-enabled

Enables or disables the capability to have 1 or more managed data disks with UltraSSD_LRS storage account.

Property Value
Accepted values: false, true
--upgrade-policy-mode

Specify the mode of an upgrade to virtual machines in the scale set.

Property Value
Accepted values: Automatic, Manual, Rolling
--user-data

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.

--v-cpus-available

Specify the number of vCPUs available.

--v-cpus-per-core

Specify the ratio of vCPU to physical core. Setting this property to 1 also means that hyper-threading is disabled.

--vm-sku
Preview

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.

--wire-server-access-control-profile-reference-id --wire-server-profile-id

Specify the access control profile version resource id of wire server.

--wire-server-mode

Specify the mode that proxy agent will execute on if the feature is enabled.

Property Value
Accepted values: Audit, Enforce
--zone-balance

Whether to force strictly even Virtual Machine distribution cross x-zones in case there is zone outage.

Property Value
Accepted values: false, true
--zones -z

Space-separated list of availability zones into which to provision the resource.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

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

--platform-update-domain

The platform update domain for which a manual recovery walk is requested.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--ids

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.

Property Value
Parameter group: Resource Id Arguments
--placement-group-id

The placement group id for which the manual recovery walk is requested.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
--vmss-name

The name of the VM scale set.

Property Value
Parameter group: Resource Id Arguments
--zone

The zone in which the manual recovery walk is requested for cross zone virtual machine scale set.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

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

--instance-ids

Space-separated list of IDs (ex: 1 2 3 ...) or * for all instances.

--name -n

Scale set name. You can configure the default using az configure --defaults vmss=<name>.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--no-wait

Do not wait for the long-running operation to finish.

Property Value
Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

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

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--created

Wait until created with 'provisioningState' at 'Succeeded'.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
--custom

Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].

Property Value
Parameter group: Wait Condition Arguments
--deleted

Wait until deleted.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
--exists

Wait until the resource exists.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
--ids

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.

Property Value
Parameter group: Resource Id Arguments
--instance-id

Wait on the VM instance with this ID. If missing, wait on the VMSS.

Property Value
Parameter group: Resource Id Arguments
--interval

Polling interval in seconds.

Property Value
Parameter group: Wait Condition Arguments
Default value: 30
--name -n

Scale set name. You can configure the default using az configure --defaults vmss=<name>.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Property Value
Parameter group: Resource Id Arguments
--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Property Value
Parameter group: Resource Id Arguments
--timeout

Maximum wait in seconds.

Property Value
Parameter group: Wait Condition Arguments
Default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False