question

MicheleA avatar image
0 Votes"
MicheleA asked GeoffMcDonald-8938 edited

azure spot - unable to create

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-spot
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

ManuPhilip avatar image
0 Votes"
ManuPhilip answered

Hello @MicheleA ,

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

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

MicheleA avatar image
0 Votes"
MicheleA answered ManuPhilip edited

hello @ManuPhilip 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!


· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello,

Get-AzComputeResourceSku returns all the possible SKUs available for the location disregarding limitations of your subscription. So, try
Get-AzureRMVMSize -Location 'locationname' and see the option suitable for your account.

Thanks,

Manu

0 Votes 0 ·
MicheleA avatar image
0 Votes"
MicheleA answered ManuPhilip commented

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

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello,

I am not able to figure out the issue. If the field Size is filled up as shown below, it should work for you too. Another thing is make sure that you have selected the right subscription from the dropdown list. Sometimes, the default subscription selected is no more valid/disabled
8725-spot.png


0 Votes 0 ·
spot.png (47.9 KiB)
MicheleA avatar image
1 Vote"
MicheleA answered MicheleA commented

@ManuPhilip 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.

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello, I'm having the same problem, did you have any response to your request from Microsoft?

0 Votes 0 ·

hello, no. I simply gave up and created a different type of server. official support proved useless.

1 Vote 1 ·
AbdulrahmanF avatar image
2 Votes"
AbdulrahmanF answered GeoffMcDonald-8938 edited

60675-capture.png



capture.png (10.9 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks, this was the answer for me, and I suspect all the people above. On a subscription that is via Benefits, Sponsored, or Free Trial, the spot instances are not available. Mine is a Visual Studio Ultimate with MSDN subscription, so it doesn't work. There seems to be no way to decode the error using the documentation of the error. Thanks Abdulrahman!

@MicheleA, I think you should mark this as the answer to your question to help others?

0 Votes 0 ·