Azure has a number of built-in VM agent related policies. E.g. for installing the dependency agent, log analytics agent or the new Azure Monitoring Agent via a deployifnotexists effect. Examples are:
- Configure Linux machines to run Azure Monitor Agent and associate them to a Data Collection Rule
- Configure Windows machines to run Azure Monitor Agent and associate them to a Data Collection Rule
Since we are only using CIS images from the marketplace our VM's are ignored in the policy evaluation. Both these initatives contain a parameter for additional virtual machine image ID's. It accepts an array of image ID's something like: listOfWindowsImageIdToInclude or listOfLinuxImageIdToInclude. However when I inspect the properties of my VM (ImageReference) the property ID is always empty:
If I query the marketplace it shows something like this:
I already included those Ids in the intiative parameter but without success.