Microsoft.Compute virtualMachines/extensions 2018-10-01

The virtualMachines/extensions resource type can be deployed to: Resource groups.

To learn about resource group deployments, see Bicep or ARM template.

Template format

To create a Microsoft.Compute/virtualMachines/extensions resource, add the following Bicep or JSON to your template.

resource symbolicname 'Microsoft.Compute/virtualMachines/extensions@2018-10-01' = {
  name: 'string'
  location: 'string'
  tags: {
    tagName1: 'tagValue1'
    tagName2: 'tagValue2'
  }
  properties: {
    autoUpgradeMinorVersion: bool
    forceUpdateTag: 'string'
    instanceView: {
      name: 'string'
      statuses: [
        {
          code: 'string'
          displayStatus: 'string'
          level: 'string'
          message: 'string'
          time: 'string'
        }
      ]
      substatuses: [
        {
          code: 'string'
          displayStatus: 'string'
          level: 'string'
          message: 'string'
          time: 'string'
        }
      ]
      type: 'string'
      typeHandlerVersion: 'string'
    }
    protectedSettings: any()
    publisher: 'string'
    settings: any()
    type: 'string'
    typeHandlerVersion: 'string'
  }
}

Property values

virtualMachines/extensions

Name Description Value
type The resource type

For Bicep, set this value in the resource declaration.
'Microsoft.Compute/virtualMachines/extensions'
apiVersion The resource api version

For Bicep, set this value in the resource declaration.
'2018-10-01'
name The resource name

See how to set names and types for child resources in Bicep or JSON ARM templates.
string (required)
location Resource location string (required)
tags Resource tags Dictionary of tag names and values. See Tags in templates
properties Describes the properties of a Virtual Machine Extension. VirtualMachineExtensionProperties

VirtualMachineExtensionProperties

Name Description Value
autoUpgradeMinorVersion Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. bool
forceUpdateTag How the extension handler should be forced to update even if the extension configuration has not changed. string
instanceView The instance view of a virtual machine extension. VirtualMachineExtensionInstanceView
protectedSettings Any object For Bicep, you can use the any() function.
publisher The name of the extension handler publisher. string
settings Any object For Bicep, you can use the any() function.
type Specifies the type of the extension; an example is "CustomScriptExtension". string
typeHandlerVersion Specifies the version of the script handler. string

VirtualMachineExtensionInstanceView

Name Description Value
name The virtual machine extension name. string
statuses The resource status information. InstanceViewStatus[]
substatuses The resource status information. InstanceViewStatus[]
type Specifies the type of the extension; an example is "CustomScriptExtension". string
typeHandlerVersion Specifies the version of the script handler. string

InstanceViewStatus

Name Description Value
code The status code. string
displayStatus The short localizable label for the status. string
level The level code. 'Error'
'Info'
'Warning'
message The detailed status message, including for alerts and error messages. string
time The time of the status. string

Quickstart templates

The following quickstart templates deploy this resource type.

Template Description
Create a Windows VM with Anti-Malware extension enabled

Deploy to Azure
This template creates a Windows VM and sets up the Anti-Malware protection
IIS Server using DSC extension on a Windows VM

Deploy to Azure
This template creates a Windows VM and sets up an IIS server using the DSC extension. NOTE: The DSC configuration module needs a SAS token to be passed in if you're using Azure Storage. For DSC module link from Github (default in this template), this is not needed.
ESET VM Extension

Deploy to Azure
Creates a VM with ESET extension
McAfee Endpoint Security (trial license) on Windows VM

Deploy to Azure
This template creates a Windows VM and sets up a trial version of McAfee Endpoint Security
Deploy a Ubuntu VM with the OMS extension

Deploy to Azure
This template allows you to deploy a Ubuntu VM with the OMS extension installed and onboarded to a specified workspace
Deploy a Windows VM with the OMS extension

Deploy to Azure
This template allows you to deploy a Windows VM with the OMS extension installed and onboarded to a specified workspace
Symantec Endpoint Protection extension trial on Windows VM

Deploy to Azure
This template creates a Windows VM and sets up a trial version of Symantec Endpoint Protection
Custom Script extension on a Ubuntu VM

Deploy to Azure
This template creates a Ubuntu VM and installs the CustomScript extension
OS Patching extension on a Ubuntu VM

Deploy to Azure
This template creates a Ubuntu VM and installs the OSPatching extension
Deploy a Premium Windows VM

Deploy to Azure
This template allows you to deploy a Premium Windows VM using a few different options for the Windows version, using the latest patched version.
Deploy a simple Windows VM with monitoring and diagnostics

Deploy to Azure
This template allows you to deploy a simple Windows VM along with the diagnostics extension which enables monitoring and diagnostics for the VM
Use script extensions to install Mongo DB on Ubuntu VM

Deploy to Azure
This template deploys Configures and Installs Mongo DB on a Ubuntu Virtual Machine in two separate scripts. This template is a good example that showcases how to express dependencies between two scripts running on the same virtual machine. This template also deploys a Storage Account, Virtual Network, Public IP addresses and a Network Interface.