Change default disk option to Standard disk from premium when creating virtual machine

Sri Manthena 6 Reputation points
2022-04-19T17:19:07.407+00:00

Change default disk option to Standard disk from premium when creating virtual machine .
Hi Team I want to change the default disk option when deploying the VM from premium to standard wanted to know if this possible .
I am trying to help customer who is trying to make sure the users are not using premium by default .

Azure Disk Storage
Azure Disk Storage
A high-performance, durable block storage designed to be used with Azure Virtual Machines and Azure VMware Solution.
630 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Sam Cogan 10,502 Reputation points MVP
    2022-04-19T17:24:56.127+00:00

    You cannot change the default option that is selected in the UI. However, you could use Azure policy to prevent users from creating VM's with premium disks. For example this policy will block the creation of premium disks:

    {
            "mode": "All",
            "parameters": {},
            "policyRule": {
                "if": {
                    "allOf": [
                        {
                            "field": "type",
                            "equals": "Microsoft.Compute/disks"
                        },
                        {
                            "field": "Microsoft.Compute/disks/sku.name",
                            "equals": "Premium_LRS"
                        }
                    ]
                },
                "then": {
                    "effect": "deny"
                }
            }
    }
    

  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

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.