Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GuestPatching: Adding AutomaticByPlatformSettings (in VMSS and VM model) and useRollingUpgradePolicy (in VMSS model) properties #18581

Merged
merged 8 commits into from
Apr 21, 2022
Original file line number Diff line number Diff line change
Expand Up @@ -1769,6 +1769,10 @@
"name": "WindowsPatchAssessmentMode",
"modelAsString": true
}
},
"automaticByPlatformSettings": {
"$ref": "#/definitions/WindowsVMGuestPatchAutomaticByPlatformSettings",
"description": "Specifies additional settings for patch mode AutomaticByPlatform in VM Guest Patching on Windows."
rane-rajasi marked this conversation as resolved.
Show resolved Hide resolved
}
},
"description": "Specifies settings related to VM Guest Patching on Windows."
Expand Down Expand Up @@ -1798,9 +1802,53 @@
"name": "LinuxPatchAssessmentMode",
"modelAsString": true
}
},
"automaticByPlatformSettings": {
"$ref": "#/definitions/LinuxVMGuestPatchAutomaticByPlatformSettings",
"description": "Specifies additional settings for patch mode AutomaticByPlatform in VM Guest Patching on Linux."
}
},
"description": "Specifies settings related to VM Guest Patching on Linux."
},
"WindowsVMGuestPatchAutomaticByPlatformSettings": {
"type": "object",
"properties": {
"rebootSetting": {
"type": "string",
"description": "Specifies the reboot setting for all AutomaticByPlatform patch installation operations.",
"enum": [
"Unknown",
rane-rajasi marked this conversation as resolved.
Show resolved Hide resolved
"IfRequired",
"Never",
"Always"
],
"x-ms-enum": {
"name": "WindowsVMGuestPatchAutomaticByPlatformRebootSetting",
"modelAsString": true
}
}
},
"description": "Specifies additional settings to be applied when patch mode AutomaticByPlatform is selected in Windows patch settings."
},
"LinuxVMGuestPatchAutomaticByPlatformSettings": {
"type": "object",
"properties": {
"rebootSetting": {
"type": "string",
"description": "Specifies the reboot setting for all AutomaticByPlatform patch installation operations.",
"enum": [
"Unknown",
rane-rajasi marked this conversation as resolved.
Show resolved Hide resolved
"IfRequired",
"Never",
"Always"
],
"x-ms-enum": {
"name": "LinuxVMGuestPatchAutomaticByPlatformRebootSetting",
"modelAsString": true
}
}
},
"description": "Specifies additional settings to be applied when patch mode AutomaticByPlatform is selected in Linux patch settings."
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
{
"parameters": {
"subscriptionId": "{subscription-id}",
"resourceGroupName": "myResourceGroup",
"vmName": "myVM",
"api-version": "2022-03-01",
"parameters": {
"location": "westus",
"properties": {
"hardwareProfile": {
"vmSize": "Standard_D2s_v3"
},
"storageProfile": {
"imageReference": {
"sku": "16.04-LTS",
"publisher": "Canonical",
"version": "latest",
"offer": "UbuntuServer"
},
"osDisk": {
"caching": "ReadWrite",
"managedDisk": {
"storageAccountType": "Premium_LRS"
},
"name": "myVMosdisk",
"createOption": "FromImage"
}
},
"osProfile": {
"adminUsername": "{your-username}",
"computerName": "myVM",
"adminPassword": "{your-password}",
"linuxConfiguration": {
"provisionVMAgent": true,
"patchSettings": {
"patchMode": "AutomaticByPlatform",
"assessmentMode": "AutomaticByPlatform",
"automaticByPlatformSettings": {
"rebootSetting": "Never"
}
}
}
},
"networkProfile": {
"networkInterfaces": [
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}",
"properties": {
"primary": true
}
}
]
}
}
}
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
"type": "Microsoft.Compute/virtualMachines",
"properties": {
"osProfile": {
"adminUsername": "{your-username}",
"secrets": [],
"computerName": "myVM",
"linuxConfiguration": {
"provisionVMAgent": true,
"patchSettings": {
"patchMode": "AutomaticByPlatform",
"assessmentMode": "AutomaticByPlatform",
"automaticByPlatformSettings": {
"rebootSetting": "Never"
}
}
}
},
"networkProfile": {
"networkInterfaces": [
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
"properties": {
"primary": true
}
}
]
},
"storageProfile": {
"imageReference": {
"sku": "16.04-LTS",
"publisher": "Canonical",
"version": "latest",
"offer": "UbuntuServer"
},
"osDisk": {
"osType": "Linux",
"caching": "ReadWrite",
"createOption": "FromImage",
"name": "myVMosdisk",
"managedDisk": {
"storageAccountType": "Premium_LRS"
}
},
"dataDisks": []
},
"vmId": "a149cd25-409f-41af-8088-275f5486bc93",
"hardwareProfile": {
"vmSize": "Standard_D2s_v3"
},
"provisioningState": "Creating"
},
"name": "myVM",
"location": "westus"
}
},
"201": {
"body": {
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM",
"type": "Microsoft.Compute/virtualMachines",
"properties": {
"osProfile": {
"adminUsername": "{your-username}",
"secrets": [],
"computerName": "myVM",
"linuxConfiguration": {
"provisionVMAgent": true,
"patchSettings": {
"patchMode": "AutomaticByPlatform",
"assessmentMode": "AutomaticByPlatform",
"automaticByPlatformSettings": {
"rebootSetting": "Never"
}
}
}
},
"networkProfile": {
"networkInterfaces": [
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic",
"properties": {
"primary": true
}
}
]
},
"storageProfile": {
"imageReference": {
"sku": "16.04-LTS",
"publisher": "Canonical",
"version": "latest",
"offer": "UbuntuServer"
},
"osDisk": {
"osType": "Linux",
"caching": "ReadWrite",
"createOption": "FromImage",
"name": "myVMosdisk",
"managedDisk": {
"storageAccountType": "Premium_LRS"
}
},
"dataDisks": []
},
"vmId": "a149cd25-409f-41af-8088-275f5486bc93",
"hardwareProfile": {
"vmSize": "Standard_D2s_v3"
},
"provisioningState": "Creating"
},
"name": "myVM",
"location": "westus"
}
}
}
}
Loading