diff --git a/src/azure-cli/azure/cli/command_modules/vm/_help.py b/src/azure-cli/azure/cli/command_modules/vm/_help.py index 34ee4e5ff69..043cfaa5618 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/_help.py +++ b/src/azure-cli/azure/cli/command_modules/vm/_help.py @@ -820,6 +820,16 @@ text: az vm assess-patches -g MyResourceGroup -n MyVm """ +helps['vm install-patches'] = """ +type: command +short-summary: Install patches on a VM. +examples: + - name: Install patches on a windows VM, allowing the maximum amount of time to be 4 hours, and the VM will reboot if required during the software update operation. + text: az vm install-patches -g MyResourceGroup -n MyVm --maximum-duration PT4H --reboot-setting IfRequired --classifications-to-include-win Critical Security --exclude-kbs-requiring-reboot true + - name: Install patches on a linux VM, allowing the maximum amount of time to be 4 hours, and the VM will reboot if required during the software update operation. + text: az vm install-patches -g MyResourceGroup -n MyVm --maximum-duration PT4H --reboot-setting IfRequired --classifications-to-include-linux Critical +""" + helps['vm auto-shutdown'] = """ type: command short-summary: Manage auto-shutdown for VM. diff --git a/src/azure-cli/azure/cli/command_modules/vm/_params.py b/src/azure-cli/azure/cli/command_modules/vm/_params.py index ffc67bd161c..1df7ec4cb15 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/_params.py +++ b/src/azure-cli/azure/cli/command_modules/vm/_params.py @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -# pylint: disable=line-too-long +# pylint: disable=line-too-long, too-many-lines from argcomplete.completers import FilesCompleter from knack.arguments import CLIArgumentType @@ -40,6 +40,7 @@ def load_arguments(self, _): HyperVGenerationTypes, HyperVGeneration = self.get_models('HyperVGenerationTypes', 'HyperVGeneration') DedicatedHostLicenseTypes = self.get_models('DedicatedHostLicenseTypes') OrchestrationServiceNames, OrchestrationServiceStateAction = self.get_models('OrchestrationServiceNames', 'OrchestrationServiceStateAction', operation_group='virtual_machine_scale_sets') + RebootSetting, VMGuestPatchClassificationWindows, VMGuestPatchClassificationLinux = self.get_models('VMGuestPatchRebootSetting', 'VMGuestPatchClassificationWindows', 'VMGuestPatchClassificationLinux') # REUSABLE ARGUMENT DEFINITIONS name_arg_type = CLIArgumentType(options_list=['--name', '-n'], metavar='NAME') @@ -385,6 +386,17 @@ def load_arguments(self, _): with self.argument_context('vm diagnostics set') as c: c.argument('storage_account', completer=get_resource_name_completion_list('Microsoft.Storage/storageAccounts')) + with self.argument_context('vm install-patches') as c: + c.argument('maximum_duration', type=str, help='Specify the maximum amount of time that the operation will run. It must be an ISO 8601-compliant duration string such as PT4H (4 hours)') + c.argument('reboot_setting', arg_type=get_enum_type(RebootSetting), help='Define when it is acceptable to reboot a VM during a software update operation.') + c.argument('classifications_to_include_win', nargs='+', arg_type=get_enum_type(VMGuestPatchClassificationWindows), help='Space-separated list of classifications to include for Windows VM.') + c.argument('classifications_to_include_linux', nargs='+', arg_type=get_enum_type(VMGuestPatchClassificationLinux), help='Space-separated list of classifications to include for Linux VM.') + c.argument('kb_numbers_to_include', nargs='+', help='Space-separated list of KBs to include in the patch operation. Applicable to Windows VM only') + c.argument('kb_numbers_to_exclude', nargs='+', help='Space-separated list of KBs to exclude in the patch operation. Applicable to Windows VM only') + c.argument('exclude_kbs_requiring_reboot', arg_type=get_three_state_flag(), help="Filter out KBs that don't have a reboot behavior of 'NeverReboots' when this is set. Applicable to Windows VM only") + c.argument('package_name_masks_to_include', nargs='+', help='Space-separated list of packages to include in the patch operation. Format: packageName_packageVersion. Applicable to Linux VM only') + c.argument('package_name_masks_to_exclude', nargs='+', help='Space-separated list of packages to exclude in the patch operation. Format: packageName_packageVersion. Applicable to Linux VM only') + with self.argument_context('vm disk') as c: c.argument('vm_name', options_list=['--vm-name'], id_part=None, completer=get_resource_name_completion_list('Microsoft.Compute/virtualMachines')) c.argument('new', action='store_true', help='create a new disk') diff --git a/src/azure-cli/azure/cli/command_modules/vm/commands.py b/src/azure-cli/azure/cli/command_modules/vm/commands.py index f86813148ad..3a645e78dd0 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/commands.py +++ b/src/azure-cli/azure/cli/command_modules/vm/commands.py @@ -293,6 +293,9 @@ def load_command_table(self, _): g.custom_command('auto-shutdown', 'auto_shutdown_vm') g.command('assess-patches', 'begin_assess_patches', min_api='2020-06-01') + with self.command_group('vm', compute_vm_sdk, client_factory=cf_vm) as g: + g.custom_command('install-patches', 'install_vm_patches', supports_no_wait=True, min_api='2020-12-01') + with self.command_group('vm availability-set', compute_availset_sdk) as g: g.custom_command('convert', 'convert_av_set_to_managed_disk', min_api='2016-04-30-preview') g.custom_command('create', 'create_av_set', table_transformer=deployment_validate_table_format, supports_no_wait=True, exception_handler=handle_template_based_exception) diff --git a/src/azure-cli/azure/cli/command_modules/vm/custom.py b/src/azure-cli/azure/cli/command_modules/vm/custom.py index 27adc69e8e5..dc2151c9345 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/custom.py +++ b/src/azure-cli/azure/cli/command_modules/vm/custom.py @@ -3724,3 +3724,16 @@ def set_disk_access(cmd, client, parameters, resource_group_name, disk_access_na resource_group_name, disk_access_name, disk_access) # endregion + + +# region install patches +def install_vm_patches(cmd, client, resource_group_name, vm_name, maximum_duration, reboot_setting, classifications_to_include_win=None, classifications_to_include_linux=None, kb_numbers_to_include=None, kb_numbers_to_exclude=None, + exclude_kbs_requiring_reboot=None, package_name_masks_to_include=None, package_name_masks_to_exclude=None, no_wait=False): + VMInstallPatchesParameters, WindowsParameters, LinuxParameters = cmd.get_models('VirtualMachineInstallPatchesParameters', 'WindowsParameters', 'LinuxParameters') + windows_parameters = WindowsParameters(classifications_to_include=classifications_to_include_win, kb_numbers_to_inclunde=kb_numbers_to_include, kb_numbers_to_exclude=kb_numbers_to_exclude, exclude_kbs_requirig_reboot=exclude_kbs_requiring_reboot) + linux_parameters = LinuxParameters(classifications_to_include=classifications_to_include_linux, package_name_masks_to_include=package_name_masks_to_include, package_name_masks_to_exclude=package_name_masks_to_exclude) + install_patches_input = VMInstallPatchesParameters(maximum_duration=maximum_duration, reboot_setting=reboot_setting, linux_parameters=linux_parameters, windows_parameters=windows_parameters) + + return sdk_no_wait(no_wait, client.begin_install_patches, resource_group_name=resource_group_name, vm_name=vm_name, install_patches_input=install_patches_input) + +# endregion diff --git a/src/azure-cli/azure/cli/command_modules/vm/linter_exclusions.yml b/src/azure-cli/azure/cli/command_modules/vm/linter_exclusions.yml index 7a4d679bacd..2df78080d77 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/linter_exclusions.yml +++ b/src/azure-cli/azure/cli/command_modules/vm/linter_exclusions.yml @@ -29,6 +29,23 @@ vm encryption enable: key_encryption_algorithm: rule_exclusions: - missing_parameter_help +vm install-patches: + parameters: + classifications_to_include_win: + rule_exclusions: + - option_length_too_long + classifications_to_include_linux: + rule_exclusions: + - option_length_too_long + exclude_kbs_requiring_reboot: + rule_exclusions: + - option_length_too_long + package_name_masks_to_exclude: + rule_exclusions: + - option_length_too_long + package_name_masks_to_include: + rule_exclusions: + - option_length_too_long image create: parameters: os_type: diff --git a/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_vm_install_patches.yaml b/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_vm_install_patches.yaml new file mode 100644 index 00000000000..3c3c35fe06e --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_vm_install_patches.yaml @@ -0,0 +1,2617 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -g -n --image --enable-hotpatching --admin-username --admin-password --nsg-rule + User-Agent: + - python/3.8.9 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.21.0 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_install_patches_000001?api-version=2020-10-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001","name":"cli_test_vm_install_patches_000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2021-04-08T04:34:46Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '428' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 08 Apr 2021 04:35:06 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.22.0 + method: GET + uri: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/arm-compute/quickstart-templates/aliases.json + response: + body: + string: "{\n \"$schema\": \"http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json\",\n + \ \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {},\n \"variables\": + {},\n \"resources\": [],\n \"outputs\": {\n \"aliases\": {\n \"type\": + \"object\",\n \"value\": {\n \"Linux\": {\n \"CentOS\": + {\n \"publisher\": \"OpenLogic\",\n \"offer\": \"CentOS\",\n + \ \"sku\": \"7.5\",\n \"version\": \"latest\"\n },\n + \ \"CoreOS\": {\n \"publisher\": \"CoreOS\",\n \"offer\": + \"CoreOS\",\n \"sku\": \"Stable\",\n \"version\": \"latest\"\n + \ },\n \"Debian\": {\n \"publisher\": \"Debian\",\n + \ \"offer\": \"debian-10\",\n \"sku\": \"10\",\n \"version\": + \"latest\"\n },\n \"openSUSE-Leap\": {\n \"publisher\": + \"SUSE\",\n \"offer\": \"openSUSE-Leap\",\n \"sku\": + \"42.3\",\n \"version\": \"latest\"\n },\n \"RHEL\": + {\n \"publisher\": \"RedHat\",\n \"offer\": \"RHEL\",\n + \ \"sku\": \"7-LVM\",\n \"version\": \"latest\"\n },\n + \ \"SLES\": {\n \"publisher\": \"SUSE\",\n \"offer\": + \"SLES\",\n \"sku\": \"15\",\n \"version\": \"latest\"\n + \ },\n \"UbuntuLTS\": {\n \"publisher\": \"Canonical\",\n + \ \"offer\": \"UbuntuServer\",\n \"sku\": \"18.04-LTS\",\n + \ \"version\": \"latest\"\n }\n },\n \"Windows\": + {\n \"Win2019Datacenter\": {\n \"publisher\": \"MicrosoftWindowsServer\",\n + \ \"offer\": \"WindowsServer\",\n \"sku\": \"2019-Datacenter\",\n + \ \"version\": \"latest\"\n },\n \"Win2016Datacenter\": + {\n \"publisher\": \"MicrosoftWindowsServer\",\n \"offer\": + \"WindowsServer\",\n \"sku\": \"2016-Datacenter\",\n \"version\": + \"latest\"\n },\n \"Win2012R2Datacenter\": {\n \"publisher\": + \"MicrosoftWindowsServer\",\n \"offer\": \"WindowsServer\",\n \"sku\": + \"2012-R2-Datacenter\",\n \"version\": \"latest\"\n },\n + \ \"Win2012Datacenter\": {\n \"publisher\": \"MicrosoftWindowsServer\",\n + \ \"offer\": \"WindowsServer\",\n \"sku\": \"2012-Datacenter\",\n + \ \"version\": \"latest\"\n },\n \"Win2008R2SP1\": + {\n \"publisher\": \"MicrosoftWindowsServer\",\n \"offer\": + \"WindowsServer\",\n \"sku\": \"2008-R2-SP1\",\n \"version\": + \"latest\"\n }\n }\n }\n }\n }\n}\n" + headers: + accept-ranges: + - bytes + access-control-allow-origin: + - '*' + cache-control: + - max-age=300 + connection: + - keep-alive + content-length: + - '2501' + content-security-policy: + - default-src 'none'; style-src 'unsafe-inline'; sandbox + content-type: + - text/plain; charset=utf-8 + date: + - Thu, 08 Apr 2021 04:35:07 GMT + etag: + - W/"540044b4084c3c314537f1baa1770f248628b2bc9ba0328f1004c33862e049da" + expires: + - Thu, 08 Apr 2021 04:40:07 GMT + source-age: + - '114' + strict-transport-security: + - max-age=31536000 + vary: + - Authorization,Accept-Encoding + via: + - 1.1 varnish + x-cache: + - HIT + x-cache-hits: + - '1' + x-content-type-options: + - nosniff + x-fastly-request-id: + - 7d0eec9778f3d5d8490baca2cc376cc53874edaa + x-frame-options: + - deny + x-github-request-id: + - 1190:87A4:204620:263068:606E0A67 + x-served-by: + - cache-qpg1267-QPG + x-timer: + - S1617856508.818573,VS0,VE0 + x-xss-protection: + - 1; mode=block + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -g -n --image --enable-hotpatching --admin-username --admin-password --nsg-rule + User-Agent: + - AZURECLI/2.21.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/virtualNetworks?api-version=2018-01-01 + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-cache + content-length: + - '12' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 08 Apr 2021 04:35:08 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"properties": {"template": {"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", "parameters": {"adminPassword": {"type": "securestring", + "metadata": {"description": "Secure adminPassword"}}}, "variables": {}, "resources": + [{"name": "vmVNET", "type": "Microsoft.Network/virtualNetworks", "location": + "westus", "apiVersion": "2015-06-15", "dependsOn": [], "tags": {}, "properties": + {"addressSpace": {"addressPrefixes": ["10.0.0.0/16"]}, "subnets": [{"name": + "vmSubnet", "properties": {"addressPrefix": "10.0.0.0/24"}}]}}, {"type": "Microsoft.Network/networkSecurityGroups", + "name": "vmNSG", "apiVersion": "2015-06-15", "location": "westus", "tags": {}, + "dependsOn": []}, {"apiVersion": "2018-01-01", "type": "Microsoft.Network/publicIPAddresses", + "name": "vmPublicIP", "location": "westus", "tags": {}, "dependsOn": [], "properties": + {"publicIPAllocationMethod": null}}, {"apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", + "name": "vmVMNic", "location": "westus", "tags": {}, "dependsOn": ["Microsoft.Network/virtualNetworks/vmVNET", + "Microsoft.Network/networkSecurityGroups/vmNSG", "Microsoft.Network/publicIpAddresses/vmPublicIP"], + "properties": {"ipConfigurations": [{"name": "ipconfigvm", "properties": {"privateIPAllocationMethod": + "Dynamic", "subnet": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/virtualNetworks/vmVNET/subnets/vmSubnet"}, + "publicIPAddress": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/publicIPAddresses/vmPublicIP"}}}], + "networkSecurityGroup": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/networkSecurityGroups/vmNSG"}}}, + {"apiVersion": "2020-12-01", "type": "Microsoft.Compute/virtualMachines", "name": + "vm", "location": "westus", "tags": {}, "dependsOn": ["Microsoft.Network/networkInterfaces/vmVMNic"], + "properties": {"hardwareProfile": {"vmSize": "Standard_DS1_v2"}, "networkProfile": + {"networkInterfaces": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/networkInterfaces/vmVMNic"}]}, + "storageProfile": {"osDisk": {"createOption": "fromImage", "name": null, "caching": + "ReadWrite", "managedDisk": {"storageAccountType": null}}, "imageReference": + {"publisher": "MicrosoftWindowsServer", "offer": "WindowsServer", "sku": "2019-Datacenter", + "version": "latest"}}, "osProfile": {"computerName": "vm", "adminUsername": + "azureuser", "adminPassword": "[parameters(''adminPassword'')]"}, "securityProfile": + {}}}], "outputs": {}}, "parameters": {"adminPassword": {"value": "testPassword0"}}, + "mode": "Incremental"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + Content-Length: + - '3062' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -g -n --image --enable-hotpatching --admin-username --admin-password --nsg-rule + User-Agent: + - python/3.8.9 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.21.0 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_install_patches_000001/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2020-10-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Resources/deployments/vm_deploy_heAbXahNzdJCxScP9A3esC5QHwjSYupY","name":"vm_deploy_heAbXahNzdJCxScP9A3esC5QHwjSYupY","type":"Microsoft.Resources/deployments","properties":{"templateHash":"14639308526194966779","parameters":{"adminPassword":{"type":"SecureString"}},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2021-04-08T04:35:12.573786Z","duration":"PT2.4316992S","correlationId":"fd164ea0-a2fc-428a-9c0d-bb598bb1a6b3","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"virtualNetworks","locations":["westus"]},{"resourceType":"networkSecurityGroups","locations":["westus"]},{"resourceType":"publicIPAddresses","locations":["westus"]},{"resourceType":"networkInterfaces","locations":["westus"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachines","locations":["westus"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/virtualNetworks/vmVNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"vmVNET"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/networkSecurityGroups/vmNSG","resourceType":"Microsoft.Network/networkSecurityGroups","resourceName":"vmNSG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/publicIPAddresses/vmPublicIP","resourceType":"Microsoft.Network/publicIPAddresses","resourceName":"vmPublicIP"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/networkInterfaces/vmVMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vmVMNic"},{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/networkInterfaces/vmVMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vmVMNic"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Compute/virtualMachines/vm","resourceType":"Microsoft.Compute/virtualMachines","resourceName":"vm"}]}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_install_patches_000001/providers/Microsoft.Resources/deployments/vm_deploy_heAbXahNzdJCxScP9A3esC5QHwjSYupY/operationStatuses/08585837503753355463?api-version=2020-10-01 + cache-control: + - no-cache + content-length: + - '2769' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 08 Apr 2021 04:35:13 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -g -n --image --enable-hotpatching --admin-username --admin-password --nsg-rule + User-Agent: + - python/3.8.9 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.21.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_install_patches_000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585837503753355463?api-version=2020-10-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 08 Apr 2021 04:35:44 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -g -n --image --enable-hotpatching --admin-username --admin-password --nsg-rule + User-Agent: + - python/3.8.9 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.21.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_install_patches_000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585837503753355463?api-version=2020-10-01 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-cache + content-length: + - '22' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 08 Apr 2021 04:36:14 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -g -n --image --enable-hotpatching --admin-username --admin-password --nsg-rule + User-Agent: + - python/3.8.9 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.21.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_install_patches_000001/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2020-10-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Resources/deployments/vm_deploy_heAbXahNzdJCxScP9A3esC5QHwjSYupY","name":"vm_deploy_heAbXahNzdJCxScP9A3esC5QHwjSYupY","type":"Microsoft.Resources/deployments","properties":{"templateHash":"14639308526194966779","parameters":{"adminPassword":{"type":"SecureString"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2021-04-08T04:35:59.9081183Z","duration":"PT49.7660315S","correlationId":"fd164ea0-a2fc-428a-9c0d-bb598bb1a6b3","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"virtualNetworks","locations":["westus"]},{"resourceType":"networkSecurityGroups","locations":["westus"]},{"resourceType":"publicIPAddresses","locations":["westus"]},{"resourceType":"networkInterfaces","locations":["westus"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachines","locations":["westus"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/virtualNetworks/vmVNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"vmVNET"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/networkSecurityGroups/vmNSG","resourceType":"Microsoft.Network/networkSecurityGroups","resourceName":"vmNSG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/publicIPAddresses/vmPublicIP","resourceType":"Microsoft.Network/publicIPAddresses","resourceName":"vmPublicIP"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/networkInterfaces/vmVMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vmVMNic"},{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/networkInterfaces/vmVMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vmVMNic"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Compute/virtualMachines/vm","resourceType":"Microsoft.Compute/virtualMachines","resourceName":"vm"}],"outputs":{},"outputResources":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Compute/virtualMachines/vm"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/networkInterfaces/vmVMNic"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/networkSecurityGroups/vmNSG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/publicIPAddresses/vmPublicIP"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/virtualNetworks/vmVNET"}]}}' + headers: + cache-control: + - no-cache + content-length: + - '3830' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 08 Apr 2021 04:36:15 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -g -n --image --enable-hotpatching --admin-username --admin-password --nsg-rule + User-Agent: + - AZURECLI/2.21.0 azsdk-python-azure-mgmt-compute/19.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Compute/virtualMachines/vm?$expand=instanceView&api-version=2020-12-01 + response: + body: + string: "{\r\n \"name\": \"vm\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Compute/virtualMachines/vm\",\r\n + \ \"type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\": \"westus\",\r\n + \ \"tags\": {},\r\n \"properties\": {\r\n \"vmId\": \"f6752978-4c29-4623-b8ec-8551392459e8\",\r\n + \ \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_DS1_v2\"\r\n },\r\n + \ \"storageProfile\": {\r\n \"imageReference\": {\r\n \"publisher\": + \"MicrosoftWindowsServer\",\r\n \"offer\": \"WindowsServer\",\r\n \"sku\": + \"2019-Datacenter\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": + \"17763.1817.2103030313\"\r\n },\r\n \"osDisk\": {\r\n \"osType\": + \"Windows\",\r\n \"name\": \"vm_disk1_fb8bebdd601c4a4a9571eb2ecc96c60d\",\r\n + \ \"createOption\": \"FromImage\",\r\n \"caching\": \"ReadWrite\",\r\n + \ \"managedDisk\": {\r\n \"storageAccountType\": \"Premium_LRS\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Compute/disks/vm_disk1_fb8bebdd601c4a4a9571eb2ecc96c60d\"\r\n + \ },\r\n \"diskSizeGB\": 127\r\n },\r\n \"dataDisks\": + []\r\n },\r\n \"osProfile\": {\r\n \"computerName\": \"vm\",\r\n + \ \"adminUsername\": \"azureuser\",\r\n \"windowsConfiguration\": + {\r\n \"provisionVMAgent\": true,\r\n \"enableAutomaticUpdates\": + true,\r\n \"patchSettings\": {\r\n \"patchMode\": \"AutomaticByOS\"\r\n + \ }\r\n },\r\n \"secrets\": [],\r\n \"allowExtensionOperations\": + true,\r\n \"requireGuestProvisionSignal\": true\r\n },\r\n \"networkProfile\": + {\"networkInterfaces\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/networkInterfaces/vmVMNic\"}]},\r\n + \ \"provisioningState\": \"Succeeded\",\r\n \"instanceView\": {\r\n \"vmAgent\": + {\r\n \"vmAgentVersion\": \"Unknown\",\r\n \"statuses\": [\r\n + \ {\r\n \"code\": \"ProvisioningState/Unavailable\",\r\n + \ \"level\": \"Warning\",\r\n \"displayStatus\": \"Not + Ready\",\r\n \"message\": \"VM status blob is found but not yet + populated.\",\r\n \"time\": \"2021-04-08T04:36:16+00:00\"\r\n }\r\n + \ ]\r\n },\r\n \"disks\": [\r\n {\r\n \"name\": + \"vm_disk1_fb8bebdd601c4a4a9571eb2ecc96c60d\",\r\n \"statuses\": + [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n + \ \"level\": \"Info\",\r\n \"displayStatus\": \"Provisioning + succeeded\",\r\n \"time\": \"2021-04-08T04:35:33.7638662+00:00\"\r\n + \ }\r\n ]\r\n }\r\n ],\r\n \"hyperVGeneration\": + \"V1\",\r\n \"statuses\": [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n + \ \"level\": \"Info\",\r\n \"displayStatus\": \"Provisioning + succeeded\",\r\n \"time\": \"2021-04-08T04:35:56.5148929+00:00\"\r\n + \ },\r\n {\r\n \"code\": \"PowerState/running\",\r\n + \ \"level\": \"Info\",\r\n \"displayStatus\": \"VM running\"\r\n + \ }\r\n ]\r\n }\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '3182' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 08 Apr 2021 04:36:16 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/LowCostGet3Min;3997,Microsoft.Compute/LowCostGet30Min;31971 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -g -n --image --enable-hotpatching --admin-username --admin-password --nsg-rule + User-Agent: + - AZURECLI/2.21.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/networkInterfaces/vmVMNic?api-version=2018-01-01 + response: + body: + string: "{\r\n \"name\": \"vmVMNic\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/networkInterfaces/vmVMNic\",\r\n + \ \"etag\": \"W/\\\"817c339b-ad8c-42ac-951b-00548af45a7c\\\"\",\r\n \"location\": + \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": + \"Succeeded\",\r\n \"resourceGuid\": \"3badf8e0-e6ec-490f-938b-4ed05b606001\",\r\n + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"ipconfigvm\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/networkInterfaces/vmVMNic/ipConfigurations/ipconfigvm\",\r\n + \ \"etag\": \"W/\\\"817c339b-ad8c-42ac-951b-00548af45a7c\\\"\",\r\n + \ \"type\": \"Microsoft.Network/networkInterfaces/ipConfigurations\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\": + \"Dynamic\",\r\n \"publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/publicIPAddresses/vmPublicIP\"\r\n + \ },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/virtualNetworks/vmVNET/subnets/vmSubnet\"\r\n + \ },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\": + \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"dnsSettings\": {\r\n \"dnsServers\": + [],\r\n \"appliedDnsServers\": [],\r\n \"internalDomainNameSuffix\": + \"sk00t0fd2loe1dhw2osxqu53mc.dx.internal.cloudapp.net\"\r\n },\r\n \"macAddress\": + \"00-0D-3A-36-6C-0C\",\r\n \"enableAcceleratedNetworking\": false,\r\n + \ \"enableIPForwarding\": false,\r\n \"networkSecurityGroup\": {\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/networkSecurityGroups/vmNSG\"\r\n + \ },\r\n \"primary\": true,\r\n \"virtualMachine\": {\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Compute/virtualMachines/vm\"\r\n + \ }\r\n },\r\n \"type\": \"Microsoft.Network/networkInterfaces\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '2558' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 08 Apr 2021 04:36:16 GMT + etag: + - W/"817c339b-ad8c-42ac-951b-00548af45a7c" + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 78190e86-6014-4413-99e5-336e403ebf52 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -g -n --image --enable-hotpatching --admin-username --admin-password --nsg-rule + User-Agent: + - AZURECLI/2.21.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/publicIPAddresses/vmPublicIP?api-version=2018-01-01 + response: + body: + string: "{\r\n \"name\": \"vmPublicIP\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/publicIPAddresses/vmPublicIP\",\r\n + \ \"etag\": \"W/\\\"5e8113ea-36b6-4754-92b3-24bd993149dd\\\"\",\r\n \"location\": + \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": + \"Succeeded\",\r\n \"resourceGuid\": \"046ae70e-3cf3-4f01-9a99-14091fcd3ffc\",\r\n + \ \"ipAddress\": \"13.87.129.220\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n + \ \"publicIPAllocationMethod\": \"Dynamic\",\r\n \"idleTimeoutInMinutes\": + 4,\r\n \"ipTags\": [],\r\n \"ipConfiguration\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/networkInterfaces/vmVMNic/ipConfigurations/ipconfigvm\"\r\n + \ }\r\n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n + \ \"sku\": {\r\n \"name\": \"Basic\"\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '993' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 08 Apr 2021 04:36:17 GMT + etag: + - W/"5e8113ea-36b6-4754-92b3-24bd993149dd" + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - dc262448-c4fe-4d9d-987b-f55bb1f1390b + status: + code: 200 + message: OK +- request: + body: '{"maximumDuration": "PT4H", "rebootSetting": "IfRequired", "windowsParameters": + {"classificationsToInclude": ["Critical", "Security"]}, "linuxParameters": {}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vm install-patches + Connection: + - keep-alive + Content-Length: + - '158' + Content-Type: + - application/json + ParameterSetName: + - -g -n --maximum-duration --reboot-setting --classifications-to-include-win + --exclude-kbs-requiring-reboot + User-Agent: + - AZURECLI/2.21.0 azsdk-python-azure-mgmt-compute/19.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Compute/virtualMachines/vm/installPatches?api-version=2020-12-01 + response: + body: + string: '' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/3001414c-52ae-406b-bb30-e8f7cfb44018?api-version=2020-12-01 + cache-control: + - no-cache + content-length: + - '0' + date: + - Thu, 08 Apr 2021 04:37:27 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/3001414c-52ae-406b-bb30-e8f7cfb44018?monitor=true&api-version=2020-12-01 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/PatchOperation3Min;189,Microsoft.Compute/PatchOperation30Min;599 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm install-patches + Connection: + - keep-alive + ParameterSetName: + - -g -n --maximum-duration --reboot-setting --classifications-to-include-win + --exclude-kbs-requiring-reboot + User-Agent: + - AZURECLI/2.21.0 azsdk-python-azure-mgmt-compute/19.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/3001414c-52ae-406b-bb30-e8f7cfb44018?api-version=2020-12-01 + response: + body: + string: "{\r\n \"startTime\": \"2021-04-08T04:37:26.612554+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"3001414c-52ae-406b-bb30-e8f7cfb44018\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '133' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 08 Apr 2021 04:37:58 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetOperation3Min;14996,Microsoft.Compute/GetOperation30Min;29985 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm install-patches + Connection: + - keep-alive + ParameterSetName: + - -g -n --maximum-duration --reboot-setting --classifications-to-include-win + --exclude-kbs-requiring-reboot + User-Agent: + - AZURECLI/2.21.0 azsdk-python-azure-mgmt-compute/19.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/3001414c-52ae-406b-bb30-e8f7cfb44018?api-version=2020-12-01 + response: + body: + string: "{\r\n \"startTime\": \"2021-04-08T04:37:26.612554+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"3001414c-52ae-406b-bb30-e8f7cfb44018\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '133' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 08 Apr 2021 04:38:28 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetOperation3Min;14993,Microsoft.Compute/GetOperation30Min;29982 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm install-patches + Connection: + - keep-alive + ParameterSetName: + - -g -n --maximum-duration --reboot-setting --classifications-to-include-win + --exclude-kbs-requiring-reboot + User-Agent: + - AZURECLI/2.21.0 azsdk-python-azure-mgmt-compute/19.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/3001414c-52ae-406b-bb30-e8f7cfb44018?api-version=2020-12-01 + response: + body: + string: "{\r\n \"startTime\": \"2021-04-08T04:37:26.612554+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"3001414c-52ae-406b-bb30-e8f7cfb44018\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '133' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 08 Apr 2021 04:38:58 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetOperation3Min;14991,Microsoft.Compute/GetOperation30Min;29979 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm install-patches + Connection: + - keep-alive + ParameterSetName: + - -g -n --maximum-duration --reboot-setting --classifications-to-include-win + --exclude-kbs-requiring-reboot + User-Agent: + - AZURECLI/2.21.0 azsdk-python-azure-mgmt-compute/19.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/3001414c-52ae-406b-bb30-e8f7cfb44018?api-version=2020-12-01 + response: + body: + string: "{\r\n \"startTime\": \"2021-04-08T04:37:26.612554+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"3001414c-52ae-406b-bb30-e8f7cfb44018\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '133' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 08 Apr 2021 04:39:29 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetOperation3Min;14989,Microsoft.Compute/GetOperation30Min;29976 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm install-patches + Connection: + - keep-alive + ParameterSetName: + - -g -n --maximum-duration --reboot-setting --classifications-to-include-win + --exclude-kbs-requiring-reboot + User-Agent: + - AZURECLI/2.21.0 azsdk-python-azure-mgmt-compute/19.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/3001414c-52ae-406b-bb30-e8f7cfb44018?api-version=2020-12-01 + response: + body: + string: "{\r\n \"startTime\": \"2021-04-08T04:37:26.612554+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"3001414c-52ae-406b-bb30-e8f7cfb44018\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '133' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 08 Apr 2021 04:39:59 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetOperation3Min;14986,Microsoft.Compute/GetOperation30Min;29973 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm install-patches + Connection: + - keep-alive + ParameterSetName: + - -g -n --maximum-duration --reboot-setting --classifications-to-include-win + --exclude-kbs-requiring-reboot + User-Agent: + - AZURECLI/2.21.0 azsdk-python-azure-mgmt-compute/19.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/3001414c-52ae-406b-bb30-e8f7cfb44018?api-version=2020-12-01 + response: + body: + string: "{\r\n \"startTime\": \"2021-04-08T04:37:26.612554+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"3001414c-52ae-406b-bb30-e8f7cfb44018\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '133' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 08 Apr 2021 04:40:29 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetOperation3Min;14983,Microsoft.Compute/GetOperation30Min;29980 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm install-patches + Connection: + - keep-alive + ParameterSetName: + - -g -n --maximum-duration --reboot-setting --classifications-to-include-win + --exclude-kbs-requiring-reboot + User-Agent: + - AZURECLI/2.21.0 azsdk-python-azure-mgmt-compute/19.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/3001414c-52ae-406b-bb30-e8f7cfb44018?api-version=2020-12-01 + response: + body: + string: "{\r\n \"startTime\": \"2021-04-08T04:37:26.612554+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"3001414c-52ae-406b-bb30-e8f7cfb44018\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '133' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 08 Apr 2021 04:40:59 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetOperation3Min;14983,Microsoft.Compute/GetOperation30Min;29977 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm install-patches + Connection: + - keep-alive + ParameterSetName: + - -g -n --maximum-duration --reboot-setting --classifications-to-include-win + --exclude-kbs-requiring-reboot + User-Agent: + - AZURECLI/2.21.0 azsdk-python-azure-mgmt-compute/19.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/3001414c-52ae-406b-bb30-e8f7cfb44018?api-version=2020-12-01 + response: + body: + string: "{\r\n \"startTime\": \"2021-04-08T04:37:26.612554+00:00\",\r\n \"endTime\": + \"2021-04-08T04:41:14.7323647+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"properties\": {\r\n \"output\": {\r\n \"status\": \"Succeeded\",\r\n + \ \"installationActivityId\": \"3001414c-52ae-406b-bb30-e8f7cfb44018\",\r\n + \ \"rebootStatus\": \"NotNeeded\",\r\n \"maintenanceWindowExceeded\": false,\r\n + \ \"excludedPatchCount\": 0,\r\n \"notSelectedPatchCount\": 6,\r\n \"pendingPatchCount\": + 0,\r\n \"installedPatchCount\": 2,\r\n \"failedPatchCount\": 0,\r\n \"patches\": + [\r\n {\r\n \"patchId\": \"1abb2377-20ef-43ff-aabc-0de4711ab205\",\r\n + \ \"name\": \"2020-10 Security Update for Adobe Flash Player for Windows + Server 2019 for x64-based Systems (KB4580325)\",\r\n \"kbId\": \"4580325\",\r\n + \ \"classifications\": [\r\n \"Security\"\r\n ],\r\n \"installationState\": + \"Installed\",\r\n \"msrcSeverity\": \"Critical\"\r\n },\r\n {\r\n + \ \"patchId\": \"33a64099-ba99-4e7f-a2d7-cf7d7fc4029f\",\r\n \"name\": + \"Security Update for Windows Server 2019 for x64-based Systems (KB4535680)\",\r\n + \ \"kbId\": \"4535680\",\r\n \"classifications\": [\r\n \"Security\"\r\n + \ ],\r\n \"installationState\": \"Installed\",\r\n \"msrcSeverity\": + \"Important\"\r\n },\r\n {\r\n \"patchId\": \"e3b03a38-d82f-4c2c-8dfe-d69abca6a7be\",\r\n + \ \"name\": \"2021-02 Cumulative Update Preview for .NET Framework 3.5, + 4.7.2 and 4.8 for Windows Server 2019 for x64 (KB4602298)\",\r\n \"kbId\": + \"4602298\",\r\n \"classifications\": [\r\n \"Updates\"\r\n ],\r\n + \ \"installationState\": \"NotSelected\"\r\n },\r\n {\r\n \"patchId\": + \"f26a0046-1e1a-4305-8743-19c92c3095a5\",\r\n \"name\": \"Update for + Removal of Adobe Flash Player for Windows Server 2019 for x64-based systems + (KB4577586)\",\r\n \"kbId\": \"4577586\",\r\n \"classifications\": + [\r\n \"Updates\"\r\n ],\r\n \"installationState\": \"NotSelected\"\r\n + \ },\r\n {\r\n \"patchId\": \"d4e3dc75-c215-4aeb-8d9c-0bc297216b54\",\r\n + \ \"name\": \"Windows Malicious Software Removal Tool x64 - v5.87 (KB890830)\",\r\n + \ \"kbId\": \"890830\",\r\n \"classifications\": [\r\n \"UpdateRollUp\"\r\n + \ ],\r\n \"installationState\": \"NotSelected\"\r\n },\r\n {\r\n + \ \"patchId\": \"89e11227-761b-4396-bf37-37a2b641fa84\",\r\n \"name\": + \"2021-01 Update for Windows Server 2019 for x64-based Systems (KB4589208)\",\r\n + \ \"kbId\": \"4589208\",\r\n \"classifications\": [\r\n \"Updates\"\r\n + \ ],\r\n \"installationState\": \"NotSelected\"\r\n },\r\n {\r\n + \ \"patchId\": \"61e770a1-c68c-44bc-bbc3-83eef563ff8c\",\r\n \"name\": + \"Security Intelligence Update for Microsoft Defender Antivirus - KB2267602 + (Version 1.335.441.0)\",\r\n \"kbId\": \"2267602\",\r\n \"classifications\": + [\r\n \"Definition\"\r\n ],\r\n \"installationState\": \"NotSelected\"\r\n + \ },\r\n {\r\n \"patchId\": \"04567dc3-8c39-4282-bc01-ebdf230eb491\",\r\n + \ \"name\": \"2021-03 Cumulative Update Preview for Windows Server 2019 + (1809) for x64-based Systems (KB5000854)\",\r\n \"kbId\": \"5000854\",\r\n + \ \"classifications\": [\r\n \"Updates\"\r\n ],\r\n \"installationState\": + \"NotSelected\"\r\n }\r\n ],\r\n \"startDateTime\": \"2021-04-08T04:37:27.7219599+00:00\",\r\n + \ \"error\": {\r\n \"details\": [],\r\n \"code\": \"Success\",\r\n \"message\": + \"0 error/s reported\"\r\n }\r\n}\r\n },\r\n \"name\": \"3001414c-52ae-406b-bb30-e8f7cfb44018\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '3242' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 08 Apr 2021 04:41:30 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetOperation3Min;14986,Microsoft.Compute/GetOperation30Min;29975 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm install-patches + Connection: + - keep-alive + ParameterSetName: + - -g -n --maximum-duration --reboot-setting --classifications-to-include-win + --exclude-kbs-requiring-reboot + User-Agent: + - AZURECLI/2.21.0 azsdk-python-azure-mgmt-compute/19.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/3001414c-52ae-406b-bb30-e8f7cfb44018?monitor=true&api-version=2020-12-01 + response: + body: + string: '{"status":"Succeeded","installationActivityId":"3001414c-52ae-406b-bb30-e8f7cfb44018","rebootStatus":"NotNeeded","maintenanceWindowExceeded":false,"excludedPatchCount":0,"notSelectedPatchCount":6,"pendingPatchCount":0,"installedPatchCount":2,"failedPatchCount":0,"patches":[{"patchId":"1abb2377-20ef-43ff-aabc-0de4711ab205","name":"2020-10 + Security Update for Adobe Flash Player for Windows Server 2019 for x64-based + Systems (KB4580325)","kbId":"4580325","classifications":["Security"],"installationState":"Installed","msrcSeverity":"Critical"},{"patchId":"33a64099-ba99-4e7f-a2d7-cf7d7fc4029f","name":"Security + Update for Windows Server 2019 for x64-based Systems (KB4535680)","kbId":"4535680","classifications":["Security"],"installationState":"Installed","msrcSeverity":"Important"},{"patchId":"e3b03a38-d82f-4c2c-8dfe-d69abca6a7be","name":"2021-02 + Cumulative Update Preview for .NET Framework 3.5, 4.7.2 and 4.8 for Windows + Server 2019 for x64 (KB4602298)","kbId":"4602298","classifications":["Updates"],"installationState":"NotSelected"},{"patchId":"f26a0046-1e1a-4305-8743-19c92c3095a5","name":"Update + for Removal of Adobe Flash Player for Windows Server 2019 for x64-based systems + (KB4577586)","kbId":"4577586","classifications":["Updates"],"installationState":"NotSelected"},{"patchId":"d4e3dc75-c215-4aeb-8d9c-0bc297216b54","name":"Windows + Malicious Software Removal Tool x64 - v5.87 (KB890830)","kbId":"890830","classifications":["UpdateRollUp"],"installationState":"NotSelected"},{"patchId":"89e11227-761b-4396-bf37-37a2b641fa84","name":"2021-01 + Update for Windows Server 2019 for x64-based Systems (KB4589208)","kbId":"4589208","classifications":["Updates"],"installationState":"NotSelected"},{"patchId":"61e770a1-c68c-44bc-bbc3-83eef563ff8c","name":"Security + Intelligence Update for Microsoft Defender Antivirus - KB2267602 (Version + 1.335.441.0)","kbId":"2267602","classifications":["Definition"],"installationState":"NotSelected"},{"patchId":"04567dc3-8c39-4282-bc01-ebdf230eb491","name":"2021-03 + Cumulative Update Preview for Windows Server 2019 (1809) for x64-based Systems + (KB5000854)","kbId":"5000854","classifications":["Updates"],"installationState":"NotSelected"}],"startDateTime":"2021-04-08T04:37:27.7219599+00:00","error":{"details":[],"code":"Success","message":"0 + error/s reported"}}' + headers: + cache-control: + - no-cache + content-length: + - '2309' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 08 Apr 2021 04:41:30 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetOperation3Min;14985,Microsoft.Compute/GetOperation30Min;29974 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -g -n --image --enable-hotpatching --admin-username --admin-password --nsg-rule + User-Agent: + - python/3.8.9 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.21.0 + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_install_patches_000001?api-version=2020-10-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001","name":"cli_test_vm_install_patches_000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2021-04-08T04:34:46Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '428' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 08 Apr 2021 04:41:52 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.22.0 + method: GET + uri: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/arm-compute/quickstart-templates/aliases.json + response: + body: + string: "{\n \"$schema\": \"http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json\",\n + \ \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {},\n \"variables\": + {},\n \"resources\": [],\n \"outputs\": {\n \"aliases\": {\n \"type\": + \"object\",\n \"value\": {\n \"Linux\": {\n \"CentOS\": + {\n \"publisher\": \"OpenLogic\",\n \"offer\": \"CentOS\",\n + \ \"sku\": \"7.5\",\n \"version\": \"latest\"\n },\n + \ \"CoreOS\": {\n \"publisher\": \"CoreOS\",\n \"offer\": + \"CoreOS\",\n \"sku\": \"Stable\",\n \"version\": \"latest\"\n + \ },\n \"Debian\": {\n \"publisher\": \"Debian\",\n + \ \"offer\": \"debian-10\",\n \"sku\": \"10\",\n \"version\": + \"latest\"\n },\n \"openSUSE-Leap\": {\n \"publisher\": + \"SUSE\",\n \"offer\": \"openSUSE-Leap\",\n \"sku\": + \"42.3\",\n \"version\": \"latest\"\n },\n \"RHEL\": + {\n \"publisher\": \"RedHat\",\n \"offer\": \"RHEL\",\n + \ \"sku\": \"7-LVM\",\n \"version\": \"latest\"\n },\n + \ \"SLES\": {\n \"publisher\": \"SUSE\",\n \"offer\": + \"SLES\",\n \"sku\": \"15\",\n \"version\": \"latest\"\n + \ },\n \"UbuntuLTS\": {\n \"publisher\": \"Canonical\",\n + \ \"offer\": \"UbuntuServer\",\n \"sku\": \"18.04-LTS\",\n + \ \"version\": \"latest\"\n }\n },\n \"Windows\": + {\n \"Win2019Datacenter\": {\n \"publisher\": \"MicrosoftWindowsServer\",\n + \ \"offer\": \"WindowsServer\",\n \"sku\": \"2019-Datacenter\",\n + \ \"version\": \"latest\"\n },\n \"Win2016Datacenter\": + {\n \"publisher\": \"MicrosoftWindowsServer\",\n \"offer\": + \"WindowsServer\",\n \"sku\": \"2016-Datacenter\",\n \"version\": + \"latest\"\n },\n \"Win2012R2Datacenter\": {\n \"publisher\": + \"MicrosoftWindowsServer\",\n \"offer\": \"WindowsServer\",\n \"sku\": + \"2012-R2-Datacenter\",\n \"version\": \"latest\"\n },\n + \ \"Win2012Datacenter\": {\n \"publisher\": \"MicrosoftWindowsServer\",\n + \ \"offer\": \"WindowsServer\",\n \"sku\": \"2012-Datacenter\",\n + \ \"version\": \"latest\"\n },\n \"Win2008R2SP1\": + {\n \"publisher\": \"MicrosoftWindowsServer\",\n \"offer\": + \"WindowsServer\",\n \"sku\": \"2008-R2-SP1\",\n \"version\": + \"latest\"\n }\n }\n }\n }\n }\n}\n" + headers: + accept-ranges: + - bytes + access-control-allow-origin: + - '*' + cache-control: + - max-age=300 + connection: + - keep-alive + content-length: + - '2501' + content-security-policy: + - default-src 'none'; style-src 'unsafe-inline'; sandbox + content-type: + - text/plain; charset=utf-8 + date: + - Thu, 08 Apr 2021 04:41:53 GMT + etag: + - W/"540044b4084c3c314537f1baa1770f248628b2bc9ba0328f1004c33862e049da" + expires: + - Thu, 08 Apr 2021 04:46:53 GMT + source-age: + - '163' + strict-transport-security: + - max-age=31536000 + vary: + - Authorization,Accept-Encoding + via: + - 1.1 varnish + x-cache: + - HIT + x-cache-hits: + - '1' + x-content-type-options: + - nosniff + x-fastly-request-id: + - 4675fe8546fe3c8e193b3c96ed01aeba9ee453a9 + x-frame-options: + - deny + x-github-request-id: + - 1190:87A4:204620:263068:606E0A67 + x-served-by: + - cache-qpg1265-QPG + x-timer: + - S1617856913.059465,VS0,VE1 + x-xss-protection: + - 1; mode=block + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -g -n --image --enable-hotpatching --admin-username --admin-password --nsg-rule + User-Agent: + - AZURECLI/2.21.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/virtualNetworks?api-version=2018-01-01 + response: + body: + string: "{\r\n \"value\": [\r\n {\r\n \"name\": \"vmVNET\",\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/virtualNetworks/vmVNET\",\r\n + \ \"etag\": \"W/\\\"333369d2-d239-4da9-9f73-f068d059a58c\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"westus\",\r\n + \ \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": + \"Succeeded\",\r\n \"resourceGuid\": \"e8a9b592-e2a3-4ddc-8cf6-e3a57853fd62\",\r\n + \ \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\r\n + \ ]\r\n },\r\n \"subnets\": [\r\n {\r\n \"name\": + \"vmSubnet\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/virtualNetworks/vmVNET/subnets/vmSubnet\",\r\n + \ \"etag\": \"W/\\\"333369d2-d239-4da9-9f73-f068d059a58c\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"addressPrefix\": \"10.0.0.0/24\",\r\n \"ipConfigurations\": + [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/networkInterfaces/vmVMNic/ipConfigurations/ipconfigvm\"\r\n + \ }\r\n ]\r\n },\r\n \"type\": + \"Microsoft.Network/virtualNetworks/subnets\"\r\n }\r\n ],\r\n + \ \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": + false\r\n }\r\n }\r\n ]\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1705' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 08 Apr 2021 04:41:53 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 6728603a-9fe1-4a77-ab93-a2d748b70263 + status: + code: 200 + message: OK +- request: + body: '{"properties": {"template": {"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", "parameters": {"adminPassword": {"type": "securestring", + "metadata": {"description": "Secure adminPassword"}}}, "variables": {}, "resources": + [{"type": "Microsoft.Network/networkSecurityGroups", "name": "vm2NSG", "apiVersion": + "2015-06-15", "location": "westus", "tags": {}, "dependsOn": []}, {"apiVersion": + "2018-01-01", "type": "Microsoft.Network/publicIPAddresses", "name": "vm2PublicIP", + "location": "westus", "tags": {}, "dependsOn": [], "properties": {"publicIPAllocationMethod": + null}}, {"apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", + "name": "vm2VMNic", "location": "westus", "tags": {}, "dependsOn": ["Microsoft.Network/networkSecurityGroups/vm2NSG", + "Microsoft.Network/publicIpAddresses/vm2PublicIP"], "properties": {"ipConfigurations": + [{"name": "ipconfigvm2", "properties": {"privateIPAllocationMethod": "Dynamic", + "subnet": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/virtualNetworks/vmVNET/subnets/vmSubnet"}, + "publicIPAddress": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/publicIPAddresses/vm2PublicIP"}}}], + "networkSecurityGroup": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/networkSecurityGroups/vm2NSG"}}}, + {"apiVersion": "2020-12-01", "type": "Microsoft.Compute/virtualMachines", "name": + "vm2", "location": "westus", "tags": {}, "dependsOn": ["Microsoft.Network/networkInterfaces/vm2VMNic"], + "properties": {"hardwareProfile": {"vmSize": "Standard_DS1_v2"}, "networkProfile": + {"networkInterfaces": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/networkInterfaces/vm2VMNic"}]}, + "storageProfile": {"osDisk": {"createOption": "fromImage", "name": null, "caching": + "ReadWrite", "managedDisk": {"storageAccountType": null}}, "imageReference": + {"publisher": "Canonical", "offer": "UbuntuServer", "sku": "18.04-LTS", "version": + "latest"}}, "osProfile": {"computerName": "vm2", "adminUsername": "azureuser", + "adminPassword": "[parameters(''adminPassword'')]"}, "securityProfile": {}}}], + "outputs": {}}, "parameters": {"adminPassword": {"value": "testPassword0"}}, + "mode": "Incremental"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + Content-Length: + - '2713' + Content-Type: + - application/json; charset=utf-8 + ParameterSetName: + - -g -n --image --enable-hotpatching --admin-username --admin-password --nsg-rule + User-Agent: + - python/3.8.9 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.21.0 + accept-language: + - en-US + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_install_patches_000001/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2020-10-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Resources/deployments/vm_deploy_wl7rll4PS3ykUK9p3tME2ePCCIU2GK0u","name":"vm_deploy_wl7rll4PS3ykUK9p3tME2ePCCIU2GK0u","type":"Microsoft.Resources/deployments","properties":{"templateHash":"11585214519201415427","parameters":{"adminPassword":{"type":"SecureString"}},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2021-04-08T04:41:57.5166047Z","duration":"PT2.2423126S","correlationId":"e30e33cb-46ca-4296-b393-66bca1ed1845","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"networkSecurityGroups","locations":["westus"]},{"resourceType":"publicIPAddresses","locations":["westus"]},{"resourceType":"networkInterfaces","locations":["westus"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachines","locations":["westus"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/networkSecurityGroups/vm2NSG","resourceType":"Microsoft.Network/networkSecurityGroups","resourceName":"vm2NSG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/publicIPAddresses/vm2PublicIP","resourceType":"Microsoft.Network/publicIPAddresses","resourceName":"vm2PublicIP"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/networkInterfaces/vm2VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm2VMNic"},{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/networkInterfaces/vm2VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm2VMNic"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Compute/virtualMachines/vm2","resourceType":"Microsoft.Compute/virtualMachines","resourceName":"vm2"}]}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_install_patches_000001/providers/Microsoft.Resources/deployments/vm_deploy_wl7rll4PS3ykUK9p3tME2ePCCIU2GK0u/operationStatuses/08585837499702033370?api-version=2020-10-01 + cache-control: + - no-cache + content-length: + - '2444' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 08 Apr 2021 04:41:58 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -g -n --image --enable-hotpatching --admin-username --admin-password --nsg-rule + User-Agent: + - python/3.8.9 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.21.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_install_patches_000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585837499702033370?api-version=2020-10-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 08 Apr 2021 04:42:29 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -g -n --image --enable-hotpatching --admin-username --admin-password --nsg-rule + User-Agent: + - python/3.8.9 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.21.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_install_patches_000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585837499702033370?api-version=2020-10-01 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-cache + content-length: + - '22' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 08 Apr 2021 04:42:59 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -g -n --image --enable-hotpatching --admin-username --admin-password --nsg-rule + User-Agent: + - python/3.8.9 (Windows-10-10.0.19041-SP0) msrest/0.6.21 msrest_azure/0.6.3 + azure-mgmt-resource/12.0.0 Azure-SDK-For-Python AZURECLI/2.21.0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_vm_install_patches_000001/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2020-10-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Resources/deployments/vm_deploy_wl7rll4PS3ykUK9p3tME2ePCCIU2GK0u","name":"vm_deploy_wl7rll4PS3ykUK9p3tME2ePCCIU2GK0u","type":"Microsoft.Resources/deployments","properties":{"templateHash":"11585214519201415427","parameters":{"adminPassword":{"type":"SecureString"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2021-04-08T04:42:34.8002931Z","duration":"PT39.526001S","correlationId":"e30e33cb-46ca-4296-b393-66bca1ed1845","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"networkSecurityGroups","locations":["westus"]},{"resourceType":"publicIPAddresses","locations":["westus"]},{"resourceType":"networkInterfaces","locations":["westus"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachines","locations":["westus"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/networkSecurityGroups/vm2NSG","resourceType":"Microsoft.Network/networkSecurityGroups","resourceName":"vm2NSG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/publicIPAddresses/vm2PublicIP","resourceType":"Microsoft.Network/publicIPAddresses","resourceName":"vm2PublicIP"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/networkInterfaces/vm2VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm2VMNic"},{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/networkInterfaces/vm2VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm2VMNic"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Compute/virtualMachines/vm2","resourceType":"Microsoft.Compute/virtualMachines","resourceName":"vm2"}],"outputs":{},"outputResources":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Compute/virtualMachines/vm2"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/networkInterfaces/vm2VMNic"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/networkSecurityGroups/vm2NSG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/publicIPAddresses/vm2PublicIP"}]}}' + headers: + cache-control: + - no-cache + content-length: + - '3304' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 08 Apr 2021 04:43:00 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -g -n --image --enable-hotpatching --admin-username --admin-password --nsg-rule + User-Agent: + - AZURECLI/2.21.0 azsdk-python-azure-mgmt-compute/19.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Compute/virtualMachines/vm2?$expand=instanceView&api-version=2020-12-01 + response: + body: + string: "{\r\n \"name\": \"vm2\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Compute/virtualMachines/vm2\",\r\n + \ \"type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\": \"westus\",\r\n + \ \"tags\": {},\r\n \"properties\": {\r\n \"vmId\": \"f4a33469-6748-4327-b53b-5cfb1a81123e\",\r\n + \ \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_DS1_v2\"\r\n },\r\n + \ \"storageProfile\": {\r\n \"imageReference\": {\r\n \"publisher\": + \"Canonical\",\r\n \"offer\": \"UbuntuServer\",\r\n \"sku\": + \"18.04-LTS\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": + \"18.04.202103250\"\r\n },\r\n \"osDisk\": {\r\n \"osType\": + \"Linux\",\r\n \"name\": \"vm2_disk1_ab4e09237a43450aba9b83760316c462\",\r\n + \ \"createOption\": \"FromImage\",\r\n \"caching\": \"ReadWrite\",\r\n + \ \"managedDisk\": {\r\n \"storageAccountType\": \"Premium_LRS\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Compute/disks/vm2_disk1_ab4e09237a43450aba9b83760316c462\"\r\n + \ },\r\n \"diskSizeGB\": 30\r\n },\r\n \"dataDisks\": + []\r\n },\r\n \"osProfile\": {\r\n \"computerName\": \"vm2\",\r\n + \ \"adminUsername\": \"azureuser\",\r\n \"linuxConfiguration\": {\r\n + \ \"disablePasswordAuthentication\": false,\r\n \"provisionVMAgent\": + true,\r\n \"patchSettings\": {\r\n \"patchMode\": \"ImageDefault\"\r\n + \ }\r\n },\r\n \"secrets\": [],\r\n \"allowExtensionOperations\": + true,\r\n \"requireGuestProvisionSignal\": true\r\n },\r\n \"networkProfile\": + {\"networkInterfaces\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/networkInterfaces/vm2VMNic\"}]},\r\n + \ \"provisioningState\": \"Succeeded\",\r\n \"instanceView\": {\r\n \"computerName\": + \"vm2\",\r\n \"osName\": \"ubuntu\",\r\n \"osVersion\": \"18.04\",\r\n + \ \"vmAgent\": {\r\n \"vmAgentVersion\": \"2.2.54.2\",\r\n \"statuses\": + [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n + \ \"level\": \"Info\",\r\n \"displayStatus\": \"Ready\",\r\n + \ \"message\": \"Guest Agent is running\",\r\n \"time\": + \"2021-04-08T04:42:58+00:00\"\r\n }\r\n ],\r\n \"extensionHandlers\": + []\r\n },\r\n \"disks\": [\r\n {\r\n \"name\": \"vm2_disk1_ab4e09237a43450aba9b83760316c462\",\r\n + \ \"statuses\": [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n + \ \"level\": \"Info\",\r\n \"displayStatus\": \"Provisioning + succeeded\",\r\n \"time\": \"2021-04-08T04:42:23.2042002+00:00\"\r\n + \ }\r\n ]\r\n }\r\n ],\r\n \"hyperVGeneration\": + \"V1\",\r\n \"statuses\": [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n + \ \"level\": \"Info\",\r\n \"displayStatus\": \"Provisioning + succeeded\",\r\n \"time\": \"2021-04-08T04:42:33.2359163+00:00\"\r\n + \ },\r\n {\r\n \"code\": \"PowerState/running\",\r\n + \ \"level\": \"Info\",\r\n \"displayStatus\": \"VM running\"\r\n + \ }\r\n ]\r\n }\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '3253' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 08 Apr 2021 04:43:01 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/LowCostGet3Min;3997,Microsoft.Compute/LowCostGet30Min;31986 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -g -n --image --enable-hotpatching --admin-username --admin-password --nsg-rule + User-Agent: + - AZURECLI/2.21.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/networkInterfaces/vm2VMNic?api-version=2018-01-01 + response: + body: + string: "{\r\n \"name\": \"vm2VMNic\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/networkInterfaces/vm2VMNic\",\r\n + \ \"etag\": \"W/\\\"11654ff3-d649-4ed9-88ab-f583f6cd60f1\\\"\",\r\n \"location\": + \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": + \"Succeeded\",\r\n \"resourceGuid\": \"03f69a3a-ddb7-4cf5-ad79-1f8491e97daf\",\r\n + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"ipconfigvm2\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/networkInterfaces/vm2VMNic/ipConfigurations/ipconfigvm2\",\r\n + \ \"etag\": \"W/\\\"11654ff3-d649-4ed9-88ab-f583f6cd60f1\\\"\",\r\n + \ \"type\": \"Microsoft.Network/networkInterfaces/ipConfigurations\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"privateIPAddress\": \"10.0.0.5\",\r\n \"privateIPAllocationMethod\": + \"Dynamic\",\r\n \"publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/publicIPAddresses/vm2PublicIP\"\r\n + \ },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/virtualNetworks/vmVNET/subnets/vmSubnet\"\r\n + \ },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\": + \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"dnsSettings\": {\r\n \"dnsServers\": + [],\r\n \"appliedDnsServers\": [],\r\n \"internalDomainNameSuffix\": + \"sk00t0fd2loe1dhw2osxqu53mc.dx.internal.cloudapp.net\"\r\n },\r\n \"macAddress\": + \"00-0D-3A-31-36-FB\",\r\n \"enableAcceleratedNetworking\": false,\r\n + \ \"enableIPForwarding\": false,\r\n \"networkSecurityGroup\": {\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/networkSecurityGroups/vm2NSG\"\r\n + \ },\r\n \"primary\": true,\r\n \"virtualMachine\": {\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Compute/virtualMachines/vm2\"\r\n + \ }\r\n },\r\n \"type\": \"Microsoft.Network/networkInterfaces\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '2566' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 08 Apr 2021 04:43:01 GMT + etag: + - W/"11654ff3-d649-4ed9-88ab-f583f6cd60f1" + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 6f829820-aea8-441d-879b-12b5904e77d5 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -g -n --image --enable-hotpatching --admin-username --admin-password --nsg-rule + User-Agent: + - AZURECLI/2.21.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/publicIPAddresses/vm2PublicIP?api-version=2018-01-01 + response: + body: + string: "{\r\n \"name\": \"vm2PublicIP\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/publicIPAddresses/vm2PublicIP\",\r\n + \ \"etag\": \"W/\\\"a381e0c0-92eb-49c7-bb11-a1aaf63aebc2\\\"\",\r\n \"location\": + \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": + \"Succeeded\",\r\n \"resourceGuid\": \"654db8ef-2efa-4cf3-9bc4-5e64c974aa3a\",\r\n + \ \"ipAddress\": \"104.40.0.248\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n + \ \"publicIPAllocationMethod\": \"Dynamic\",\r\n \"idleTimeoutInMinutes\": + 4,\r\n \"ipTags\": [],\r\n \"ipConfiguration\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Network/networkInterfaces/vm2VMNic/ipConfigurations/ipconfigvm2\"\r\n + \ }\r\n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n + \ \"sku\": {\r\n \"name\": \"Basic\"\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '996' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 08 Apr 2021 04:43:01 GMT + etag: + - W/"a381e0c0-92eb-49c7-bb11-a1aaf63aebc2" + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 726bd4bf-c007-40ac-a062-61c0653048ad + status: + code: 200 + message: OK +- request: + body: '{"maximumDuration": "PT4H", "rebootSetting": "IfRequired", "windowsParameters": + {}, "linuxParameters": {"classificationsToInclude": ["Critical", "Security"]}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vm install-patches + Connection: + - keep-alive + Content-Length: + - '158' + Content-Type: + - application/json + ParameterSetName: + - -g -n --maximum-duration --reboot-setting --classifications-to-include-linux + User-Agent: + - AZURECLI/2.21.0 azsdk-python-azure-mgmt-compute/19.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_vm_install_patches_000001/providers/Microsoft.Compute/virtualMachines/vm2/installPatches?api-version=2020-12-01 + response: + body: + string: '' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/917ee1a8-922e-40c3-8f4d-caa5d754d0a4?api-version=2020-12-01 + cache-control: + - no-cache + content-length: + - '0' + date: + - Thu, 08 Apr 2021 04:43:04 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/917ee1a8-922e-40c3-8f4d-caa5d754d0a4?monitor=true&api-version=2020-12-01 + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/PatchOperation3Min;189,Microsoft.Compute/PatchOperation30Min;598 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm install-patches + Connection: + - keep-alive + ParameterSetName: + - -g -n --maximum-duration --reboot-setting --classifications-to-include-linux + User-Agent: + - AZURECLI/2.21.0 azsdk-python-azure-mgmt-compute/19.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/917ee1a8-922e-40c3-8f4d-caa5d754d0a4?api-version=2020-12-01 + response: + body: + string: "{\r\n \"startTime\": \"2021-04-08T04:43:03.2372288+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"917ee1a8-922e-40c3-8f4d-caa5d754d0a4\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '134' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 08 Apr 2021 04:43:34 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetOperation3Min;14992,Microsoft.Compute/GetOperation30Min;29969 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm install-patches + Connection: + - keep-alive + ParameterSetName: + - -g -n --maximum-duration --reboot-setting --classifications-to-include-linux + User-Agent: + - AZURECLI/2.21.0 azsdk-python-azure-mgmt-compute/19.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/917ee1a8-922e-40c3-8f4d-caa5d754d0a4?api-version=2020-12-01 + response: + body: + string: "{\r\n \"startTime\": \"2021-04-08T04:43:03.2372288+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"917ee1a8-922e-40c3-8f4d-caa5d754d0a4\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '134' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 08 Apr 2021 04:44:04 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetOperation3Min;14990,Microsoft.Compute/GetOperation30Min;29966 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm install-patches + Connection: + - keep-alive + ParameterSetName: + - -g -n --maximum-duration --reboot-setting --classifications-to-include-linux + User-Agent: + - AZURECLI/2.21.0 azsdk-python-azure-mgmt-compute/19.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/917ee1a8-922e-40c3-8f4d-caa5d754d0a4?api-version=2020-12-01 + response: + body: + string: "{\r\n \"startTime\": \"2021-04-08T04:43:03.2372288+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"917ee1a8-922e-40c3-8f4d-caa5d754d0a4\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '134' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 08 Apr 2021 04:44:34 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetOperation3Min;14990,Microsoft.Compute/GetOperation30Min;29963 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm install-patches + Connection: + - keep-alive + ParameterSetName: + - -g -n --maximum-duration --reboot-setting --classifications-to-include-linux + User-Agent: + - AZURECLI/2.21.0 azsdk-python-azure-mgmt-compute/19.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/917ee1a8-922e-40c3-8f4d-caa5d754d0a4?api-version=2020-12-01 + response: + body: + string: "{\r\n \"startTime\": \"2021-04-08T04:43:03.2372288+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"917ee1a8-922e-40c3-8f4d-caa5d754d0a4\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '134' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 08 Apr 2021 04:45:05 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetOperation3Min;14987,Microsoft.Compute/GetOperation30Min;29961 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm install-patches + Connection: + - keep-alive + ParameterSetName: + - -g -n --maximum-duration --reboot-setting --classifications-to-include-linux + User-Agent: + - AZURECLI/2.21.0 azsdk-python-azure-mgmt-compute/19.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/917ee1a8-922e-40c3-8f4d-caa5d754d0a4?api-version=2020-12-01 + response: + body: + string: "{\r\n \"startTime\": \"2021-04-08T04:43:03.2372288+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"917ee1a8-922e-40c3-8f4d-caa5d754d0a4\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '134' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 08 Apr 2021 04:45:35 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetOperation3Min;14986,Microsoft.Compute/GetOperation30Min;29958 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm install-patches + Connection: + - keep-alive + ParameterSetName: + - -g -n --maximum-duration --reboot-setting --classifications-to-include-linux + User-Agent: + - AZURECLI/2.21.0 azsdk-python-azure-mgmt-compute/19.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/917ee1a8-922e-40c3-8f4d-caa5d754d0a4?api-version=2020-12-01 + response: + body: + string: "{\r\n \"startTime\": \"2021-04-08T04:43:03.2372288+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"917ee1a8-922e-40c3-8f4d-caa5d754d0a4\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '134' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 08 Apr 2021 04:46:06 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetOperation3Min;14984,Microsoft.Compute/GetOperation30Min;29955 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm install-patches + Connection: + - keep-alive + ParameterSetName: + - -g -n --maximum-duration --reboot-setting --classifications-to-include-linux + User-Agent: + - AZURECLI/2.21.0 azsdk-python-azure-mgmt-compute/19.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/917ee1a8-922e-40c3-8f4d-caa5d754d0a4?api-version=2020-12-01 + response: + body: + string: "{\r\n \"startTime\": \"2021-04-08T04:43:03.2372288+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"917ee1a8-922e-40c3-8f4d-caa5d754d0a4\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '134' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 08 Apr 2021 04:46:36 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetOperation3Min;14985,Microsoft.Compute/GetOperation30Min;29953 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm install-patches + Connection: + - keep-alive + ParameterSetName: + - -g -n --maximum-duration --reboot-setting --classifications-to-include-linux + User-Agent: + - AZURECLI/2.21.0 azsdk-python-azure-mgmt-compute/19.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/917ee1a8-922e-40c3-8f4d-caa5d754d0a4?api-version=2020-12-01 + response: + body: + string: "{\r\n \"startTime\": \"2021-04-08T04:43:03.2372288+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"917ee1a8-922e-40c3-8f4d-caa5d754d0a4\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '134' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 08 Apr 2021 04:47:06 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetOperation3Min;14985,Microsoft.Compute/GetOperation30Min;29950 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm install-patches + Connection: + - keep-alive + ParameterSetName: + - -g -n --maximum-duration --reboot-setting --classifications-to-include-linux + User-Agent: + - AZURECLI/2.21.0 azsdk-python-azure-mgmt-compute/19.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/917ee1a8-922e-40c3-8f4d-caa5d754d0a4?api-version=2020-12-01 + response: + body: + string: "{\r\n \"startTime\": \"2021-04-08T04:43:03.2372288+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"917ee1a8-922e-40c3-8f4d-caa5d754d0a4\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '134' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 08 Apr 2021 04:47:37 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetOperation3Min;14985,Microsoft.Compute/GetOperation30Min;29947 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm install-patches + Connection: + - keep-alive + ParameterSetName: + - -g -n --maximum-duration --reboot-setting --classifications-to-include-linux + User-Agent: + - AZURECLI/2.21.0 azsdk-python-azure-mgmt-compute/19.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/917ee1a8-922e-40c3-8f4d-caa5d754d0a4?api-version=2020-12-01 + response: + body: + string: "{\r\n \"startTime\": \"2021-04-08T04:43:03.2372288+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"917ee1a8-922e-40c3-8f4d-caa5d754d0a4\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '134' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 08 Apr 2021 04:48:06 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetOperation3Min;14984,Microsoft.Compute/GetOperation30Min;29944 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm install-patches + Connection: + - keep-alive + ParameterSetName: + - -g -n --maximum-duration --reboot-setting --classifications-to-include-linux + User-Agent: + - AZURECLI/2.21.0 azsdk-python-azure-mgmt-compute/19.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/917ee1a8-922e-40c3-8f4d-caa5d754d0a4?api-version=2020-12-01 + response: + body: + string: "{\r\n \"startTime\": \"2021-04-08T04:43:03.2372288+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"917ee1a8-922e-40c3-8f4d-caa5d754d0a4\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '134' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 08 Apr 2021 04:48:37 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetOperation3Min;14984,Microsoft.Compute/GetOperation30Min;29941 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm install-patches + Connection: + - keep-alive + ParameterSetName: + - -g -n --maximum-duration --reboot-setting --classifications-to-include-linux + User-Agent: + - AZURECLI/2.21.0 azsdk-python-azure-mgmt-compute/19.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/917ee1a8-922e-40c3-8f4d-caa5d754d0a4?api-version=2020-12-01 + response: + body: + string: "{\r\n \"startTime\": \"2021-04-08T04:43:03.2372288+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"917ee1a8-922e-40c3-8f4d-caa5d754d0a4\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '134' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 08 Apr 2021 04:49:08 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetOperation3Min;14984,Microsoft.Compute/GetOperation30Min;29938 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm install-patches + Connection: + - keep-alive + ParameterSetName: + - -g -n --maximum-duration --reboot-setting --classifications-to-include-linux + User-Agent: + - AZURECLI/2.21.0 azsdk-python-azure-mgmt-compute/19.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/917ee1a8-922e-40c3-8f4d-caa5d754d0a4?api-version=2020-12-01 + response: + body: + string: "{\r\n \"startTime\": \"2021-04-08T04:43:03.2372288+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"917ee1a8-922e-40c3-8f4d-caa5d754d0a4\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '134' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 08 Apr 2021 04:49:37 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetOperation3Min;14984,Microsoft.Compute/GetOperation30Min;29935 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm install-patches + Connection: + - keep-alive + ParameterSetName: + - -g -n --maximum-duration --reboot-setting --classifications-to-include-linux + User-Agent: + - AZURECLI/2.21.0 azsdk-python-azure-mgmt-compute/19.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/917ee1a8-922e-40c3-8f4d-caa5d754d0a4?api-version=2020-12-01 + response: + body: + string: "{\r\n \"startTime\": \"2021-04-08T04:43:03.2372288+00:00\",\r\n \"endTime\": + \"2021-04-08T04:49:52.0526486+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"properties\": {\r\n \"output\": {\"status\":\"Succeeded\",\"installationActivityId\":\"917ee1a8-922e-40c3-8f4d-caa5d754d0a4\",\"rebootStatus\":\"NotNeeded\",\"maintenanceWindowExceeded\":false,\"excludedPatchCount\":0,\"notSelectedPatchCount\":6,\"pendingPatchCount\":0,\"installedPatchCount\":3,\"failedPatchCount\":0,\"patches\":[{\"patchId\":\"libapt-pkg5.0_1.6.13_Ubuntu_18.04\",\"name\":\"libapt-pkg5.0\",\"version\":\"1.6.13\",\"classifications\":[\"Other\"],\"installationState\":\"NotSelected\"},{\"patchId\":\"libapt-inst2.0_1.6.13_Ubuntu_18.04\",\"name\":\"libapt-inst2.0\",\"version\":\"1.6.13\",\"classifications\":[\"Other\"],\"installationState\":\"NotSelected\"},{\"patchId\":\"apt_1.6.13_Ubuntu_18.04\",\"name\":\"apt\",\"version\":\"1.6.13\",\"classifications\":[\"Other\"],\"installationState\":\"NotSelected\"},{\"patchId\":\"apt-utils_1.6.13_Ubuntu_18.04\",\"name\":\"apt-utils\",\"version\":\"1.6.13\",\"classifications\":[\"Other\"],\"installationState\":\"NotSelected\"},{\"patchId\":\"ubuntu-keyring_2018.09.18.1~18.04.2_Ubuntu_18.04\",\"name\":\"ubuntu-keyring\",\"version\":\"2018.09.18.1~18.04.2\",\"classifications\":[\"Other\"],\"installationState\":\"NotSelected\"},{\"patchId\":\"sbsigntool_0.9.2-2ubuntu1~18.04.1_Ubuntu_18.04\",\"name\":\"sbsigntool\",\"version\":\"0.9.2-2ubuntu1~18.04.1\",\"classifications\":[\"Other\"],\"installationState\":\"NotSelected\"},{\"patchId\":\"curl_7.58.0-2ubuntu3.13_Ubuntu_18.04\",\"name\":\"curl\",\"version\":\"7.58.0-2ubuntu3.13\",\"classifications\":[\"Security\"],\"installationState\":\"Installed\"},{\"patchId\":\"libcurl4_7.58.0-2ubuntu3.13_Ubuntu_18.04\",\"name\":\"libcurl4\",\"version\":\"7.58.0-2ubuntu3.13\",\"classifications\":[\"Security\"],\"installationState\":\"Installed\"},{\"patchId\":\"libcurl3-gnutls_7.58.0-2ubuntu3.13_Ubuntu_18.04\",\"name\":\"libcurl3-gnutls\",\"version\":\"7.58.0-2ubuntu3.13\",\"classifications\":[\"Security\"],\"installationState\":\"Installed\"}],\"startDateTime\":\"2021-04-08T04:43:04.362306+00:00\",\"error\":{\"details\":[],\"code\":\"0\",\"message\":\"0 + error/s reported.\"}}\r\n },\r\n \"name\": \"917ee1a8-922e-40c3-8f4d-caa5d754d0a4\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '2066' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 08 Apr 2021 04:50:09 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetOperation3Min;14985,Microsoft.Compute/GetOperation30Min;29933 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm install-patches + Connection: + - keep-alive + ParameterSetName: + - -g -n --maximum-duration --reboot-setting --classifications-to-include-linux + User-Agent: + - AZURECLI/2.21.0 azsdk-python-azure-mgmt-compute/19.0.0 Python/3.8.9 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/operations/917ee1a8-922e-40c3-8f4d-caa5d754d0a4?monitor=true&api-version=2020-12-01 + response: + body: + string: '{"status":"Succeeded","installationActivityId":"917ee1a8-922e-40c3-8f4d-caa5d754d0a4","rebootStatus":"NotNeeded","maintenanceWindowExceeded":false,"excludedPatchCount":0,"notSelectedPatchCount":6,"pendingPatchCount":0,"installedPatchCount":3,"failedPatchCount":0,"patches":[{"patchId":"libapt-pkg5.0_1.6.13_Ubuntu_18.04","name":"libapt-pkg5.0","version":"1.6.13","classifications":["Other"],"installationState":"NotSelected"},{"patchId":"libapt-inst2.0_1.6.13_Ubuntu_18.04","name":"libapt-inst2.0","version":"1.6.13","classifications":["Other"],"installationState":"NotSelected"},{"patchId":"apt_1.6.13_Ubuntu_18.04","name":"apt","version":"1.6.13","classifications":["Other"],"installationState":"NotSelected"},{"patchId":"apt-utils_1.6.13_Ubuntu_18.04","name":"apt-utils","version":"1.6.13","classifications":["Other"],"installationState":"NotSelected"},{"patchId":"ubuntu-keyring_2018.09.18.1~18.04.2_Ubuntu_18.04","name":"ubuntu-keyring","version":"2018.09.18.1~18.04.2","classifications":["Other"],"installationState":"NotSelected"},{"patchId":"sbsigntool_0.9.2-2ubuntu1~18.04.1_Ubuntu_18.04","name":"sbsigntool","version":"0.9.2-2ubuntu1~18.04.1","classifications":["Other"],"installationState":"NotSelected"},{"patchId":"curl_7.58.0-2ubuntu3.13_Ubuntu_18.04","name":"curl","version":"7.58.0-2ubuntu3.13","classifications":["Security"],"installationState":"Installed"},{"patchId":"libcurl4_7.58.0-2ubuntu3.13_Ubuntu_18.04","name":"libcurl4","version":"7.58.0-2ubuntu3.13","classifications":["Security"],"installationState":"Installed"},{"patchId":"libcurl3-gnutls_7.58.0-2ubuntu3.13_Ubuntu_18.04","name":"libcurl3-gnutls","version":"7.58.0-2ubuntu3.13","classifications":["Security"],"installationState":"Installed"}],"startDateTime":"2021-04-08T04:43:04.362306+00:00","error":{"details":[],"code":"0","message":"0 + error/s reported."}}' + headers: + cache-control: + - no-cache + content-length: + - '1841' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 08 Apr 2021 04:50:09 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetOperation3Min;14984,Microsoft.Compute/GetOperation30Min;29932 + status: + code: 200 + message: OK +version: 1 diff --git a/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py b/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py index e416aafb936..b9d44f18ea7 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py +++ b/src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py @@ -5072,6 +5072,21 @@ def test_vm_ssh_key(self, resource_group): self.cmd('sshkey show -g {rg} -n k3') +class VMInstallPatchesScenarioTest(ScenarioTest): + @ResourceGroupPreparer(name_prefix='cli_test_vm_install_patches_') + def test_vm_install_patches(self, resource_group): + # Create new one + self.cmd('vm create -g {rg} -n vm --image Win2019Datacenter --enable-hotpatching true --admin-username azureuser --admin-password testPassword0 --nsg-rule NONE') + self.cmd('vm install-patches -g {rg} -n vm --maximum-duration PT4H --reboot-setting IfRequired --classifications-to-include-win Critical Security --exclude-kbs-requiring-reboot true', checks=[ + self.check('status', 'Succeeded') + ]) + + self.cmd('vm create -g {rg} -n vm2 --image UbuntuLTS --enable-hotpatching true --admin-username azureuser --admin-password testPassword0 --nsg-rule NONE') + self.cmd('vm install-patches -g {rg} -n vm2 --maximum-duration PT4H --reboot-setting IfRequired --classifications-to-include-linux Critical Security', checks=[ + self.check('status', 'Succeeded') + ]) + + class VMTrustedLaunchScenarioTest(ScenarioTest): @unittest.skip('Not supported') @ResourceGroupPreparer(name_prefix='cli_test_vm_trusted_launch_', location='southcentralus')