question

AntoineBitLogiK-8582 avatar image
0 Votes"
AntoineBitLogiK-8582 asked Suresh8771 answered

Know the available resources before VM creation ?

Some resources for VMS are exhausted, and all the validations pass, but the spot deployment fails afterwards.

{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.","details":[{"code":"OverconstrainedAllocationRequest","message":"Allocation failed. VM(s) with the following constraints cannot be allocated, because the condition is too restrictive. Please remove some constraints and try again. Constraints applied are:\n - Low Priority VMs\n - Networking Constraints (such as Accelerated Networking or IPv6)\n - Preemptible VMs (VM might be preempted by another VM with a higher priority)\n - VM Size\n"}]}

Running the diagnostic on the failure :

There are currently not enough cores of the VM Size Family you requested in this region.
This is not a quota issue. To self-mitigate, please use a different VM Size Family or a different region.

When a VM creation fails, there are the networks and the disk objects created for this VM, requiring a deletion after the failures. The overall process is quite painful, as when we have a failure on a creation, then one needs a cleaning of the created "partial" resources.

How to know or look, in the portal, the availability without trying to instantiate new VM ? Is there any method to see the machine availability before sending a request to create a new VM ?
Same question applies for a VM set, which is useful to create multiple identical VMs.
Additionally, why is the verification pass when there is no resource available?

This issue is occurring often when creating spot instances, and it is very annoying for the VM management.

msc-virtual-machine-managerazure-virtual-machines-scale-setazure-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.

CristianSPIRIDON72 avatar image
0 Votes"
CristianSPIRIDON72 answered

It might not be possible to know in advance if you can create a spot instance or not.
I think the best way to deal with spot instances is programmatically. You can create each resource you need (disk, network, ...) beforehand and if VM creation fail you will delete unneeded resources with a script.

Hope this helps.

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.

Suresh8771 avatar image
0 Votes"
Suresh8771 answered

facing similar issue [ { "code": "OverconstrainedZonalAllocationRequest", "message": "Allocation failed. VM(s) with the following constraints cannot be allocated, because the condition is too restrictive. Please remove some constraints and try again. Constraints applied are:\n - Availability Zone\n - VM Size\n" } ]

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.