question

NathanGiven avatar image
0 Votes"
NathanGiven asked kobulloc-MSFT commented

Azure Advisor Cost Recommendation to purchase VMs - How can I find the underlying VMs included in the recommended quantity?

We're working on cost savings in our azure subscriptions and going over the Azure Advisor Recommendations related to purchasing virtual machine reserved instances.

While going through this process, we're seeing that the advisor is recommending we purchase reservations for 30 virtual machines [1], however, it isn't clear on how to find the exact names of the VMs that are being included.

When we dive into the recommendation, we can see the virtual machine type and the recommended quantity [2] and the details of the recommended quantity [3], but I can't seem to find the actual names of the VMs that are being included anywhere.

I'd like to figure out the actual VM names via the Azure Portal and Azure Powershell (so we can code up our own report).

Thank you,
Nathan




[1] https://i.imgur.com/QTXa8ii.png
QTXa8ii.png
[2] https://i.imgur.com/ZSM13ZC.png
ZSM13ZC.png
[3] https://i.imgur.com/0vQA6qQ.png
0vQA6qQ.png


azure-virtual-machines
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

TravisCragg-MSFT avatar image
1 Vote"
TravisCragg-MSFT answered kobulloc-MSFT commented

Unfortunately you cannot see which exact VMs were used for the recommendation. It could be 2 D2_V2 VMs that were on for the duration, or a combination of 20 different VMs being turned off and on.

This recommendation just shows that you had a minimum of 2 allocated for September, and if this use pattern will continue going forward it will be cost effective to get reserved instances for that size.

· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@NathanGiven, for future Azure Advisor queries you can use both PowerShell and Azure CLI:

Azure PowerShell
https://docs.microsoft.com/en-us/powershell/module/az.advisor/get-azadvisorrecommendation?view=azps-6.4.0

 Get-AzAdvisorRecommendation

Azure CLI
https://docs.microsoft.com/en-us/cli/azure/advisor/recommendation?view=azure-cli-latest

 az advisor recommendation list


1 Vote 1 ·

@kobulloc-MSFT - thank you. But does azure powershell or cli show me which VMs were used in building the recommendation?

0 Votes 0 ·

@NathanGiven - I don't currently have the same recommendations in my Azure Advisor but using a database recommendation as an example, the CLI provides me with a lot of details including:

  • Database Name

  • Resource group

  • Full Resource ID (which has the subscription, resource group, and DB name)

I'm pretty sure you can get whatever you need from the output even if it takes a little parsing:

 az advisor recommendation list --category cost


0 Votes 0 ·

Thank you!

As it turns out, I did find a way to see the VMs:

137561-image.png

If you click the link under the "Virtual Machine" column it does try to show you the number of currently deployed virtual machines in that region for that size. It may not be the same machines that azure advisor is using, but it is close enough to what I was looking for for now.

1 Vote 1 ·
image.png (90.7 KiB)