In my previous article (Azure Reservations vs Pay as you go), we explored Azure Reservations and their cost-saving potential. This time, let’s focus on how to effectively manage reservations, ensuring they align with your infrastructure and business needs.
Jump to PowerShell cmdlets sectionUnderstanding Azure Reservations
Reservations are not static; they have a defined lifespan and must be managed efficiently to maximize benefits. Here are key aspects to keep in mind:
- Reservation Duration: Can be purchased for either 1 year or 3 years.
- Infrastructure Changes: VM SKUs evolve over time, meaning the size you initially chose may no longer be optimal.
- Assignment Scope: Reservations can be assigned at different levels (“Management Group,” “Subscription,” or “Resource Group”), each with implications on flexibility and cost allocation.
- Reservation Exchange & Refunds: Some reservations can be exchanged or refunded under specific conditions, providing additional flexibility.
- Capacity Planning: Regularly review your VM usage trends to ensure reservations continue to match workload demands.
Options for Managing Azure Reservations
There are several ways to structure and manage your reservations based on your organizational structure and cost management approach:
Option | Description | Pros | Cons |
Management Group Level | Assign reservations to a management group, allowing multiple subscriptions to benefit. | Maximizes utilization across many subscriptions. | Complex to manage if subscriptions frequently change management groups. |
Subscription Level | Reservations are tied to a specific subscription. | Clear cost allocation per team/project. | Less flexibility; unused reservations stay within the subscription. |
Resource Group Level | Assign reservations to a particular resource group. | Granular control over allocation. | Least flexible; limited to a single resource group. |
Subscription-Level Assignment Options:
- Instance Flexibility – Allows VM sizes within the same family to utilize the reservation (proportional sharing based on VM size).
- Capacity Priority – Reservation discount applies only to a specific VM type, ensuring reserved capacity but with no flexibility.
Factors to Consider When Choosing Azure Reservations Options
- Infrastructure Setup: Number of subscriptions, management groups, and teams.
- Cost Allocation: How your organization distributes costs.
- Regions Used: Reservations apply per region, affecting utilization.
- Operational Flexibility: Need for frequent VM or SKU changes.
- Usage Tracking: Ensuring utilization matches your expectations to avoid waste.
Monitoring and Assessing Azure Reservations
Effective management requires ongoing monitoring. Here are different approaches:
Method | Description | Pros | Cons |
Manual | Check utilization via Azure Portal. | No additional tools required. | Time-consuming and prone to oversight. |
Semi-Manual | Export data for manual analysis. | Some automation possible. | Still requires human intervention. |
Semi-Automated | Utilize cost management systems to analyze utilization. | Reduces manual work, provides insights. | Requires integration and setup. |
Fully Automated | System executes reservation adjustments based on rules. | Most efficient, ensures optimal usage. | Requires coding and configuration. |
Managing Reservations with PowerShell
You can reassing Azure reservations manually through the portal or via PowerShell, which allows bulk operations and greater efficiency.
Required PowerShell Module
To manage reservations, install the Az.Reservations PowerShell module:
Install-Module -Name Az.Reservations -Scope CurrentUser
Reassigning Azure Reservations from Subscription to Management Group
Update-AzReservation `
-ReservationOrderId <Reservation order id from Azure> `
-ReservationId <reservation id from Azure> `
-AppliedScopeType "ManagementGroup" `
-AppliedScopePropertyManagementGroupId "/providers/Microsoft.Management/managementGroups/<your Management Group Name>" `
-AppliedScopePropertyTenantId "<your tenantId>"
Reassigning Azure Reservations from Management Group to Subscription
Update-AzReservation `
-ReservationOrderId <id from Azure> `
-ReservationId <id from Azure> `
-AppliedScopeType "Single" -AppliedScope "/subscriptions/<your subscription id>"
Splitting Azure Reservations
You can split Azure Reservations into two parts. If you need multiple splits, you must execute the command multiple times.
Split-AzReservation `
-ReservationOrderId <ReservationOrderId from Azure> `
-ReservationId <ReservationId from Azure> `
-Quantity <first number>,<second number>
After each split, a new Reservation ID is generated, which must be retrieved before proceeding with further splits.
Useful Links
Conclusion
Managing Azure Reservations effectively requires continuous monitoring and proper assignment strategies. Organizations should ensure they align reservations with their infrastructure needs and utilize automation where possible.