Unable to deploy windows VM in Azure Playground

Even though i am choosing the recommended VM SKU , it is giving the policy error. there is no configuration to choose OS disk size from the portal . Can you please suggest .

VM TYPE CPU RAM (GB)
Standard_B1s 1 1
Standard_B2s 2 4
Standard_DS1_v2s 1 3.5
Standard_D2s_v3 2 8

{
“status”: “Failed”,
“error”: {
“code”: “RequestDisallowedByPolicy”,
“message”: “Resource ‘vm3_OsDisk_1_ace918f8fb25424292db1dc325e84ed0’ was disallowed by policy. Policy identifiers: ‘[{"policyAssignment":{"name":"Azure KodeKloud Sandbox","id":"/subscriptions/8fea4313-4937-4746-ba29-a7f8758e55ba/resourceGroups/ResourceGroup1lod20258649/providers/Microsoft.Authorization/policyAssignments/policyAssignment1565"},"policyDefinition":{"name":"Azure KodeKloud Sandbox","id":"/subscriptions/8fea4313-4937-4746-ba29-a7f8758e55ba/providers/Microsoft.Authorization/policyDefinitions/policy1565"}}]’. Target: ‘/subscriptions/8fea4313-4937-4746-ba29-a7f8758e55ba/resourceGroups/ResourceGroup1lod20258649/providers/Microsoft.Compute/disks/vm3_OsDisk_1_ace918f8fb25424292db1dc325e84ed0’.”
}
}

Any update in this one please ?

Hi @abhishekagg24 ,
Thank you for your patience. Can you please try creating a VM with the specs - there is an option to specify the size of the disk. Let me know if you have any other queries.

I’m also facing the same issue while deploying a Windows Server 2019 Datacenter.

Error

{
“code”: “DeploymentFailed”,
“message”: “At least one resource deployment operation failed. Please list deployment operations for details. Please see Deployment history - Azure Resource Manager | Microsoft Learn for usage details.”,
“details”: [
{
“code”: “RequestDisallowedByPolicy”,
“message”: “Resource ‘demovm3_disk1_797fe7f5401a4ae1ac95758dd587df84’ was disallowed by policy. Policy identifiers: ‘[{"policyAssignment":{"name":"Azure KodeKloud Sandbox","id":"/subscriptions/8fea4313-4937-4746-ba29-a7f8758e55ba/resourceGroups/ResourceGroup1lod20793041/providers/Microsoft.Authorization/policyAssignments/policyAssignment1565"},"policyDefinition":{"name":"Azure KodeKloud Sandbox","id":"/subscriptions/8fea4313-4937-4746-ba29-a7f8758e55ba/providers/Microsoft.Authorization/policyDefinitions/policy1565"}}]’. Target: ‘/subscriptions/8fea4313-4937-4746-ba29-a7f8758e55ba/resourceGroups/ResourceGroup1lod20793041/providers/Microsoft.Compute/disks/demovm3_disk1_797fe7f5401a4ae1ac95758dd587df84’.”
}
]
}

@Dinesh_Kodekloud This didn’t help. I specified 10GB SSD which is as per specs.

Hi,
I am also facing the same error while deploying VM with Windows Server 2016 on Azure playground i.e. “RequestDisallowedByPolicy”. I am following all the prescribed specifications. Please help to provide the solution for the same.

Thanks
Anant

1 Like

Hi,

Thank you for reaching out to us. We are currently updating the backend to support more services including support for windows based AMI’s.

Apologies for the inconvenience, this should be available in a few weeks.

Regards,
Vijin

Hi @vijin.palazhi

I have tried to deploy the azure windows vm but getting policy issue everytime. Can you plz suggest how can i fix this.

Hi Vijin, / Kodekloud team

Trying to install Azure VM failing with same error reported in this thread

{“code”:“InvalidTemplateDeployment”,“message”:“The template deployment failed because of policy violation. Please see details for more information.”,“details”:[{“code”:“RequestDisallowedByPolicy”,“target”:“rsWS2019_DataDisk_0”,“message”:“Resource ‘rsWS2019_DataDisk_0’ was disallowed by policy. (Code: RequestDisallowedByPolicy)”,“additionalInfo”:[{“type”:“PolicyViolation”,“info”:{“policyDefinitionDisplayName”:“azureV28922-673609-PolicyDefinition”,“evaluationDetails”:{“evaluatedExpressions”:[{“result”:“False”,“expressionKind”:“Field”,“expression”:“type”,“path”:“type”,“expressionValue”:“Microsoft.Compute/disks”,“targetValue”:“Microsoft.Compute/virtualMachines”,“operator”:“Like”},{“result”:“False”,“expressionKind”:“Field”,“expression”:“type”,“path”:“type”,“expressionValue”:“Microsoft.Compute/disks”,“targetValue”:“Microsoft.Compute/sshPublicKeys”,“operator”:“Like”},{“result”:“False”,“expressionKind”:“Field”,“expression”:“type”,“path”:“type”,“expressionValue”:“Microsoft.Compute/disks”,“targetValue”:“Microsoft.Compute/virtualMachineScaleSets”,“operator”:“Like”},{“result”:“True”,“expressionKind”:“Field”,“expression”:“type”,“path”:“type”,“expressionValue”:“Microsoft.Compute/disks”,“targetValue”:“Microsoft.Compute/disks”,“operator”:“Equals”},{“result”:“True”,“expressionKind”:“Field”,“expression”:“Microsoft.Compute/disks/sku.name”,“path”:“sku.name”,“expressionValue”:“Premium_LRS”,“targetValue”:“Premium*”,“operator”:“Like”}]},“policyDefinitionId”:“/subscriptions/b2aec48f-6dad-4d57-ad25-dad521fe74a4/providers/Microsoft.Authorization/policyDefinitions/azureV28922-673609-PolicyDefinition”,“policyDefinitionName”:“azureV28922-673609-PolicyDefinition”,“policyDefinitionEffect”:“deny”,“policyAssignmentId”:“/subscriptions/b2aec48f-6dad-4d57-ad25-dad521fe74a4/resourceGroups/ODL-azureV2-673609/providers/Microsoft.Authorization/policyAssignments/azureV28922-673609-PolicyDefinition-ODL-azureV2-673609”,“policyAssignmentName”:“azureV28922-673609-PolicyDefinition-ODL-azureV2-673609”,“policyAssignmentDisplayName”:“azureV28922-673609-PolicyDefinition-ODL-azureV2-673609”,“policyAssignmentScope”:“/subscriptions/b2aec48f-6dad-4d57-ad25-dad521fe74a4/resourceGroups/ODL-azureV2-673609”}}],“policyDetails”:[{“isInitiative”:false,“assignmentId”:“/subscriptions/b2aec48f-6dad-4d57-ad25-dad521fe74a4/resourceGroups/ODL-azureV2-673609/providers/Microsoft.Authorization/policyAssignments/azureV28922-673609-PolicyDefinition-ODL-azureV2-673609”,“assignmentName”:“azureV28922-673609-PolicyDefinition-ODL-azureV2-673609”,“nonComplianceMessage”:null,“viewDetailsUri”:“Microsoft Azure”}]}]}

could pls take a look and suggest ho to overcome this issue

sharath, how did you resolve this issue

sharath, how did you resolve this issue

Brother, i tried to deploy the linux vm and i was able to do it. Didn’t try with windows vm

Hi @grasajjan ,
It seems like you are selecting the disk type - Premium, which is not supported yet.
Please select the Standard SSD and HDD only.

Regards,
KodeKloud Support