azure-powershell icon indicating copy to clipboard operation
azure-powershell copied to clipboard

Get-AzureVMAvailableExtension for ARM #1481 - Closed without Solution

Open Vijayaraghavanl opened this issue 10 years ago • 6 comments

#1481 was closed without a solution. I need a way to find out Extensions that can be used against ARM VM's along with their properties like it was possible with Get-AzureVMAvailableExtension for ASM.

Vijayaraghavanl avatar Dec 30 '15 04:12 Vijayaraghavanl

Hi @Vijayaraghavanl,

Currently there are two ways --

  1. Because the ARM and ASM modes are merged, now you can directly call Get-AzureVMAvailableExtension to do so, without switching the context;

  2. You can also use the following cmdlet to list available extensions: Get-AzureRmVMExtensionImage.

huangpf avatar Jan 08 '16 22:01 huangpf

Dear huangpf,

  1. I am now running into this error for Get-AzureVMAvailableExtension while other "Get-" cmdlets works fine without error.

Get-AzureVMAvailableExtension : ForbiddenError: The server failed to authenticate the request. Verify that the certificate is valid and is associated with this subscription. At line:1 char:1

  • Get-AzureVMAvailableExtension
    • CategoryInfo : CloseError: (:) [Get-AzureVMAvailableExtension], ComputeCloudException
    • FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.Extensions.GetAzureVMAvailableExtensionCommand
  1. For Get-AzureRmVMExtensionImage "Location" "PublisherName" and "Type" parameters are mandatory parameters. This makes it difficult to use this cmdlet The goal here is to know what extensions and available and details for it. How would I get the answer to "PublisherName" and "Type"?

The older approach was far more easier when the Get-AzureVMAvailableExtension used to work and it would return the list of all extensions without having to provide any parameters and then we were able to pick the extensions we need based on its description.

Vijayaraghavanl avatar Jan 11 '16 04:01 Vijayaraghavanl

For ASM, you still need to login there using the following cmdlet:

PS C:\> Get-AzureVMAvailableExtension | ft Publisher,ExtensionName,Version
VERBOSE: 10:52:08 PM - Begin Operation: Get-AzureVMAvailableExtension

VERBOSE: 10:52:11 PM - Completed Operation: Get-AzureVMAvailableExtension
Publisher                                            ExtensionName                       Version
---------                                            -------------                       -------
AlertLogic.                                          AlertLogicLM                        1.3
AlertLogic.Extension                                 AlertLogicLM                        1.9
...

BTW, the error I got reminded me to login:

PS C:\> Get-AzureVMAvailableExtension
VERBOSE: 10:48:15 PM - Begin Operation: Get-AzureVMAvailableExtension
Get-AzureVMAvailableExtension : Your Azure credentials have not been set up or have expired, please run Add-AzureAccount to set up your Azure credentials.

For ARM, try use other related cmdlets and PS' piping feature:

Get-AzureRmVMImagePublisher -Location westus | Get-AzureRmVMExtensionImageType | Get-AzureRmVMExtensionImage

And with filtering:

Get-AzureRmVMImagePublisher -Location westus | Get-AzureRmVMExtensionImageType | Get-AzureRmVMExtensionImage | ft PublisherName,Type,Version

PublisherName               Type             Version
-------------               ----             -------
alertlogic                  AlertLogicLM     1.3.0.1
AlertLogic.Extension        AlertLogicLM     1.3.0.0
AlertLogic.Extension        AlertLogicLM     1.4.0.0
AlertLogic.Extension        AlertLogicLM     1.9.0.0
AlertLogic.Extension        AlertLogicLM     1.9.1.0
Chef.Bootstrap.WindowsAzure CentosChefClient 11.12.4.2
Chef.Bootstrap.WindowsAzure CentosChefClient 11.14.6.1
...

huangpf avatar Jan 11 '16 06:01 huangpf

Dear hungpf,

Thank you! I can now get what I need. While the name Type suggests what the extension may be a description field would be more helpful. Otherwise I pretty much have what I need.

Vijayaraghavanl avatar Jan 11 '16 08:01 Vijayaraghavanl

@Vijayaraghavanl Glad it works now.

It's by design that the ARM API doesn't return the information of extension description (yet).

For that you have to call the ASM cmdlet, i.e. Get-AzureVMAvailableExtension.

Can we close this issue now? Thanks.

huangpf avatar Jan 11 '16 17:01 huangpf

Dear huangpf,

Thank you for the response. Yes this certainly can be closed now. Thank you again!

Vijayaraghavanl avatar Jan 12 '16 04:01 Vijayaraghavanl