@Kelvin Jefferson Thanks for posting your query on Microsoft Q&A.
From your post, my understanding is that you are trying to create a VM using Azure CLI. The error message indicates that the requested VM size Standard_D2s_v4
is currently not available in location westus2.
You receive this error in the following scenarios:
- When the resource SKU you've selected, such as VM size, isn't available for a location or zone.
- If you're deploying an Azure Spot VM or Spot scale set instance, and there isn't any capacity for Azure Spot in this location. For more information, see Spot error messages.
Solution: The recommendation in this case is to try another VM size or deploy to a different location or different zone as westus2 location has capacity constraints currently for VM size Standard_D2s_v4.
Alternatively, if a SKU isn't available for your subscription in a location or zone that meets your business needs, you can try submitting a SKU request to Azure Support.
To determine which SKUs are available in a location or zone, use the az vm list-skus command. You can view all the compute resources for a location's availability zones. By default, only SKUs without restrictions are displayed. To include SKUs with restrictions, use the --all
parameter. More detailed commands here.
Reference documentation: Resolve errors for SKU not available
If you have any query specific to trusted launch or creating new VM with Standard public IP, please elaborate on the issue and I can investigate it.
Hope that helps.
If you still have questions, please let us know in the "comments" and we would be happy to help you. Comment is the fastest way of notifying the experts.
If this helps, please 'Accept answer' so that it can help others in the community looking for help on the same topic.