@Yasmin, Fitri Thanks for reaching out. I would suggest you to create separate custom policy definitions based on operating systems as the process of enabling automatic VM guest patching differs in the properties provided.
Windows Snippet to enable automatic VM guest patching.
{
"location": "<location>",
"properties": {
"osProfile": {
"windowsConfiguration": {
"provisionVMAgent": true,
"enableAutomaticUpdates": true,
"patchSettings": {
"patchMode": "AutomaticByPlatform"
}
}
}
}
}
Linux Snippet to enable automatic VM guest patching.
{
"location": "<location>",
"properties": {
"osProfile": {
"linuxConfiguration": {
"provisionVMAgent": true,
"patchSettings": {
"patchMode": "AutomaticByPlatform"
}
}
}
}
}