AZ-500 • Practice Exam 57
Free AZ-500 practice exam — 20 questions with explanations. Set 57. No signup required.
Refer to the exhibit. You are assigned a policy that deploys the Log Analytics agent to Linux VMs. After assigning this policy to a subscription, you notice that existing Linux VMs are not getting the agent deployed, but newly created VMs receive the agent. What is the most likely reason?
{
"properties": {
"displayName": "Deploy Log Analytics agent for Linux VMs",
"policyType": "BuiltIn",
"description": "Deploys the Log Analytics agent to Linux virtual machines if the agent is not installed.",
"parameters": {
"workspaceId": {
"type": "String",
"metadata": {
"displayName": "Workspace ID"
}
}
},
"policyRule": {
"if": {
"field": "type",
"equals": "Microsoft.Compute/virtualMachines"
},
"then": {
"effect": "deployIfNotExists",
"details": {
"type": "Microsoft.Compute/virtualMachines/extensions",
"existenceCondition": {
"field": "Microsoft.Compute/virtualMachines/extensions/type",
"equals": "OmsAgentForLinux"
},
"deployment": {
"properties": {
"mode": "incremental",
"template": {
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"resources": [
{
"name": "[concat(parameters('vmName'), '/OmsAgent')]",
"type": "Microsoft.Compute/virtualMachines/extensions",
"location": "[parameters('location')]",
"properties": {
"publisher": "Microsoft.EnterpriseCloud.Monitoring",
"type": "OmsAgentForLinux",
"typeHandlerVersion": "1.0",
"settings": {
"workspaceId": "[parameters('workspaceId')]"
}
}
}
]
}
}
}
}
}
}
}
}