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

VMGuestPatch Updates: Updated patch status in VMInstanceView, properties in AssessPatches API and patch settings in Windows and Linux Configuration in VMModel #11768

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions custom-words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,7 @@ hierarchyid
hivevar
HKEY
homepagetest
hotpatching
Horovod
hostnames
Hotfix
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3038,14 +3038,23 @@
"Create a vm with Host Encryption using encryptionAtHost property.": {
"$ref": "./examples/CreateAVmWithEncryptionAtHost.json"
},
"Create a vm with a patch setting patchMode of AutomaticByOS.": {
"$ref": "./examples/CreateAVmWithPatchSettingModeOfAutomaticByOS.json"
"Create a Windows vm with a patch setting patchMode of AutomaticByOS.": {
"$ref": "./examples/CreateAWindowsVmWithPatchSettingModeOfAutomaticByOS.json"
},
"Create a vm with a patch setting patchMode of AutomaticByPlatform.": {
"$ref": "./examples/CreateAVmWithPatchSettingModeOfAutomaticByPlatform.json"
"Create a Windows vm with a patch setting patchMode of AutomaticByPlatform.": {
"$ref": "./examples/CreateAWindowsVmWithPatchSettingModeOfAutomaticByPlatform.json"
},
"Create a vm with a patch setting patchMode of Manual.": {
"$ref": "./examples/CreateAVmWithPatchSettingModeOfManual.json"
"Create a Windows vm with a patch setting patchMode of Manual.": {
"$ref": "./examples/CreateAWindowsVmWithPatchSettingModeOfManual.json"
},
"Create a Windows vm with a patch setting patchMode of AutomaticByPlatform and enableHotpatching set to true.": {
"$ref": "./examples/CreateAWindowsVmWithPatchSettingModeOfAutomaticByPlatformAndEnableHotPatchingTrue.json"
},
"Create a Linux vm with a patch setting patchMode of AutomaticByPlatform.": {
"$ref": "./examples/CreateALinuxVmWithPatchSettingModeOfAutomaticByPlatform.json"
},
"Create a Linux vm with a patch setting patchMode of ImageDefault.": {
"$ref": "./examples/CreateALinuxVmWithPatchSettingModeOfImageDefault.json"
},
"Create a vm with an extensions time budget.": {
"$ref": "./examples/CreateAVmWithExtensionsTimeBudget.json"
Expand Down Expand Up @@ -7808,7 +7817,7 @@
"readOnly": true,
"description": "The version number of the patch. This property applies only to Linux patches."
},
"kbid": {
"kbId": {
"type": "string",
"readOnly": true,
"description": "The KBID of the patch. Only applies to Windows patches."
Expand All @@ -7826,12 +7835,13 @@
"readOnly": true,
"description": "Describes the reboot requirements of the patch.",
"enum": [
"Unknown",
"NeverReboots",
"AlwaysRequiresReboot",
"CanRequestReboot"
],
"x-ms-enum": {
"name": "SoftwareUpdateRebootBehavior",
"name": "VMGuestPatchRebootBehavior",
"modelAsString": true
}
},
Expand All @@ -7855,13 +7865,9 @@
"assessmentState": {
"type": "string",
"readOnly": true,
"description": "Describes the outcome of an install operation for a given patch.",
"description": "Describes the availability of a given patch.",
"enum": [
"Installed",
"Failed",
"Excluded",
"NotSelected",
"Pending",
"Unknown",
"Available"
],
"x-ms-enum": {
Expand Down Expand Up @@ -7918,7 +7924,7 @@
"format": "date-time",
"description": "The UTC timestamp when the operation began."
},
"patches": {
"availablePatches": {
rane-rajasi marked this conversation as resolved.
Show resolved Hide resolved
"type": "array",
"readOnly": true,
"items": {
Expand Down Expand Up @@ -9190,8 +9196,8 @@
"description": "Specifies additional base-64 encoded XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup."
},
"patchSettings": {
"$ref": "#/definitions/PatchSettings",
"description": "Specifies settings related to in-guest patching (KBs)."
"$ref": "#/definitions/WindowsPatchSettings",
"description": "Specifies settings related to VM Guest Patching on Windows."
},
"winRM": {
"$ref": "#/definitions/WinRMConfiguration",
Expand Down Expand Up @@ -9238,6 +9244,10 @@
"provisionVMAgent": {
"type": "boolean",
"description": "Indicates whether virtual machine agent should be provisioned on the virtual machine. <br><br> When this property is not specified in the request body, default behavior is to set it to true. This will ensure that VM Agent is installed on the VM so that extensions can be added to the VM later."
},
"patchSettings": {
"$ref": "#/definitions/LinuxPatchSettings",
"description": "Specifies settings related to VM Guest Patching on Linux."
}
},
"description": "Specifies the Linux operating system settings on the virtual machine. <br><br>For a list of supported Linux distributions, see [Linux on Azure-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json) <br><br> For running non-endorsed distributions, see [Information for Non-Endorsed Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)."
Expand Down Expand Up @@ -12406,22 +12416,44 @@
"action"
]
},
"PatchSettings": {
"WindowsPatchSettings": {
"properties": {
"patchMode": {
"type": "string",
"description": "Specifies the mode of in-guest patching to IaaS virtual machine.<br /><br /> Possible values are:<br /><br /> **Manual** - You control the application of patches to a virtual machine. You do this by applying patches manually inside the VM. In this mode, automatic updates are disabled; the property WindowsConfiguration.enableAutomaticUpdates must be false<br /><br /> **AutomaticByOS** - The virtual machine will automatically be updated by the OS. The property WindowsConfiguration.enableAutomaticUpdates must be true. <br /><br /> ** AutomaticByPlatform** - the virtual machine will automatically updated by the platform. The properties provisionVMAgent and WindowsConfiguration.enableAutomaticUpdates must be true ",
"description": "Specifies the mode of VM Guest Patching to IaaS virtual machine.<br /><br /> Possible values are:<br /><br /> **Manual** - You control the application of patches to a virtual machine. You do this by applying patches manually inside the VM. In this mode, automatic updates are disabled; the property WindowsConfiguration.enableAutomaticUpdates must be false<br /><br /> **AutomaticByOS** - The virtual machine will automatically be updated by the OS. The property WindowsConfiguration.enableAutomaticUpdates must be true. <br /><br /> ** AutomaticByPlatform** - the virtual machine will automatically updated by the platform. The properties provisionVMAgent and WindowsConfiguration.enableAutomaticUpdates must be true ",
rane-rajasi marked this conversation as resolved.
Show resolved Hide resolved
"enum": [
"Manual",
"AutomaticByOS",
"AutomaticByPlatform"
],
"x-ms-enum": {
"name": "InGuestPatchMode",
"name": "WindowsVMGuestPatchMode",
"modelAsString": true
}
},
"enableHotpatching": {
"type": "boolean",
"description": "Enables customers to patch their Azure VMs without requiring a reboot. For enableHotpatching, the 'provisionVMAgent' must be set to true and 'patchMode' must be set to 'AutomaticByPlatform'."
rane-rajasi marked this conversation as resolved.
Show resolved Hide resolved
}
}
},
"description": "Specifies settings related to VM Guest Patching on Windows."
},
"LinuxPatchSettings": {
"properties": {
"patchMode": {
"type": "string",
"description": "Specifies the mode of VM Guest Patching to IaaS virtual machine.<br /><br /> Possible values are:<br /><br /> **ImageDefault** - The virtual machine's default patching configuration is used. <br /><br /> **AutomaticByPlatform** - The virtual machine will be automatically updated by the platform. The property provisionVMAgent must be true",
"enum": [
"ImageDefault",
"AutomaticByPlatform"
],
"x-ms-enum": {
"name": "LinuxVMGuestPatchMode",
"modelAsString": true
}
}
},
"description": "Specifies settings related to VM Guest Patching on Linux."
},
"VirtualMachinePatchStatus": {
"properties": {
Expand All @@ -12432,6 +12464,14 @@
"lastPatchInstallationSummary": {
"$ref": "#/definitions/LastPatchInstallationSummary",
"description": "The installation summary of the latest installation operation for the virtual machine."
},
"configurationStatuses": {
"description": "The enablement status of the specified patchMode",
"readOnly": true,
"type": "array",
"items": {
"$ref": "#/definitions/InstanceViewStatus"
}
}
},
"description": "The status of virtual machine patch operations."
Expand Down Expand Up @@ -12524,22 +12564,6 @@
"readOnly": true,
"description": "Describes whether the operation ran out of time before it completed all its intended actions"
},
"rebootStatus": {
"type": "string",
"readOnly": true,
"description": "The reboot status of the machine after the patch operation. It will be in \"NotNeeded\" status if reboot is not needed after the patch operation. \"Required\" will be the status once the patch is applied and machine is required to reboot. \"Started\" will be the reboot status when the machine has started to reboot. \"Failed\" will be the status if the machine is failed to reboot. \"Completed\" will be the status once the machine is rebooted successfully",
"enum": [
"NotNeeded",
"Required",
"Started",
"Failed",
"Completed"
],
"x-ms-enum": {
"name": "RebootStatus",
"modelAsString": true
}
},
rane-rajasi marked this conversation as resolved.
Show resolved Hide resolved
"notSelectedPatchCount": {
"type": "integer",
"readOnly": true,
Expand Down Expand Up @@ -12582,11 +12606,6 @@
"format": "date-time",
"description": "The UTC timestamp when the operation began."
},
"startedBy": {
rane-rajasi marked this conversation as resolved.
Show resolved Hide resolved
"type": "string",
"readOnly": true,
"description": "The person or system account that started the operation"
},
"error": {
"$ref": "#/definitions/ApiError",
"readOnly": true,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
{
"parameters": {
"subscriptionId": "{subscription-id}",
"resourceGroupName": "myResourceGroup",
"vmName": "myVM",
"api-version": "2020-12-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"
}
}
},
"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"
}
}
},
"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"
}
}
},
"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