Notitie
Voor toegang tot deze pagina is autorisatie vereist. U kunt proberen u aan te melden of de directory te wijzigen.
Voor toegang tot deze pagina is autorisatie vereist. U kunt proberen de mappen te wijzigen.
Met onderhoudsbeheer kunt u bepalen wanneer u automatische upgrades van OS-afbeeldingen wilt toepassen op uw virtuele machineschaalsets. Zie Onderhoudsbeheer voor Virtuele-machineschaalsets van Azure voor meer informatie over het gebruik van onderhoudsbeheer.
In dit artikel wordt uitgelegd hoe u een ARM-sjabloon (Azure Resource Manager) kunt gebruiken om een onderhoudsconfiguratie te maken. U leert het volgende:
- De configuratie maken
- De configuratie toewijzen aan een virtuele machine
Een Azure Resource Manager-sjabloon is een JSON-bestand (JavaScript Object Notation) dat de infrastructuur en configuratie voor uw project definieert. Voor de sjabloon is declaratieve syntaxis vereist. U beschrijft de beoogde implementatie zonder de reeks programmeeropdrachten te schrijven om de implementatie te maken.
De configuratie maken
Tijdens het maken van de configuratie is het belangrijk om te weten dat er verschillende domeinen bestaan en dat elk unieke eigenschappen heeft in hun sjabloon voor het creëren. Zorg ervoor dat u de juiste gebruikt.
Zie maintenanceConfigurations voor meer informatie over deze onderhoudsconfiguratiesjabloon.
Host- en besturingssysteemafbeelding
{
"type": "Microsoft.Maintenance/maintenanceConfigurations",
"apiVersion": "2021-09-01-preview",
"name": "string",
"location": "string",
"tags": {
"tagName1": "tagValue1",
"tagName2": "tagValue2"
},
"properties": {
"extensionProperties": {},
"installPatches": {
"linuxParameters": {
"classificationsToInclude": [ "string" ],
"packageNameMasksToExclude": [ "string" ],
"packageNameMasksToInclude": [ "string" ]
},
"rebootSetting": "string",
"tasks": {
"postTasks": [
{
"parameters": {},
"source": "string",
"taskScope": "string"
}
],
"preTasks": [
{
"parameters": {},
"source": "string",
"taskScope": "string"
}
]
},
"windowsParameters": {
"classificationsToInclude": [ "string" ],
"excludeKbsRequiringReboot": "bool",
"kbNumbersToExclude": [ "string" ],
"kbNumbersToInclude": [ "string" ]
}
},
"maintenanceScope": "string",
"maintenanceWindow": {
"duration": "string",
"expirationDateTime": "string",
"recurEvery": "string",
"startDateTime": "string",
"timeZone": "string"
},
"namespace": "string",
"visibility": "string"
}
}
De configuratie toewijzen
Wijs de configuratie toe aan een virtuele machine.
Zie configurationAssignments voor meer informatie.
{
"type": "Microsoft.Maintenance/configurationAssignments",
"apiVersion": "2021-09-01-preview",
"name": "[variables('maintenanceConfigurationAssignmentName')]",
"location": "string (e.g. westeurope)",
"scope": "Resource Id of the resource that is being assigned to the Maintenance Configuration (e.g. VMSS Id)"
"properties": {
"maintenanceConfigurationId": "Resource Id of the Maintenance Configuration"
"resourceId": "Resource Id of the resource that is being assigned to the Maintenance Configuration (e.g. VMSS Id)"
}
}