Export (0) Print
Expand All

Manage Extensions

Updated: May 12, 2014

An extension is a component that provides additional functionality to a role instance running in Microsoft Azure. You can add an extension when an instance is created or you can add an extension to an instance that is already running. Extensions can be added to instances of web roles, worker roles, and Virtual Machines.

The following information can help you to learn more about using extensions:

The VM Agent is a light-weight process that is responsible for installing, configuring and managing extensions on instances Virtual Machines. The VM agent is installed in C:\WindowsAzure and the extensions that it supports are installed in C:\Packages. The VM Agent uses the following services on the machine:

  • Microsoft Windows Azure Monitoring Agent (WaAppAgent.exe)

  • WindowsAzureGuestAgent (WindowsAzureGuestAgent.exe)

  • TelemetryService (WindowsAzureTelemetryService.exe)

ImportantImportant
When using Virtual Machines in your application, you should consider the need of using extensions in the lifecycle of the application. After a VM Agent is installed, it cannot be removed.

You can use the following resources to enable the VM Agent:

  • Create an instance of a Virtual Machine by using the New-AzureVM cmdlet or the New-AzureQuickVM cmdlet and the VM Agent is automatically enabled. You can create a Virtual Machine without the VM Agent installed by adding the –DisableGuestAgent parameter to AddAzureProvisioningConfig cmdlet. For more information, see Create a custom virtual machine.

  • Create an instance of a Virtual Machine by using the Quick Create method in the Management Portal and the VM Agent is automatically enabled. For more information, see How to Quickly Create a Virtual Machine.

  • Create an instance of a Virtual Machine by using the Custom Create method in the Management Portal and make sure that the Install the VM Agent checkbox is selected.

    VM Agent Checkbox For more information, see How to Create a Custom Virtual Machine. If the VM Agent is enabled by using the Management Portal, the BGInfo extension is automatically added. For more information, see BGInfo.

  • Set the ProvisionGuestAgent element to true when an instance of a Virtual Machine is created by using the Create Virtual Machine Deployment or Add Role operations.

  • Download an .msi file and install the VM Agent on a running Virtual Machine. You can find the .msi file in the Download Center.

    After you install the VM Agent, run the following Azure PowerShell cmdlets:

    
    $vm = Get-AzureVM –serviceName $svc –Name $name
    $vm.VM.ProvisionGuestAgent = $TRUE
    Update-AzureVM –Name $name –VM $vm.VM –ServiceName $svc
    

For a Virtual Machine specific view of these concepts, see the Use extensions to manage virtual machine access section in Virtual Machines.

noteNote
Extension functionality is automatically handled on instances of web roles or worker roles. You do not need to install an agent. You only need to add extensions to these types of instances.

When you add an extension, you must know information about the extension, such as the name, version, and publisher of the extension. For some extensions, you must also know the configuration that is required to run the extension. You can use Azure PowerShell cmdlets to find information about available extensions, or you can use the Service Management REST APIs.

You can use the following cmdlets to obtain information about available extensions:

  • For instances of web roles or worker roles, you can use the Get-AzureServiceAvailableExtension cmdlet.

  • For instances of Virtual Machines, you can use the Get-AzureVMAvailableExtension cmdlet.

You can use the following REST APIs to obtain information about available extensions:

Extensions can be added when an instance is created or they can be added to a running instance. Extensions can be updated, disabled, or removed. You can perform these actions by using Azure PowerShell cmdlets or by using the Service Management REST API operations. Parameters are required to install and set up some extensions. Public and private parameters are supported for extensions.

Using Azure PowerShell cmdlets is the easiest way to add and update extensions. When you use the extension cmdlets, most of the configuration of the extension is done for you. At times, you may need to programmatically add an extension. When you need to do this, you must provide the configuration of the extension.

You can use the following cmdlets to know whether an extension requires a configuration of public and private parameters:

  • For instances of web roles or worker roles, you can use the Get-AzureServiceAvailableExtension cmdlet.

  • For instances of Virtual Machines, you can use the Get-AzureVMAvailableExtension cmdlet.

When you retrieve a listing of available extensions by using the REST APIs, you receive information about how the extension is to be configured. The information that is returned might show parameter information represented by a public schema and private schema. Public parameter values are returned in queries about the instances. Private parameter values are not returned.

You can use the following REST APIs to know whether an extension requires a configuration of public and private parameters:

  • For instances of web roles or worker roles, the PublicConfigurationSchema and PrivateConfigurationSchema elements contain the information in the response from the List Available Extensions operation.

  • For instances of Virtual Machines, the PublicConfigurationSchema and PrivateConfigurationSchema elements contain the information in the response from the List Resource Extensions operation.

noteNote
Extensions can also use configurations that are defined with JSON. When these types of extensions are used, only the SampleConfig element is used.

Show:
© 2014 Microsoft