In this post, we will show you how to increase Compute quota limit for an existing plan using PowerShell. You can also do the same thing for storage, network, and other services.
Table of Contents
Introduction
Azure Stack lets you deliver a wide variety of services, like virtual machines, SQL Server databases, SharePoint, Exchange, and even Azure Marketplace items. As an Azure Stack operator, you configure and deliver such services in Azure Stack by using plans, offers, and quotas.
When you want to deliver a service, you typically follow the high-level steps below:
- Add a service that you want to deliver to your users.
- Create a plan that has one or more services. When creating a plan, select or create quotas that define the resource limits of each service in the plan.
- Create an offer that contains one or more plans. The offer can include base plans and optional add-on plans.
Quotas help you manage your cloud capacity, you can use pre-configured quotas or create a new quota for each service in a plan. Quotas define the upper resource limits that a user subscription can provision or consume. For example, a quota might allow a user to create up to 5 virtual machines (VMs). You set additional quotas on the virtual machines, such as RAM and CPU cores.
With Azure Stack Hub, you can configure quotas by region. For example, a plan that provides compute services for Region (named Bern) could have a quota of two VMs with 4-GB RAM, and 8 CPU cores. However, this does not apply to the Azure Stack Development Kit (single-node), because we only have one region (named local).
If you want to increase the quota limits in Azure Stack for a customer, you have multiple options:
- The customer (tenant) can subscribe to an Add-on plan in his subscription offer.
- You can use PowerShell to find the desired plan for the offer and then change the plan accordingly.
In this quick blog post, I will show you how to increase Compute quota limit for an existing plan using PowerShell. You can also do the same thing for storage, network, and other services.
Change Azure Stack Quota with PowerShell
First, you need to find the desired plan that you want to change. The following PowerShell command will list all the existing plans in Azure Stack:
Get-AzsPlan | FL DisplayName, Name, ID, Location
In this example, I will use the plan named (Limit-BasePlan). Get the details for a specific plan by running the following PowerShell command:
Get-AzsPlan -Name Limit-BasePlan -ResourceGroupName limit-quota-rg
This plan has three services, Storage, Network, and Compute.
You can take a look at the quotas limit for each service by running the following commands:
Storage
Get-AzsStorageQuota -ResourceId ((Get-AzsPlan -Name Limit-BasePlan -ResourceGroupName `
limit-quota-rg).quotaids | where { $_ -match "Storage"})
Network
Get-AzsNetworkQuota -ResourceId ((Get-AzsPlan -Name Limit-BasePlan -ResourceGroupName `
limit-quota-rg).quotaids | where { $_ -match "Network"})
Compute
Get-AzsComputeQuota -ResourceId ((Get-AzsPlan -Name Limit-BasePlan -ResourceGroupName `
limit-quota-rg).quotaids | where { $_ -match "Compute"})
After verifying the quota for the plan, you can leverage PowerShell to raise the Quota. In this example, I will increase the CoresLimit to 20 vCPUs instead of 10. Note the compute quota name (limit_compute). To do so, run the following command:
Get-AzsComputeQuota -Name limit_compute | Set-AzsComputeQuota -CoresLimit 20
You can see now the limit for the compute quota is changed to 20 vCPUs instead of 10.
That’s it! Very simple.
__
Thank you for reading my blog.
If you have any questions or feedback, please leave a comment.
-Charbel Nemnom-
What possible reason could you have for preventing people from copying and pasting your content? Completely detracts from the good content you’ve posted.
Hello Michaela, thanks for the feedback!
I have updated the article, you should be able to copy it from the Code Block.
The content is protected from being plagiarized!
However, you can copy from the ‘Code Blocks’ in ‘Black’ by selecting the Code.
Let me know if it works for you.
Thanks!
I get error
Get-AzsPlan: The resource namespace ‘Microsoft.Subscriptions.Admin’ is invalid.
At line:1 char:1
+ Get-AzsPlan | FL DisplayName, Name, ID, Location
Hello Sushant,
Could you please make sure to remove and uninstall previous versions of AzureStack modules?
Then install the latest Azure Stack Admin Module Version 2.2.0 as documented in this article.
Hope it helps!