Fix: Include all Windows VMs in Azure Hybrid Benefit workbooks regardless of publisher #1845
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
Windows VMs from publishers other than MicrosoftWindowsServer and microsoftsqlserver (e.g., esri, safesoftwareinc) were not appearing in the Azure Hybrid Benefit (AHB) workbooks, preventing users from getting a complete view of their Windows VMs for AHB optimization.
Root Cause
The KQL queries in the AHB workbooks filtered VMs based on specific publishers rather than checking the OS type. The problematic filter was:
This approach had two issues:
osTypefor Virtual Machine Scale Sets (VMSS), not for regular VMsSolution
Updated all affected queries to check the OS type for both regular VMs and VMSS:
This change aligns with the Azure Hybrid Benefit documentation which states: "All Windows Server OS-based images are supported for Azure Hybrid Benefit for Windows Server" - regardless of the publisher.
Changes Made
src/workbooks/optimization/AHB/AHB.workbooksrc/workbooks/optimization/Compute/AHB.workbookImpact
After this fix, the AHB workbooks will now correctly display:
This provides users with a complete and accurate view of all their Windows VMs eligible for Azure Hybrid Benefit, enabling better cost optimization decisions.
Related Issues
Fixes #1849
Original prompt
Fixes #1793
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.