Read time

Why Won't My Deployment Build in Azure?

By Rob Waggoner

There are many reasons a new RDS deployment will not deploy in Azure. The typical reasons are that your subscription does not have access to the VM sizes requested or that you do not have enough virtual cores available to complete the build of a deployment.

We see this issue mainly when we have customers that create a deployment using a trial Azure subscription. Currently, our automation can detect some of these limitations that may impact your build, but not all limits, so I want to share a few simple commands that can shed some light on how to identify the root cause of the problem.

If our portal cannot detect the provisioning problems, usually it comes down to a few common items.

  1. Your subscription may only have access to specific Azure regions
  2. Your subscription does not have access to enough Cores for the VM Series requested to create the deployment you are creating

Before we get into the actual commands, I need to show you how and where to execute these commands.

First, log into your Azure subscription. Once logged in to the portal, you need to open the Cloud Shell. You do this by clicking on the >_ Icon in the upper right-hand corner of the portal. It’s highlighted below.

Portal MenuThe Cloud Shell will give you access to the PowerShell console for your Azure subscription.

The first time you log into the Cloud Shell, it will ask you if you want to use the Bash (Linux) or PowerShell (Windows) console. Please select the PowerShell (Windows) console.

Cloud-ShellIf this is your first time to open the Cloud Shell, it will ask you if you want to use Bash (Linux) or PowerShell (Windows). Please choose PowerShell (Windows) or our commands won’t work.

You will also be asked to add Cloud storage. Go ahead and Create Storage, but sometimes it doesn’t connect properly, so if it does not connect properly, don’t worry.

Create-Storage
The first time you open your Cloud Shell, it will ask to create storage for the Cloud Shell. Please click on Create Storage to proceed to the Cloud Shell Creation.

There is a complete overview of the Azure Cloud Shell here. Your Cloud Shell will take a minute or two to provision, once it’s configured, it should look like my screen below.

Cloud-Shell-CommandOur commands below will generate a lot of information, so you may want to increase the size of the Cloud Shell window within your portal. Just slide the slider up or down as needed.

Now let’s look at the different situations that may occur.

1. Do you have access to more than one subscription?

The command Get-AzureRMConext will show you the subscriptions you have access to.
Get-AzureRMContextThe above command Get-AzureRMContext to see if your credentials are tied to more than one Azure subscription.

Change-Free-TrialIf your list shows more than one Subscription Name, you can configure the subscription you want to check by using the command Set-AzureRmContext -Tenant “Free Trial” for my example. Please change “Free Trial” to the name of your Azure subscription.

2. Some subscriptions only have access to VMs in certain Azure regions.

To identify the Regions available in Azure, please use the command Get-AzureRMLocation.

Identify-Azure-RegionNote that it lists the Location, Display Name, and the Providers. The Providers list the capabilities offered in that Azure Region.

Find the Azure Region you would like to use, then use the following PowerShell command (just copy and paste). The <Location-Name> will be the “Location” of the Azure Region from the list above. For example, to check the East US Region, the $location would be configured as $location = “eastus”

Here is the script to copy and paste into the Cloud Shell.

$location = “<Location-Name>”

$computeSkus = Get-AzureRmComputeResourceSku

$locationAvailableComputeSkus = $computeSkus | ? {$_.Locations -eq $location -and $_.ResourceType -eq “virtualMachines” -and $_.Restrictions.ReasonCode -notcontains "NotAvailableForSubscription"}

$locationAvailableComputeSkus | Format-Table Name

Cloud-Shell-with-VM-SizesYou can just paste the script into the Cloud Shell window and it will list all the VM sizes available in the region you requested.

Now you have the VM sizes available to your subscription in the designated Azure Region.

3. Do you have enough vCPUs for the VM series you are requesting?

The PowerShell command Get-AzureRmVMUsage -Location "East US" will show you the current usage for each of the available Azure Resources. This includes the resources in use and the limit for each of the Azure Resources. If you need to increase the number of cores for a specific VM size, make sure to follow these steps

If you are faced with one of these situations, you are welcome to copy and paste the results of your commands above into an email to us, so we can assist you. Please feel free to email us at support@mycloudit.com if you need assistance. 

Have other questions? Check out some of our other common questions and answers here

Want Future Tips Emailed Right to Your Inbox?
Subscribe to Our Blog

Tags: Microsoft Azure, MyCloudIT Best Practices, Best Practices

azure cost optimization

Related Articles

Monitoring and Managing Commitment-Based Discounts in Microsoft Azure

There are many reasons a new RDS deployment will not deploy in Azure. The typical reasons are that your subscription does not...


Topics: Microsoft Azure, MyCloudIT Best Practices, Best Practices

Protect Your Microsoft Azure Investment with Cost Anomaly Monitoring

There are many reasons a new RDS deployment will not deploy in Azure. The typical reasons are that your subscription does not...


Topics: Microsoft Azure, MyCloudIT Best Practices, Best Practices

Mastering Azure Resource Tagging: Best Practices for Effective Cloud Management

There are many reasons a new RDS deployment will not deploy in Azure. The typical reasons are that your subscription does not...


Topics: Microsoft Azure, MyCloudIT Best Practices, Best Practices