azure spot - unable to create

Michele A 11 Reputation points
2020-05-26T12:25:12.123+00:00

hi all,
trying to create a VM using azure spot. I keep getting this error at the end:

The template deployment failed with error: 'The resource with id: 'XXX' failed validation with message: 'The requested size for resource 'XXX' is currently not available in location 'westeurope' zones '' for subscription 'XXX'. Please try another size or deploy to a different location or zones. See https://aka.ms/azureskunotavailable for details.'.'. (Code: InvalidTemplateDeployment)

I tried chaning to different disk sizes and types of vcpu, ram, disk, and tried changing region (chose several EU or US regions). Also tried changing eviction type.
The only way I found to get this error out of the way is to select NO azure-spot. Changing region or disk size does not help.

Any idea?
thanks!

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
9,014 questions
0 comments No comments
{count} votes

5 answers

Sort by: Most helpful
  1. Abdulrahman 16 Reputation points
    2021-01-26T15:23:03.01+00:00

    60675-capture.png

    3 people found this answer helpful.

  2. Michele A 11 Reputation points
    2020-05-26T21:45:08.737+00:00

    @Manu Philip thanks for your help, I double checked everything and it still doesn't work, will open a ticket with MS. ty again for your time though.

    1 person found this answer helpful.

  3. Manu Philip 20,206 Reputation points MVP Volunteer Moderator
    2020-05-26T12:59:35.943+00:00

    Hello @Michele A ,

    You receive this error when the resource SKU you have selected (such as VM size) is not available for the location you have selected.
    First check the available resources in selected region by using command Get-AzureRmComputeResourceSku then proceed to launch VM

    Get-AzureRmLocation | select Location  
      
    Get-AzureRmComputeResourceSku | where {$_.Locations -icontains "southcentralus"}  
    

    Please mark as "Accept the answer" if the above steps helps you. Others with similar issues can also follow the solution as per your suggestion

    Regards,

    Manu

    0 comments No comments

  4. Michele A 11 Reputation points
    2020-05-26T13:51:14.31+00:00

    hello @Manu Philip and thanks,
    I tried as suggested and here are the results:

    ResourceType            Name           Location     Zones                 Restriction          Capability Value  
    ------------            ----           --------     -----                 -----------          ---------- -----  
    virtualMachines Standard_F1s             eastus {3, 2, 1}                             MaxResourceVolumeMB  4096  
    virtualMachines Standard_F1s            eastus2 {3, 2, 1}                             MaxResourceVolumeMB  4096  
    

    so the resource exists, however again when I select it I get the error. The error stays as long as I leave azure-spot enabled and disappears when I remove the spot option. Unfortunately, it is not an option I can remove.

    Any other idea please?
    ty!


  5. Michele A 11 Reputation points
    2020-05-26T16:30:07.19+00:00

    thanks, but I think were still at the same spot. To clarify, when I select the computer size I want (processor etc.) Azure already shows me the available ones, and it adds the cost on the side. The unavailable ones, instead of the hourly cost, have 'unavailable' written on it.
    In fact, I tested right now with three of the different results returned by the last command you suggested.

    So I can select the right plan, I think. Where it fails is when I select the spot option.

    ty
    regards


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.