az vmss extension

Manage extensions on a VM scale set.

Commands

az vmss extension delete

Delete an extension from a VMSS.

az vmss extension image

Find the available VM extensions for a subscription and region.

az vmss extension image list

List the information on available extensions.

az vmss extension image list-names

List a list of virtual machine extension image types.

az vmss extension image list-versions

List a list of virtual machine extension image versions.

az vmss extension image show

Get a virtual machine extension image.

az vmss extension list

List extensions associated with a VMSS.

az vmss extension set

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

az vmss extension show

Show details on a VMSS extension.

az vmss extension upgrade

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

az vmss extension delete

Delete an extension from a VMSS.

az vmss extension delete --name
                         --resource-group
                         --vmss-name
                         [--no-wait]

Examples

Delete an extension from a VMSS. (autogenerated)

az vmss extension delete --name MyExtension --resource-group MyResourceGroup --vmss-name MyVmss

Required Parameters

--name -n

Name of the extension.

--resource-group -g

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

--vmss-name

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

Optional Parameters

--no-wait

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

default value: False

az vmss extension list

List extensions associated with a VMSS.

az vmss extension list --resource-group
                       --vmss-name

Examples

List extensions associated with a VMSS. (autogenerated)

az vmss extension list --resource-group MyResourceGroup --vmss-name MyVmss

Required Parameters

--resource-group -g

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

--vmss-name

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

az vmss extension set

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

Get extension details from az vmss extension image list.

az vmss extension set --name
                      --publisher
                      --resource-group
                      --vmss-name
                      [--enable-auto-upgrade {false, true}]
                      [--extension-instance-name]
                      [--force-update]
                      [--no-auto-upgrade {false, true}]
                      [--no-auto-upgrade-minor-version {false, true}]
                      [--no-wait]
                      [--protected-settings]
                      [--provision-after-extensions]
                      [--settings]
                      [--version]

Examples

Set an extension which depends on two previously set extensions. That is, When a VMSS instance is created or reimaged, the customScript extension will be provisioned only after all extensions that it depends on have been provisioned. The extension need not depend on the other extensions for pre-requisite configurations.

az vmss extension set --vmss-name my-vmss --name customScript --resource-group my-group \
    --version 2.0 --publisher Microsoft.Azure.Extensions \
    --provision-after-extensions NetworkWatcherAgentLinux VMAccessForLinux  \
    --settings '{"commandToExecute": "echo testing"}'

Add an extension and enable automatic upgrade by the platform if there is a newer version of the extension available.

az vmss extension set -n extName --publisher publisher --vmss-name my-vmss -g my-group \ --enable-auto-upgrade true

Required Parameters

--name -n

Name of the extension.

value from: az vm extension image list
--publisher

The name of the extension publisher.

--resource-group -g

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

--vmss-name

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

Optional Parameters

--enable-auto-upgrade

Indicate the extension should be automatically upgraded by the platform if there is a newer version of the extension available.

accepted values: false, true
--extension-instance-name

Name of extension instance, which can be customized. Default: name of the extension.

--force-update

Force to update even if the extension configuration has not changed.

default value: False
--no-auto-upgrade

If set, the extension service will not automatically pick or upgrade to the latest minor version, even if the extension is redeployed.

accepted values: false, true
default value: False
--no-auto-upgrade-minor-version

If set, the extension service will not automatically pick or upgrade to the latest minor version, even if the extension is redeployed.

accepted values: false, true
default value: False
--no-wait

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

default value: False
--protected-settings

Protected settings in JSON format for sensitive information like credentials. A JSON file path is also accepted.

--provision-after-extensions

Space-separated list of extension names after which this extension should be provisioned. These extensions must already be set on the vm.

--settings

Extension settings in JSON format. A JSON file path is also accepted.

--version

The version of the extension. To pin extension version to this value, please specify --no-auto-upgrade-minor-version.

az vmss extension show

Show details on a VMSS extension.

az vmss extension show --name
                       --resource-group
                       --vmss-name

Examples

Show details on a VMSS extension. (autogenerated)

az vmss extension show --name MyExtension --resource-group MyResourceGroup --vmss-name MyVmss

Required Parameters

--name -n

Name of the extension.

--resource-group -g

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

--vmss-name

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

az vmss extension upgrade

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

az vmss extension upgrade [--ids]
                          [--name]
                          [--no-wait]
                          [--resource-group]
                          [--subscription]

Examples

Upgrade all extensions to the latest version.

az vmss extension upgrade -g MyResourceGroup -n MyVmss

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.