AZ-900 Microsoft Azure Fundamentals 2020

Sign Up Free or Log In to participate!

Can’t create VM

Can’t create VM in sandbox environment as getting following error 

{"code":"InvalidTemplateDeployment","message":"The template deployment failed because of policy violation. Please see details for more information.","details":[{"code":"RequestDisallowedByPolicy","target":"AZ900","message":"Resource ‘AZ900’ was disallowed by policy. (Code: RequestDisallowedByPolicy)","additionalInfo":[{"type":"PolicyViolation","info":{"policyDefinitionDisplayName":"Deny hybrid use benefit","evaluationDetails":{"evaluatedExpressions":[{"result":"True","expressionKind":"Field","expression":"type","path":"type","expressionValue":"Microsoft.Compute/virtualMachines","targetValue":["Microsoft.Compute/virtualMachines","Microsoft.Compute/VirtualMachineScaleSets"],"operator":"In"},{"result":"True","expressionKind":"Field","expression":"Microsoft.Compute/licenseType","path":"properties.licenseType","expressionValue":"Windows_Server","targetValue":"Windows_Server","operator":"Equals"}]},"policyDefinitionId":"/providers/Microsoft.Management/managementGroups/3617ef9b-98b4-40d9-ba43-e1ed6709cf0d/providers/Microsoft.Authorization/policyDefinitions/d54bfe64-4643-4f5c-aa37-dc3fb9ccccc0","policyDefinitionName":"d54bfe64-4643-4f5c-aa37-dc3fb9ccccc0","policyDefinitionEffect":"deny","policyAssignmentId":"/providers/Microsoft.Management/managementGroups/3617ef9b-98b4-40d9-ba43-e1ed6709cf0d/providers/Microsoft.Authorization/policyAssignments/dab5ee61cc814d0cb7454a3a","policyAssignmentName":"dab5ee61cc814d0cb7454a3a","policyAssignmentDisplayName":"Deny hybrid use benefit","policyAssignmentScope":"/providers/Microsoft.Management/managementGroups/3617ef9b-98b4-40d9-ba43-e1ed6709cf0d"}}],"policyDetails":[{"isInitiative":false,"assignmentId":"/providers/Microsoft.Management/managementGroups/3617ef9b-98b4-40d9-ba43-e1ed6709cf0d/providers/Microsoft.Authorization/policyAssignments/dab5ee61cc814d0cb7454a3a","assignmentName":"Deny hybrid use benefit","nonComplianceMessage":null,"viewDetailsUri":"https://portal.azure.com#blade/Microsoft_Azure_Policy/EditAssignmentBladeV2/assignmentId/%2Fproviders%2FMicrosoft.Management%2FmanagementGroups%2F3617ef9b-98b4-40d9-ba43-e1ed6709cf0d%2Fproviders%2FMicrosoft.Authorization%2FpolicyAssignments%2Fdab5ee61cc814d0cb7454a3a"}]}]}

KhurumA.

It seems to be a policy violation for "Deny hybrid use benefit" in the sandbox account. Here’s more about the the policy from Azure, "Azure Hybrid Benefit is a licensing benefit that helps you to significantly reduce the costs of running your workloads in the cloud. It works by letting you use your on-premises Software Assurance-enabled Windows Server and SQL Server licenses on Azure. And now, this benefit applies to RedHat and SUSE Linux subscriptions, too." Are you using your own Windows Server license to deploy this VM?

0 Answers

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?