az vmss

Manage groupings of virtual machines in an Azure Virtual Machine Scale Set (VMSS).

Commands

az vmss application

Manage applications for VM scale set.

az vmss application list

List applications for VMSS.

az vmss application set

Set applications for VMSS.

az vmss create

Create an Azure Virtual Machine Scale Set.

az vmss deallocate

Deallocate VMs within a VMSS.

az vmss delete

Deletes a VM scale set.

az vmss delete-instances

Delete VMs within a VMSS.

az vmss diagnostics

Configure the Azure Virtual Machine Scale Set diagnostics extension.

az vmss diagnostics get-default-config

Show the default config file which defines data to be collected.

az vmss diagnostics set

Enable diagnostics on a VMSS.

az vmss disk

Manage data disks of a VMSS.

az vmss disk attach

Attach managed data disks to a scale set or its instances.

az vmss disk detach

Detach managed data disks from a scale set or its instances.

az vmss encryption

Manage encryption of VMSS.

az vmss encryption disable

Disable the encryption on a VMSS with managed disks.

az vmss encryption enable

Encrypt a VMSS with managed disks.

az vmss encryption show

Show encryption status.

az vmss extension

Manage extensions on a VM scale set.

az vmss extension delete

Delete an extension from a VMSS.

az vmss extension image

Find the available VM extensions for a subscription and region.

az vmss extension image list

List the information on available extensions.

az vmss extension image list-names

Gets a list of virtual machine extension image types.

az vmss extension image list-versions

Gets a list of virtual machine extension image versions.

az vmss extension image show

Gets a virtual machine extension image.

az vmss extension list

List extensions associated with a VMSS.

az vmss extension set

Add an extension to a VMSS or update an existing extension.

az vmss extension show

Show details on a VMSS extension.

az vmss extension upgrade

Upgrade all extensions for all VMSS instances to the latest version.

az vmss get-instance-view

View an instance of a VMSS.

az vmss get-os-upgrade-history

Gets list of OS upgrades on a VM scale set instance.

az vmss identity

Manage service identities of a VM scaleset.

az vmss identity assign

Enable managed service identity on a VMSS.

az vmss identity remove

Remove user assigned identities from a VM scaleset.

az vmss identity show

Display VM scaleset's managed identity info.

az vmss list

List VMSS.

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-public-ips

List public IP addresses of VM instances within a set.

az vmss list-instances

Get a list of all virtual machines in a VM scale sets.

az vmss list-skus

Gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances allowed for each SKU.

az vmss nic

Manage network interfaces of a VMSS.

az vmss nic list

Gets all network interfaces in a virtual machine scale set.

az vmss nic list-vm-nics

Gets information about all network interfaces in a virtual machine in a virtual machine scale set.

az vmss nic show

Get the specified network interface in a virtual machine scale set.

az vmss perform-maintenance

Perform maintenance on one or more virtual machines in a VM scale set.

az vmss reimage

Reimage VMs within a VMSS.

az vmss restart

Restart VMs within a VMSS.

az vmss rolling-upgrade

Manage rolling upgrades.

az vmss rolling-upgrade cancel

Cancels the current virtual machine scale set rolling upgrade.

az vmss rolling-upgrade get-latest

Gets the status of the latest virtual machine scale set rolling upgrade.

az vmss rolling-upgrade start

Starts a rolling upgrade to move all virtual machine scale set instances to the latest available Platform Image OS version.

az vmss run-command

Manage run commands on a Virtual Machine Scale Set.

az vmss run-command create

The operation to Create the VMSS VM run command.

az vmss run-command delete

The operation to delete the run command.

az vmss run-command invoke

Execute a specific run command on a Virtual Machine Scale Set instance.

az vmss run-command list

The operation to get all run commands of an instance in Virtual Machine Scaleset.

az vmss run-command show

The operation to get the VMSS run command.

az vmss run-command update

The operation to update the VMSS run command.

az vmss scale

Change the number of VMs within a VMSS.

az vmss set-orchestration-service-state

Change ServiceState property for a given service within a VMSS.

az vmss show

Get details on VMs within a VMSS.

az vmss simulate-eviction

Simulate the eviction of a Spot virtual machine in a VM scale set.

az vmss start

Start VMs within a VMSS.

az vmss stop

Power off (stop) VMs within a VMSS.

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

Upgrade VMs within a VMSS.

az vmss wait

Place the CLI in a waiting state until a condition of a scale set is met.

az vmss create

Create an Azure Virtual Machine Scale Set.

For an end-to-end tutorial, see https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-linux-create-cli.

az vmss create --name
               --resource-group
               [--accelerated-networking {false, true}]
               [--accept-term]
               [--admin-password]
               [--admin-username]
               [--app-gateway]
               [--app-gateway-capacity]
               [--app-gateway-sku]
               [--app-gateway-subnet-address-prefix]
               [--asgs]
               [--assign-identity]
               [--authentication-type {all, password, ssh}]
               [--automatic-repairs-action {Reimage, Replace, Restart}]
               [--automatic-repairs-grace-period]
               [--backend-pool-name]
               [--backend-port]
               [--capacity-reservation-group]
               [--computer-name-prefix]
               [--custom-data]
               [--data-disk-caching]
               [--data-disk-encryption-sets]
               [--data-disk-iops]
               [--data-disk-mbps]
               [--data-disk-sizes-gb]
               [--disable-integrity-monitoring]
               [--disable-overprovision]
               [--dns-servers]
               [--edge-zone]
               [--enable-agent {false, true}]
               [--enable-auto-update {false, true}]
               [--enable-cross-zone-upgrade {false, true}]
               [--enable-secure-boot {false, true}]
               [--enable-spot-restore {false, true}]
               [--enable-vtpm {false, true}]
               [--encryption-at-host {false, true}]
               [--ephemeral-os-disk {false, true}]
               [--ephemeral-os-disk-placement {CacheDisk, ResourceDisk}]
               [--eviction-policy {Deallocate, Delete}]
               [--generate-ssh-keys]
               [--health-probe]
               [--host-group]
               [--image]
               [--instance-count]
               [--lb]
               [--lb-nat-pool-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, Windows_Client, Windows_Server}]
               [--location]
               [--max-batch-instance-percent]
               [--max-price]
               [--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-encryption-set]
               [--os-disk-name]
               [--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}]
               [--public-ip-address]
               [--public-ip-address-allocation {dynamic, static}]
               [--public-ip-address-dns-name]
               [--public-ip-per-vm]
               [--role]
               [--scale-in-policy {Default, NewestVM, OldestVM}]
               [--scope]
               [--secrets]
               [--security-type {TrustedLaunch}]
               [--single-placement-group {false, true}]
               [--specialized {false, true}]
               [--spot-restore-timeout]
               [--ssh-dest-key-path]
               [--ssh-key-values]
               [--storage-container-name]
               [--storage-sku]
               [--subnet]
               [--subnet-address-prefix]
               [--tags]
               [--terminate-notification-time]
               [--ultra-ssd-enabled {false, true}]
               [--upgrade-policy-mode {Automatic, Manual, Rolling}]
               [--use-unmanaged-disk]
               [--user-data]
               [--v-cpus-available]
               [--v-cpus-per-core]
               [--validate]
               [--vm-domain-name]
               [--vm-sku]
               [--vnet-address-prefix]
               [--vnet-name]
               [--zones {1, 2, 3}]

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 UbuntuLTS \
    --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 centos \
    --public-ip-per-vm --vm-domain-name myvmss --dns-servers 10.0.0.6 10.0.0.5

Create a Linux VM scale set using a cloud-init script for configuration. See: https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init

az vmss create -g MyResourceGroup -n MyVmss --image debian --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 Debian 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 debian --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 centos --assign-identity --scope /subscriptions/99999999-1bf0-4dda-aec3-cb9272f09590/MyResourceGroup/myRG/providers/Microsoft.Storage/storageAccounts/storage1 --role Contributor

Create a debian VM scaleset with a user assigned identity.

az vmss create -n MyVmss -g rg1 --image debian --assign-identity  /subscriptions/99999999-1bf0-4dda-aec3-cb9272f09590/resourcegroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myID

Create a debian VM scaleset with both system and user assigned identity.

az vmss create -n MyVmss -g rg1 --image debian --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 Centos --zones 1

Create a VMSS that supports SpotRestore.

az vmss create -n MyVmss -g MyResourceGroup  --location NorthEurope --instance-count 2 --image Centos --priority Spot --eviction-policy Deallocate --single-placement-group --enable-spot-restore True --spot-restore-timeout PT1H

Create a VMSS from shared gallery image. (private preview feature, please contact shared image gallery team by email sigpmdev@microsoft.com to register for preview if you're interested in using this feature).

az vmss create -n MyVmss -g MyResourceGroup --image /SharedGalleries/{gallery_unique_name}/Images/{image}/Versions/{version}

Create a VMSS from community gallery image (private preview feature, please contact community image gallery team by email sigpmdev@microsoft.com to register for preview if you're interested in using this feature).

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

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

--accelerated-networking

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

accepted values: false, true
--accept-term

Accept the license agreement and privacy statement.

--admin-password

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

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

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

--app-gateway-capacity

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

default value: 10
--app-gateway-sku

SKU when creating a new application gateway.

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.

--asgs

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

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

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

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.

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.

--backend-pool-name

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

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

--capacity-reservation-group --crg

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.

--data-disk-encryption-sets

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

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

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

--data-disk-sizes-gb

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

--disable-integrity-monitoring

Disable the default behavior of installing guest attestation extension and enabling System Assigned Identity for Trusted Launch enabled VMs and VMSS.

--disable-overprovision
--dns-servers

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

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

accepted values: false, true
--enable-auto-update

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

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.

accepted values: false, true
--enable-secure-boot

Enable secure boot.

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.

accepted values: false, true
--enable-vtpm

Enable vTPM.

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.

accepted values: false, true
--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.

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.

accepted values: CacheDisk, 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.

accepted values: Deallocate, Delete
--generate-ssh-keys

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

--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. Valid URN format: "Publisher:Offer:Sku:Version".

value from: az vm image list, az vm image show, az sig image-version show-shared
--instance-count

Number of VMs in the scale set.

default value: 2
--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.

--lb-nat-pool-name --nat-pool-name

Name to use for the NAT pool when creating a new load balancer.

--lb-sku

Sku of the Load Balancer to create. Default to 'Standard' when single placement group is turned off; otherwise, default to 'Basic'. The public IP is supported to be created on edge zone only when it is '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.

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

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

--nsg

Name or ID of an existing Network Security Group.

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

accepted values: Flexible, Uniform
default value: Uniform
--os-disk-caching

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

accepted values: None, ReadOnly, ReadWrite
--os-disk-encryption-set

Name or ID of disk encryption set for OS disk.

--os-disk-name

The name of the new VM OS disk.

--os-disk-size-gb

OS disk size in GB to create.

--os-type

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

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.

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.

--plan-product

Plan product.

--plan-promotion-code

Plan promotion code.

--plan-publisher

Plan publisher.

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

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.

accepted values: Low, Regular, Spot
--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 "" for None ('""' in Azure CLI using PowerShell or --% operator).

--public-ip-address-allocation
accepted values: dynamic, static
--public-ip-address-dns-name

Globally unique DNS name for a newly created public IP.

--public-ip-per-vm

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

--role

Role name or id the system assigned identity will have.

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

accepted values: Default, NewestVM, OldestVM
--scope

Scope that the system assigned identity can access.

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

Specify if the VM is Trusted Launch enabled. See https://docs.microsoft.com/azure/virtual-machines/trusted-launch.

accepted values: TrustedLaunch
--single-placement-group

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

accepted values: false, true
--specialized

Indicate whether the source image is specialized.

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.

--ssh-key-values

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

--storage-container-name

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

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.

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

--subnet-address-prefix

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

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

accepted values: false, true
--upgrade-policy-mode
accepted values: Automatic, Manual, Rolling
default value: manual
--use-unmanaged-disk

Do not use managed disk to persist VM.

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

--vm-domain-name

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

--vm-sku

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.

default value: 10.0.0.0/16
--vnet-name

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

--zones -z

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

accepted values: 1, 2, 3

az vmss deallocate

Deallocate VMs within a VMSS.

az vmss deallocate --name
                   --resource-group
                   [--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

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

az vmss delete

Deletes a VM scale set.

az vmss delete [--force-deletion]
               [--ids]
               [--name]
               [--no-wait]
               [--resource-group]

Optional Parameters

--force-deletion

Optional parameter to force delete a VM scale set. (Feature in Preview). Default value is None.

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

--name -n

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

--no-wait

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

--resource-group -g

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

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

--no-wait

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

az vmss get-instance-view

View an instance of a VMSS.

az vmss get-instance-view [--ids]
                          [--instance-id]
                          [--name]
                          [--resource-group]

Examples

View an instance of a VMSS. (autogenerated)

az vmss get-instance-view --name MyScaleSet --resource-group MyResourceGroup

Optional Parameters

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

--instance-id

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

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

az vmss get-os-upgrade-history

Gets list of OS upgrades on a VM scale set instance.

az vmss get-os-upgrade-history [--ids]
                               [--name]
                               [--resource-group]

Optional Parameters

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

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

az vmss list

List VMSS.

az vmss list [--resource-group]

Examples

List VMSS (autogenerated)

az vmss list --resource-group MyResourceGroup

Optional Parameters

--resource-group -g

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

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]

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

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

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

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]

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

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

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

az vmss list-instances

Get a list of 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 [--expand]
                       [--filter]
                       [--ids]
                       [--name]
                       [--resource-group]
                       [--select]

Optional Parameters

--expand

The expand expression to apply to the operation. Allowed values are 'instanceView'. Default value is None.

--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'. Default value is None.

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

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

--select

The list parameters. Allowed values are 'instanceView', 'instanceView/statuses'. Default value is None.

az vmss list-skus

Gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances allowed for each SKU.

az vmss list-skus [--ids]
                  [--name]
                  [--resource-group]

Optional Parameters

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

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

az vmss perform-maintenance

Perform maintenance on one or more virtual machines in a VM scale set.

Operation on instances which are not eligible for perform maintenance will be failed. Please refer to best practices for more details: https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications.

az vmss perform-maintenance [--ids]
                            [--name]
                            [--resource-group]
                            [--vm-instance-i-ds]

Optional Parameters

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

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

--vm-instance-i-ds

A list of virtual machine instance IDs from the VM scale set. Default value is None.

az vmss reimage

Reimage VMs within a VMSS.

az vmss reimage [--ids]
                [--instance-id]
                [--name]
                [--no-wait]
                [--resource-group]

Examples

Reimage VMs within a VMSS. (autogenerated)

az vmss reimage --instance-id 1 --name MyScaleSet --resource-group MyResourceGroup --subscription MySubscription

Optional Parameters

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

--instance-id

VM instance ID. If missing, reimage all instances.

--name -n

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

--no-wait

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

--resource-group -g

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

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

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

az vmss scale

Change the number of VMs within a VMSS.

az vmss scale --new-capacity
              [--ids]
              [--name]
              [--no-wait]
              [--resource-group]

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

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

--name -n

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

--no-wait

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

--resource-group -g

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

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}
                                        [--ids]
                                        [--name]
                                        [--no-wait]
                                        [--resource-group]

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.

accepted values: Resume, Suspend
--service-name

The name of the orchestration service.

accepted values: AutomaticRepairs

Optional Parameters

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

--name -n

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

--no-wait

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

--resource-group -g

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

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

--include-user-data -u

Include the user data properties in the query result.

--instance-id

VM instance ID. If missing, show the VMSS.

az vmss simulate-eviction

Simulate the eviction of a Spot virtual machine in a VM scale set.

az vmss simulate-eviction --instance-id
                          --name
                          --resource-group

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

Required Parameters

--instance-id

The instance ID of the virtual machine.

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

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

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

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

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

--skip-shutdown

Skip shutdown and power-off immediately.

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]
               [--automatic-repairs-action {Reimage, Replace, Restart}]
               [--automatic-repairs-grace-period]
               [--capacity-reservation-group]
               [--enable-automatic-repairs {false, true}]
               [--enable-cross-zone-upgrade {false, true}]
               [--enable-secure-boot {false, true}]
               [--enable-spot-restore {false, true}]
               [--enable-terminate-notification {false, true}]
               [--enable-vtpm {false, true}]
               [--ephemeral-os-disk-placement {CacheDisk, ResourceDisk}]
               [--force-deletion]
               [--force-string]
               [--ids]
               [--instance-id]
               [--license-type {None, RHEL_BASE, RHEL_BASESAPAPPS, RHEL_BASESAPHA, RHEL_BYOS, RHEL_ELS_6, RHEL_EUS, RHEL_SAPAPPS, RHEL_SAPHA, SLES, SLES_BYOS, SLES_HPC, SLES_SAP, SLES_STANDARD, Windows_Client, Windows_Server}]
               [--max-batch-instance-percent]
               [--max-price]
               [--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}]
               [--remove]
               [--resource-group]
               [--scale-in-policy {Default, NewestVM, OldestVM}]
               [--set]
               [--spot-restore-timeout]
               [--terminate-notification-time]
               [--ultra-ssd-enabled {false, true}]
               [--user-data]
               [--v-cpus-available]
               [--v-cpus-per-core]
               [--vm-sku]

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

Optional Parameters

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

--automatic-repairs-action

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

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.

--capacity-reservation-group --crg

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.

--enable-automatic-repairs

Enable automatic repairs.

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.

accepted values: false, true
--enable-secure-boot

Enable secure boot.

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.

accepted values: false, true
--enable-terminate-notification

Enable terminate notification.

accepted values: false, true
--enable-vtpm

Enable vTPM.

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.

accepted values: CacheDisk, ResourceDisk
--force-deletion

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.

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

--instance-id

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

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

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

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

--no-wait

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

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

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.

accepted values: Low, Regular, Spot
--protect-from-scale-in

Protect the VM instance from scale-in operations.

accepted values: false, true
--protect-from-scale-set-actions

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

accepted values: false, true
--remove

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

--resource-group -g

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

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

accepted values: Default, NewestVM, OldestVM
--set

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

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

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

accepted values: false, true
--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

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.

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

--no-wait

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

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]
             [--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

--created

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

--custom

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

--deleted

Wait until deleted.

--exists

Wait until the resource exists.

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

--instance-id

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

--interval

Polling interval in seconds.

default value: 30
--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>.

--timeout

Maximum wait in seconds.

default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.