Κοινή χρήση μέσω


az vmss

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

Commands

Name Description Type Status
az vmss application

Manage applications for VM scale set.

Core GA
az vmss application list

List applications for VMSS.

Core GA
az vmss application set

Set applications for VMSS.

Core GA
az vmss create

Create an Azure Virtual Machine Scale Set.

Core GA
az vmss deallocate

Deallocate VMs within a VMSS.

Core GA
az vmss delete

Delete a VM scale set.

Core GA
az vmss delete-instances

Delete VMs within a VMSS.

Core GA
az vmss diagnostics

Configure the Azure Virtual Machine Scale Set diagnostics extension.

Core GA
az vmss diagnostics get-default-config

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

Core GA
az vmss diagnostics set

Enable diagnostics on a VMSS.

Core GA
az vmss disk

Manage data disks of a VMSS.

Core GA
az vmss disk attach

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

Core GA
az vmss disk detach

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

Core GA
az vmss encryption

Manage encryption of VMSS.

Core GA
az vmss encryption disable

Disable the encryption on a VMSS with managed disks.

Core GA
az vmss encryption enable

Encrypt a VMSS with managed disks.

Core GA
az vmss encryption show

Show encryption status.

Core GA
az vmss extension

Manage extensions on a VM scale set.

Core GA
az vmss extension delete

Delete an extension from a VMSS.

Core GA
az vmss extension image

Find the available VM extensions for a subscription and region.

Core GA
az vmss extension image list

List the information on available extensions.

Core GA
az vmss extension image list-names

List virtual machine extension image types.

Core GA
az vmss extension image list-versions

List virtual machine extension image versions.

Core GA
az vmss extension image show

Get a virtual machine extension image.

Core GA
az vmss extension list

List extensions associated with a VMSS.

Core GA
az vmss extension set

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

Core GA
az vmss extension show

Show details on a VMSS extension.

Core GA
az vmss extension upgrade

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

Core GA
az vmss get-instance-view

View an instance of a VMSS.

Core GA
az vmss get-os-upgrade-history

List the OS upgrades on a VM scale set instance.

Core GA
az vmss identity

Manage service identities of a VM scaleset.

Core GA
az vmss identity assign

Enable managed service identity on a VMSS.

Core GA
az vmss identity remove

Remove user assigned identities from a VM scaleset.

Core Preview
az vmss identity show

Display VM scaleset's managed identity info.

Core GA
az vmss list

List all VM scale sets under a resource group.

Core GA
az vmss list-instance-connection-info

Get the IP address and port number used to connect to individual VM instances within a set.

Core GA
az vmss list-instance-public-ips

List public IP addresses of VM instances within a set.

Core GA
az vmss list-instances

List all virtual machines in a VM scale sets.

Core GA
az vmss list-skus

List SKUs available for your VM scale set, including the minimum and maximum VM instances allowed for each SKU.

Core GA
az vmss nic

Manage network interfaces of a VMSS.

Core GA
az vmss nic list

Get all network interfaces in a virtual machine scale set.

Core GA
az vmss nic list-vm-nics

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

Core GA
az vmss nic show

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

Core GA
az vmss perform-maintenance

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

Core GA
az vmss reimage

Reimage VMs within a VMSS.

Core GA
az vmss restart

Restart VMs within a VMSS.

Core GA
az vmss rolling-upgrade

Manage rolling upgrades.

Core GA
az vmss rolling-upgrade cancel

Cancel the current virtual machine scale set rolling upgrade.

Core GA
az vmss rolling-upgrade get-latest

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

Core GA
az vmss rolling-upgrade start

Start a rolling upgrade to move all virtual machine scale set instances to the latest available Platform Image OS version. Instances which are already running the latest available OS version are not affected.

Core GA
az vmss run-command

Manage run commands on a Virtual Machine Scale Set.

Core GA
az vmss run-command create

The operation to Create the VMSS VM run command.

Core GA
az vmss run-command delete

The operation to delete the run command.

Core GA
az vmss run-command invoke

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

Core GA
az vmss run-command list

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

Core GA
az vmss run-command show

The operation to get the VMSS run command.

Core GA
az vmss run-command update

The operation to update the VMSS run command.

Core GA
az vmss scale

Change the number of VMs within a VMSS.

Core GA
az vmss set-orchestration-service-state

Change ServiceState property for a given service within a VMSS.

Core GA
az vmss show

Get details on VMs within a VMSS.

Core GA
az vmss simulate-eviction

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

Core GA
az vmss start

Start VMs within a VMSS.

Core GA
az vmss stop

Power off (stop) VMs within a VMSS.

Core GA
az vmss update

Update a VMSS. Run 'az vmss update-instances' command to roll out the changes to VMs if you have not configured upgrade policy.

Core GA
az vmss update-domain-walk

Manual platform update domain walk to update virtual machines in a service fabric virtual machine scale set.

Core GA
az vmss update-instances

Upgrade VMs within a VMSS.

Core GA
az vmss wait

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

Core GA

az vmss create

Create an Azure Virtual Machine Scale Set.

az vmss create --name
               --resource-group
               [--accelerated-networking {false, true}]
               [--accept-term]
               [--additional-events {false, true}]
               [--admin-password]
               [--admin-username]
               [--app-gateway]
               [--app-gateway-capacity]
               [--app-gateway-sku]
               [--app-gateway-subnet-address-prefix]
               [--asgs]
               [--assign-identity]
               [--authentication-type {all, password, ssh}]
               [--automatic-repairs-action {Reimage, Replace, Restart}]
               [--automatic-repairs-grace-period]
               [--backend-pool-name]
               [--backend-port]
               [--capacity-reservation-group]
               [--computer-name-prefix]
               [--custom-data]
               [--data-disk-caching]
               [--data-disk-delete-option {Delete, Detach}]
               [--data-disk-encryption-sets]
               [--data-disk-iops]
               [--data-disk-mbps]
               [--data-disk-sizes-gb]
               [--disable-integrity-monitoring]
               [--disable-integrity-monitoring-autoupgrade]
               [--disable-overprovision]
               [--disk-controller-type {NVMe, SCSI}]
               [--dns-servers]
               [--edge-zone]
               [--enable-agent {false, true}]
               [--enable-auto-os-upgrade {false, true}]
               [--enable-auto-update {false, true}]
               [--enable-cross-zone-upgrade {false, true}]
               [--enable-hibernation {false, true}]
               [--enable-integrity-monitoring]
               [--enable-osimage-notification {false, true}]
               [--enable-proxy-agent {false, true}]
               [--enable-reboot {false, true}]
               [--enable-redeploy {false, true}]
               [--enable-resilient-creation {false, true}]
               [--enable-resilient-deletion {false, true}]
               [--enable-secure-boot {false, true}]
               [--enable-spot-restore {false, true}]
               [--enable-vtpm {false, true}]
               [--encryption-at-host {false, true}]
               [--ephemeral-os-disk {false, true}]
               [--ephemeral-os-disk-placement {CacheDisk, NvmeDisk, ResourceDisk}]
               [--eviction-policy {Deallocate, Delete}]
               [--exclude-extensions]
               [--generate-ssh-keys]
               [--health-probe]
               [--host-group]
               [--image]
               [--instance-count]
               [--lb]
               [--lb-nat-pool-name]
               [--lb-nat-rule-name]
               [--lb-sku {Basic, Gateway, Standard}]
               [--license-type {None, RHEL_BASE, RHEL_BASESAPAPPS, RHEL_BASESAPHA, RHEL_BYOS, RHEL_ELS_6, RHEL_EUS, RHEL_SAPAPPS, RHEL_SAPHA, SLES, SLES_BYOS, SLES_HPC, SLES_SAP, SLES_STANDARD, UBUNTU, UBUNTU_PRO, Windows_Client, Windows_Server}]
               [--location]
               [--max-batch-instance-percent]
               [--max-price]
               [--max-surge {false, true}]
               [--max-unhealthy-instance-percent]
               [--max-unhealthy-upgraded-instance-percent]
               [--network-api-version]
               [--no-wait]
               [--nsg]
               [--orchestration-mode {Flexible, Uniform}]
               [--os-disk-caching {None, ReadOnly, ReadWrite}]
               [--os-disk-delete-option {Delete, Detach}]
               [--os-disk-encryption-set]
               [--os-disk-name]
               [--os-disk-secure-vm-disk-encryption-set]
               [--os-disk-security-encryption-type {DiskWithVMGuestState, NonPersistedTPM, VMGuestStateOnly}]
               [--os-disk-size-gb]
               [--os-type {linux, windows}]
               [--patch-mode {AutomaticByOS, AutomaticByPlatform, ImageDefault, Manual}]
               [--pause-time-between-batches]
               [--plan-name]
               [--plan-product]
               [--plan-promotion-code]
               [--plan-publisher]
               [--platform-fault-domain-count]
               [--ppg]
               [--prioritize-unhealthy-instances {false, true}]
               [--priority {Low, Regular, Spot}]
               [--proxy-agent-mode {Audit, Enforce}]
               [--public-ip-address]
               [--public-ip-address-allocation {dynamic, static}]
               [--public-ip-address-dns-name]
               [--public-ip-per-vm]
               [--regular-priority-count]
               [--regular-priority-percentage]
               [--role]
               [--scale-in-policy {Default, NewestVM, OldestVM}]
               [--scope]
               [--secrets]
               [--security-posture-id]
               [--security-type {ConfidentialVM, Standard, TrustedLaunch}]
               [--single-placement-group {false, true}]
               [--sku-allocat-strat {CapacityOptimized, LowestPrice}]
               [--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]
               [--zones]

Examples

Create a Windows VM scale set with 5 instances, a load balancer, a public IP address, a 2GB data disk and 40GB OS disk.

az vmss create -n MyVmss -g MyResourceGroup --instance-count 5 --image Win2016Datacenter --data-disk-sizes-gb 2 --os-disk-size-gb 40

Create a Linux VM scale set with an auto-generated ssh key pair, a public IP address, a DNS entry, an existing load balancer, and an existing virtual network.

az vmss create -n MyVmss -g MyResourceGroup --public-ip-address-dns-name my-globally-dns-name \
    --load-balancer MyLoadBalancer --vnet-name MyVnet --subnet MySubnet --image Ubuntu2204 \
    --generate-ssh-keys

Create a Linux VM scale set from a custom image using the default existing public SSH key.

az vmss create -n MyVmss -g MyResourceGroup --image MyImage

Create a Linux VM scale set with a load balancer and custom DNS servers. Each VM has a public-ip address and a custom domain name.

az vmss create -n MyVmss -g MyResourceGroup --image CentOS85Gen2 \
    --public-ip-per-vm --vm-domain-name myvmss --dns-servers 10.0.0.6 10.0.0.5

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

az vmss create -g MyResourceGroup -n MyVmss --image Debian11 --custom-data MyCloudInitScript.yml

Create a VMSS from a generalized gallery image version.

az vmss create -g MyResourceGroup -n MyVmss --image /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.Compute/galleries/myGallery/images/myImage/versions/1.0.0

Create a VMSS from a specialized gallery image version.

az vmss create -g MyResourceGroup -n MyVmss --image /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.Compute/galleries/myGallery/images/myImage/versions/1.0.0 --specialized

Create a VMSS from the latest version of a gallery image

az vmss create -g MyResourceGroup -n MyVmss --image /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/Microsoft.Compute/galleries/myGallery/images/myImage

Create a Debian11 VM scaleset using Key Vault secrets.

az keyvault certificate create --vault-name vaultname -n cert1 \
  -p "$(az keyvault certificate get-default-policy)"

secrets=$(az keyvault secret list-versions --vault-name vaultname \
  -n cert1 --query "[?attributes.enabled].id" -o tsv)

vm_secrets=$(az vm secret format -s "$secrets")

az vmss create -g group-name -n vm-name --admin-username deploy  \
  --image Debian11 --secrets "$vm_secrets"

Create a VM scaleset with system assigned identity. The VM will have a 'Contributor' Role with access to a storage account.

az vmss create -n MyVmss -g MyResourceGroup --image CentOS85Gen2 --assign-identity --scope /subscriptions/99999999-1bf0-4dda-aec3-cb9272f09590/MyResourceGroup/myRG/providers/Microsoft.Storage/storageAccounts/storage1 --role Contributor

Create a Debian11 VM scaleset with a user assigned identity.

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

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

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

Create a single zone VM scaleset in the current resource group's region

az vmss create -n MyVmss -g MyResourceGroup --image CentOS85Gen2 --zones 1

Create a VMSS that supports SpotRestore.

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

Create a VMSS from shared gallery image.

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

Create a VMSS from community gallery image.

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

Create a Windows VMSS with patch mode 'Manual' (Currently patch mode 'AutomaticByPlatform' is not supported during VMSS creation as health extension which is required for 'AutomaticByPlatform' mode cannot be set during VMSS creation).

az vmss create -n MyVmss -g MyResourceGroup --image Win2019Datacenter --enable-agent --enable-auto-update false --patch-mode Manual --orchestration-mode Flexible

Create a VMSS with specifying the security posture to be used for all virtual machines in the scale set.

az vmss create -n MyVmss -g MyResourceGroup --image /CommunityGalleries/{gallery_unique_name}/Images/{image}/Versions/{version} --security-posture-reference-id /CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{version} \
    --security-posture-reference-exclude-extensions "c:\tmp\exclude_extensions.json"

Required Parameters

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

--additional-events --additional-scheduled-events --scheduled-event-additional-publishing-target-event-grid-and-resource-graph

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

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

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

Accepted values: Delete, Detach
--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
Deprecated

Argument 'disable_integrity_monitoring' has been deprecated and will be removed in a future release.

Disable installing guest attestation extension and enabling System Assigned Identity for Trusted Launch enabled VMs and VMSS. It will become the default behavior, so it will become useless.

--disable-integrity-monitoring-autoupgrade

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

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

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

Accepted values: NVMe, SCSI
--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-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.

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

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

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.

Default value: False
--enable-osimage-notification

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

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

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

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

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

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

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

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.

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

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

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

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.

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

Value from: az sig image-version show-shared, az vm image list, az vm image show
--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
Deprecated

Option '--nat-pool-name' has been deprecated and will be removed in a future release. Use '--nat-rule-name' instead.

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

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

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

Accepted values: Basic, Gateway, Standard
Default value: 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, 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.

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.

Default value: False
--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: Flexible
--os-disk-caching

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

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

Accepted values: Delete, Detach
--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-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.

Accepted values: DiskWithVMGuestState, NonPersistedTPM, VMGuestStateOnly
--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
--proxy-agent-mode

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

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 "" for None ('""' in Azure CLI using PowerShell or --% operator). For Azure CLI using powershell core edition 7.3.4, specify or "" (--public-ip-address or --public-ip-address "").

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

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.

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

Accepted values: ConfidentialVM, Standard, 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
--sku-allocat-strat --skuprofile-allocation-strategy

Allocation strategy for vm sizes in SKU profile.

Accepted values: CapacityOptimized, LowestPrice
--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.

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

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

Accepted values: Ed25519, RSA
Default value: RSA
--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, PremiumV2_LRS.

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

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

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

Do not use managed disk to persist VM.

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.

Default value: False
--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.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

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

--hibernate

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

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.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

az vmss delete

Delete a VM scale set.

az vmss delete [--force-deletion {0, 1, f, false, n, no, t, true, y, yes}]
               [--ids]
               [--name]
               [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
               [--resource-group]
               [--subscription]

Optional Parameters

--force-deletion

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

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.

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

The name of the VM scale set.

--no-wait

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

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

--subscription

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

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.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

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

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

--subscription

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

az vmss get-os-upgrade-history

List the OS upgrades on a VM scale set instance.

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

Required Parameters

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

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

--next-token

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

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

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

--next-token

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

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

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

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

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

--subscription

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

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

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

--subscription

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

az vmss list-instances

List all virtual machines in a VM scale sets.

Return a list of virtual machines managed by VMSS. For VMSS in Flexible Orchestration mode, please use "az vm list" to get full details.

az vmss list-instances --name
                       --resource-group
                       [--expand]
                       [--filter]
                       [--max-items]
                       [--next-token]
                       [--select]

Required Parameters

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

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

--next-token

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

--select

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

az vmss list-skus

List SKUs available for your VM scale set, including the minimum and maximum VM instances allowed for each SKU.

az vmss list-skus --name
                  --resource-group
                  [--max-items]
                  [--next-token]

Required Parameters

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

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

--next-token

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

az vmss perform-maintenance

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

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

Optional Parameters

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

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

The name of the VM scale set.

--no-wait

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

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

--subscription

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

az vmss reimage

Reimage VMs within a VMSS.

az vmss reimage [--force-update-os-disk-for-ephemeral {false, true}]
                [--ids]
                [--instance-ids]
                [--name]
                [--no-wait]
                [--resource-group]
                [--subscription]

Examples

Reimage a VM instance within a VMSS.

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

Reimage a batch of VM instances within a VMSS.

az vmss reimage --instance-ids 1 2 3 --name MyScaleSet --resource-group MyResourceGroup --subscription MySubscription

Reimage all the VM instances within a VMSS.

az vmss reimage --name MyScaleSet --resource-group MyResourceGroup --subscription MySubscription

Optional Parameters

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

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

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.

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

--no-wait

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

Default value: False
--resource-group -g

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

--subscription

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

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.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

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

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

Default value: False
--resource-group -g

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

--subscription

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

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.

Accepted values: Resume, Suspend
--service-name

The name of the orchestration service.

Accepted values: AutomaticRepairs, DummyOrchestrationServiceName

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.

Default value: False
--resource-group -g

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

--subscription

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

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.

Default value: False
--instance-id

VM instance ID. If missing, show the VMSS.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

az vmss simulate-eviction

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

az vmss simulate-eviction [--ids]
                          [--instance-id]
                          [--name]
                          [--resource-group]
                          [--subscription]

Examples

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

az vmss simulate-eviction --resource-group MyResourceGroup --name MyScaleSet --instance-id 0

Optional Parameters

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

The instance ID of the virtual machine.

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

--subscription

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

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.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

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.

Default value: False
--skip-shutdown

Skip shutdown and power-off immediately.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

az vmss update

Update a VMSS. Run 'az vmss update-instances' command to roll out the changes to VMs if you have not configured upgrade policy.

az vmss update [--add]
               [--additional-events {false, true}]
               [--automatic-repairs-action {Reimage, Replace, Restart}]
               [--automatic-repairs-grace-period]
               [--capacity-reservation-group]
               [--custom-data]
               [--disk-controller-type {NVMe, SCSI}]
               [--enable-auto-os-upgrade {false, true}]
               [--enable-automatic-repairs {false, true}]
               [--enable-cross-zone-upgrade {false, true}]
               [--enable-hibernation {false, true}]
               [--enable-osimage-notification {false, true}]
               [--enable-proxy-agent {false, true}]
               [--enable-reboot {false, true}]
               [--enable-redeploy {false, true}]
               [--enable-resilient-creation {false, true}]
               [--enable-resilient-deletion {false, true}]
               [--enable-secure-boot {false, true}]
               [--enable-spot-restore {false, true}]
               [--enable-terminate-notification {false, true}]
               [--enable-vtpm {false, true}]
               [--ephemeral-option {Local}]
               [--ephemeral-os-disk {false, true}]
               [--ephemeral-os-disk-placement {CacheDisk, NvmeDisk, ResourceDisk}]
               [--exclude-extensions]
               [--force-deletion]
               [--force-string]
               [--ids]
               [--instance-id]
               [--license-type {None, RHEL_BASE, RHEL_BASESAPAPPS, RHEL_BASESAPHA, RHEL_BYOS, RHEL_ELS_6, RHEL_EUS, RHEL_SAPAPPS, RHEL_SAPHA, SLES, SLES_BYOS, SLES_HPC, SLES_SAP, SLES_STANDARD, UBUNTU, UBUNTU_PRO, Windows_Client, Windows_Server}]
               [--max-batch-instance-percent]
               [--max-price]
               [--max-surge {false, true}]
               [--max-unhealthy-instance-percent]
               [--max-unhealthy-upgraded-instance-percent]
               [--name]
               [--no-wait]
               [--pause-time-between-batches]
               [--ppg]
               [--prioritize-unhealthy-instances {false, true}]
               [--priority {Low, Regular, Spot}]
               [--protect-from-scale-in {false, true}]
               [--protect-from-scale-set-actions {false, true}]
               [--proxy-agent-mode {Audit, Enforce}]
               [--regular-priority-count]
               [--regular-priority-percentage]
               [--remove]
               [--resource-group]
               [--scale-in-policy {Default, NewestVM, OldestVM}]
               [--security-posture-id]
               [--security-type {Standard, TrustedLaunch}]
               [--set]
               [--sku-allocat-strat {CapacityOptimized, LowestPrice}]
               [--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]
               [--zones]

Examples

Update a VMSS' license type for Azure Hybrid Benefit.

az vmss update --name MyScaleSet --resource-group MyResourceGroup --license-type windows_server

Update a VM instance's protection policies.

az vmss update --name MyScaleSet --resource-group MyResourceGroup --instance-id 4 --protect-from-scale-set-actions False --protect-from-scale-in

Update a VM instance's protection policies.

az vmss update --name MyScaleSet --resource-group MyResourceGroup --instance-id 4 --set protectionPolicy.protectFromScaleIn=True protectionPolicy.protectFromScaleSetActions=False

Update a VM instance's Read-Write IOPS of the managed disk.

az vmss update --name MyScaleSet --resource-group MyResourceGroup --set virtualMachineProfile.storageProfile.dataDisks[0].diskIOPSReadWrite=444

Update a VM instance's bandwidth in MB per second of the managed disk.

az vmss update --name MyScaleSet --resource-group MyResourceGroup --set virtualMachineProfile.storageProfile.dataDisks[0].diskMBpsReadWrite=66

Update a VM to use a custom image.

az vmss update --name MyScaleSet --resource-group MyResourceGroup --set virtualMachineProfile.storageProfile.imageReference.id=imageID

Update a Linux VMSS to patch mode 'AutomaticByPlatform'.

az vmss update -n MyVmss -g MyResourceGroup --set virtualMachineProfile.osProfile.linuxConfiguration.patchSettings.patchMode=AutomaticByPlatform

Update a VMSS with specifying the security posture to be used for all virtual machines in the scale set.

az vmss update -n MyVmss -g MyResourceGroup --security-posture-reference-id /CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{version} \
    --security-posture-reference-exclude-extensions "c:\tmp\exclude_extensions.json"

Optional Parameters

--add

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

Default value: []
--additional-events --additional-scheduled-events --scheduled-event-additional-publishing-target-event-grid-and-resource-graph

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

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

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.

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

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

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

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

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

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

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

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

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

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

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.

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

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

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-option --ephemeral-os-disk-option

Specify the ephemeral disk settings for operating system disk.

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.

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

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.

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

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

--no-wait

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

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.

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
--proxy-agent-mode

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

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.

Default value: []
--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
--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.

Accepted values: Standard, TrustedLaunch
--set

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

Default value: []
--sku-allocat-strat --skuprofile-allocation-strategy

Allocation strategy for vm sizes in SKU profile.

Accepted values: CapacityOptimized, LowestPrice
--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.

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

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

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.

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

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

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

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

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

--subscription

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

--vmss-name

The name of the VM scale set.

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

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

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.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.

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

--created

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

Default value: False
--custom

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

--deleted

Wait until deleted.

Default value: False
--exists

Wait until the resource exists.

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.

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

--subscription

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

--timeout

Maximum wait in seconds.

Default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--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.