From 7782703d75689cafeca2eeed3d90ecd3a8024707 Mon Sep 17 00:00:00 2001 From: Feiyue Yu Date: Thu, 15 Apr 2021 15:58:20 +0800 Subject: [PATCH 1/8] [Compute] sig image version create: Support data disk VHDs --- src/azure-cli/azure/cli/command_modules/vm/custom.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 79de41a3e8e..ace5f36db36 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/custom.py +++ b/src/azure-cli/azure/cli/command_modules/vm/custom.py @@ -3391,7 +3391,8 @@ def create_image_version(cmd, resource_group_name, gallery_name, gallery_image_n location=None, target_regions=None, storage_account_type=None, end_of_life_date=None, exclude_from_latest=None, replica_count=None, tags=None, os_snapshot=None, data_snapshots=None, managed_image=None, data_snapshot_luns=None, - target_region_encryption=None, os_vhd_uri=None, os_vhd_storage_account=None): + target_region_encryption=None, os_vhd_uri=None, os_vhd_storage_account=None, + data_vhds_uri=None, data_vhds_luns=None, data_vhds_storage_accounts=None): # print(target_regions) from msrestazure.tools import resource_id, is_valid_resource_id from azure.cli.core.commands.client_factory import get_subscription_id From 1636f5539cbcb6cdfc2615f17c8336356c0627ed Mon Sep 17 00:00:00 2001 From: Feiyue Yu Date: Mon, 19 Apr 2021 17:27:12 +0800 Subject: [PATCH 2/8] data disks VHDs --- .../azure/cli/command_modules/vm/_params.py | 3 ++ .../azure/cli/command_modules/vm/custom.py | 34 +++++++++++++++++-- 2 files changed, 35 insertions(+), 2 deletions(-) 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 9eaacfc82ec..2ad9f3471cf 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/_params.py +++ b/src/azure-cli/azure/cli/command_modules/vm/_params.py @@ -948,6 +948,9 @@ def load_arguments(self, _): help='Space-separated list of customer managed keys for encrypting the OS and data disks in the gallery artifact for each region. Format for each region: `,,,,`. Use "null" as a placeholder.') c.argument('os_vhd_uri', help='Source VHD URI of OS disk') c.argument('os_vhd_storage_account', help='Name or ID of storage account of source VHD URI of OS disk') + c.argument('data_vhds_uris', nargs='+', help='Source VHD URIs (space-delimited) of data disks') + c.argument('data_vhds_luns', nargs='+', help='Logical unit numbers (space-delimited) of source VHD URIs of data disks') + c.argument('data_vhds_storage_accounts', nargs='+', help='Names or IDs (space-delimited) of storage accounts of source VHD URIs of data disks') with self.argument_context('sig image-version show') as c: c.argument('expand', help="The expand expression to apply on the operation, e.g. 'ReplicationStatus'") 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 ca94024d258..bfada11b505 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/custom.py +++ b/src/azure-cli/azure/cli/command_modules/vm/custom.py @@ -3397,7 +3397,7 @@ def create_image_version(cmd, resource_group_name, gallery_name, gallery_image_n end_of_life_date=None, exclude_from_latest=None, replica_count=None, tags=None, os_snapshot=None, data_snapshots=None, managed_image=None, data_snapshot_luns=None, target_region_encryption=None, os_vhd_uri=None, os_vhd_storage_account=None, - data_vhds_uri=None, data_vhds_luns=None, data_vhds_storage_accounts=None): + data_vhds_uris=None, data_vhds_luns=None, data_vhds_storage_accounts=None): # print(target_regions) from msrestazure.tools import resource_id, is_valid_resource_id from azure.cli.core.commands.client_factory import get_subscription_id @@ -3452,8 +3452,9 @@ def create_image_version(cmd, resource_group_name, gallery_name, gallery_image_n lun=data_snapshot_luns[i])) # from vhd, only support os image now if cmd.supported_api_version(min_api='2020-09-30', operation_group='gallery_image_versions'): + # OS disk if os_vhd_uri and os_vhd_storage_account is None or os_vhd_uri is None and os_vhd_storage_account: - raise ValidationError('--vhd and --vhd-storage-account should be used together.') + raise ValidationError('--os-vhd-uri and --os-vhd-storage-account should be used together.') if os_vhd_uri and os_vhd_storage_account: if not is_valid_resource_id(os_vhd_storage_account): os_vhd_storage_account = resource_id( @@ -3462,6 +3463,35 @@ def create_image_version(cmd, resource_group_name, gallery_name, gallery_image_n os_disk_image = GalleryOSDiskImage(source=GalleryArtifactVersionSource( id=os_vhd_storage_account, uri=os_vhd_uri)) + # Data disks + if data_vhds_uris and data_vhds_storage_accounts is None or \ + data_vhds_uris is None and data_vhds_storage_accounts: + raise ValidationError('--data-vhds-uris and --data-vhds-storage-accounts should be used together.') + if data_vhds_luns and data_vhds_uris is None: + raise ValidationError('--data-vhds-luns must be used together with --data-vhds-uris') + if data_vhds_uris: + # Generate LUNs + if data_vhds_luns is None: + # 0, 1, 2, ... + data_vhds_luns = [i for i in range(len(data_vhds_uris))] + # Check length + len_data_vhds_uris = len(data_vhds_uris) + len_data_vhds_luns = len(data_vhds_luns) + len_data_vhds_storage_accounts = len(data_vhds_storage_accounts) + if len_data_vhds_uris != len_data_vhds_luns or len_data_vhds_uris != len_data_vhds_storage_accounts: + raise ValidationError('Length of --data-vhds-uris, --data-vhds-luns, --data-vhds-storage-accounts ' + 'must be same.') + # Generate full storage account ID + for i, storage_account in enumerate(data_vhds_storage_accounts): + if not is_valid_resource_id(storage_account): + data_vhds_storage_accounts[i] = resource_id( + subscription=get_subscription_id(cmd.cli_ctx), resource_group=resource_group_name, + namespace='Microsoft.Storage', type='storageAccounts', name=storage_account) + data_disk_images = [] + for uri, lun, account in zip(data_vhds_uris, data_vhds_luns, data_vhds_storage_accounts): + data_disk_images.append(GalleryDataDiskImage( + source=GalleryArtifactVersionSource(id=account, uri=uri), lun=lun)) + storage_profile = GalleryImageVersionStorageProfile(source=source, os_disk_image=os_disk_image, data_disk_images=data_disk_images) image_version = ImageVersion(publishing_profile=profile, location=location, tags=(tags or {}), From af9a83a289f2b27c449cfb6f023dd664cf09bc48 Mon Sep 17 00:00:00 2001 From: Feiyue Yu Date: Tue, 20 Apr 2021 17:43:39 +0800 Subject: [PATCH 3/8] test --- .../test_storage_blob_live_scenarios.py | 2 +- .../test_gallery_image_version_vhd.yaml | 1928 +---------------- .../vm/tests/latest/test_vm_commands.py | 28 +- 3 files changed, 43 insertions(+), 1915 deletions(-) diff --git a/src/azure-cli/azure/cli/command_modules/storage/tests/latest/test_storage_blob_live_scenarios.py b/src/azure-cli/azure/cli/command_modules/storage/tests/latest/test_storage_blob_live_scenarios.py index bb839418b7b..b1646a70823 100644 --- a/src/azure-cli/azure/cli/command_modules/storage/tests/latest/test_storage_blob_live_scenarios.py +++ b/src/azure-cli/azure/cli/command_modules/storage/tests/latest/test_storage_blob_live_scenarios.py @@ -48,7 +48,7 @@ def test_storage_blob_upload_2G_file(self, resource_group, storage_account): @serial_test() @ResourceGroupPreparer() @StorageAccountPreparer() - def test_storage_blob_upload_10G_file(self, resource_group, storage_account): + def test_storage_blob_upload_10G_file(self, resource_group, storage_account, storage_account_info): self.verify_blob_upload_and_download(resource_group, storage_account, 10 * 1024 * 1024, 'block', skip_download=True) diff --git a/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_gallery_image_version_vhd.yaml b/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_gallery_image_version_vhd.yaml index 6f58cfa398f..97e455e93ee 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_gallery_image_version_vhd.yaml +++ b/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_gallery_image_version_vhd.yaml @@ -2,1922 +2,38 @@ interactions: - request: body: null headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - vm create - Connection: - - keep-alive - ParameterSetName: - - -g -n --image --use-unmanaged-disk --nsg-rule --generate-ssh-key - User-Agent: - - python/3.7.4 (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_gallery_image_version_vhd000001?api-version=2020-10-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_gallery_image_version_vhd000001","name":"cli_test_gallery_image_version_vhd000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2021-04-09T03:32:38Z"},"properties":{"provisioningState":"Succeeded"}}' - headers: - cache-control: - - no-cache - content-length: - - '428' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 09 Apr 2021 03:32:42 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: - - Fri, 09 Apr 2021 03:32:43 GMT - etag: - - W/"540044b4084c3c314537f1baa1770f248628b2bc9ba0328f1004c33862e049da" - expires: - - Fri, 09 Apr 2021 03:37:43 GMT - source-age: - - '24' - 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: - - 1c26184c5d84d4b93dcba7ed7b863a7b456a7229 - x-frame-options: - - deny - x-github-request-id: - - C62E:4586:4AE6C2:58C97E:606FB659 - x-served-by: - - cache-qpg1282-QPG - x-timer: - - S1617939164.573393,VS0,VE0 - x-xss-protection: - - 1; mode=block - 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 --use-unmanaged-disk --nsg-rule --generate-ssh-key - User-Agent: - - AZURECLI/2.21.0 azsdk-python-azure-mgmt-storage/17.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_gallery_image_version_vhd000001/providers/Microsoft.Storage/storageAccounts?api-version=2021-01-01 - response: - body: - string: '{"value":[]}' - headers: - cache-control: - - no-cache - content-length: - - '12' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 09 Apr 2021 03:32:43 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, text/json - Accept-Encoding: - - gzip, deflate - CommandName: - - vm create - Connection: - - keep-alive - ParameterSetName: - - -g -n --image --use-unmanaged-disk --nsg-rule --generate-ssh-key - User-Agent: - - AZURECLI/2.21.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_gallery_image_version_vhd000001/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: - - Fri, 09 Apr 2021 03:32: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: '{"properties": {"template": {"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", "parameters": {}, "variables": {}, "resources": - [{"type": "Microsoft.Storage/storageAccounts", "name": "vhdstorage1a626868697e4c", - "apiVersion": "2015-06-15", "location": "westus", "tags": {}, "dependsOn": [], - "properties": {"accountType": "Premium_LRS"}}, {"name": "vm1VNET", "type": "Microsoft.Network/virtualNetworks", - "location": "westus", "apiVersion": "2015-06-15", "dependsOn": [], "tags": {}, - "properties": {"addressSpace": {"addressPrefixes": ["10.0.0.0/16"]}, "subnets": - [{"name": "vm1Subnet", "properties": {"addressPrefix": "10.0.0.0/24"}}]}}, {"type": - "Microsoft.Network/networkSecurityGroups", "name": "vm1NSG", "apiVersion": "2015-06-15", - "location": "westus", "tags": {}, "dependsOn": []}, {"apiVersion": "2018-01-01", - "type": "Microsoft.Network/publicIPAddresses", "name": "vm1PublicIP", "location": - "westus", "tags": {}, "dependsOn": [], "properties": {"publicIPAllocationMethod": - null}}, {"apiVersion": "2015-06-15", "type": "Microsoft.Network/networkInterfaces", - "name": "vm1VMNic", "location": "westus", "tags": {}, "dependsOn": ["Microsoft.Network/virtualNetworks/vm1VNET", - "Microsoft.Network/networkSecurityGroups/vm1NSG", "Microsoft.Network/publicIpAddresses/vm1PublicIP"], - "properties": {"ipConfigurations": [{"name": "ipconfigvm1", "properties": {"privateIPAllocationMethod": - "Dynamic", "subnet": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_gallery_image_version_vhd000001/providers/Microsoft.Network/virtualNetworks/vm1VNET/subnets/vm1Subnet"}, - "publicIPAddress": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_gallery_image_version_vhd000001/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP"}}}], - "networkSecurityGroup": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_gallery_image_version_vhd000001/providers/Microsoft.Network/networkSecurityGroups/vm1NSG"}}}, - {"apiVersion": "2020-12-01", "type": "Microsoft.Compute/virtualMachines", "name": - "vm1", "location": "westus", "tags": {}, "dependsOn": ["Microsoft.Storage/storageAccounts/vhdstorage1a626868697e4c", - "Microsoft.Network/networkInterfaces/vm1VMNic"], "properties": {"hardwareProfile": - {"vmSize": "Standard_DS1_v2"}, "networkProfile": {"networkInterfaces": [{"id": - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_gallery_image_version_vhd000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic"}]}, - "storageProfile": {"osDisk": {"createOption": "fromImage", "name": "osdisk_1a62686869", - "caching": "ReadWrite", "vhd": {"uri": "https://vhdstorage1a626868697e4c.blob.core.windows.net/vhds/osdisk_1a62686869.vhd"}}, - "imageReference": {"publisher": "OpenLogic", "offer": "CentOS", "sku": "7.5", - "version": "latest"}}, "osProfile": {"computerName": "vm1", "adminUsername": - "fey", "linuxConfiguration": {"disablePasswordAuthentication": true, "ssh": - {"publicKeys": [{"keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDmzXeK++L20uMK/Ug5wpjnWWyMlHoecEOxyHueHc1gPDj8qgLChiHt1OWJ1sDjiqBJ+hEEwZLjN8lCmUvWzzrl20d7M/BVp1ejulE/zr999kWuY3m5+FpAkbbxeO9LWoafwOir9dPzIOjDGdPWKbgHr3SerOHAuvVdXJDhWHtW5lB/MEnrxi48Pz/8k1lD1YccUAI6zDgKVJPBEk9fWMW8H0hKYsRXmlxdtg2npBQK7kbmcB2NJPEhTVgxVPqSaBVAt2lOCC/QQvAXcoD0lJGujp1IVYqSUarS5RnrYEDZ9Q6EKduWrP0GFkFkF8YzpFe+BRFaV8bLJrvZN43vgzRj - fey@DESKTOP-ARGPJS4\n", "path": "/home/fey/.ssh/authorized_keys"}]}}}, "securityProfile": - {}}}], "outputs": {}}, "parameters": {}, "mode": "Incremental"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - vm create - Connection: - - keep-alive - Content-Length: - - '3744' - Content-Type: - - application/json; charset=utf-8 - ParameterSetName: - - -g -n --image --use-unmanaged-disk --nsg-rule --generate-ssh-key - User-Agent: - - python/3.7.4 (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_gallery_image_version_vhd000001/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2020-10-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_gallery_image_version_vhd000001/providers/Microsoft.Resources/deployments/vm_deploy_U7gWui2V4NaBhgRthSL2wToZkmDbYJxD","name":"vm_deploy_U7gWui2V4NaBhgRthSL2wToZkmDbYJxD","type":"Microsoft.Resources/deployments","properties":{"templateHash":"8744553287868360303","parameters":{},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2021-04-09T03:32:48.2358949Z","duration":"PT2.1773726S","correlationId":"c17a7c27-81c9-435c-ba0b-9c6492fb3986","providers":[{"namespace":"Microsoft.Storage","resourceTypes":[{"resourceType":"storageAccounts","locations":["westus"]}]},{"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_gallery_image_version_vhd000001/providers/Microsoft.Network/virtualNetworks/vm1VNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"vm1VNET"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_gallery_image_version_vhd000001/providers/Microsoft.Network/networkSecurityGroups/vm1NSG","resourceType":"Microsoft.Network/networkSecurityGroups","resourceName":"vm1NSG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_gallery_image_version_vhd000001/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP","resourceType":"Microsoft.Network/publicIPAddresses","resourceName":"vm1PublicIP"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_gallery_image_version_vhd000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm1VMNic"},{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_gallery_image_version_vhd000001/providers/Microsoft.Storage/storageAccounts/vhdstorage1a626868697e4c","resourceType":"Microsoft.Storage/storageAccounts","resourceName":"vhdstorage1a626868697e4c"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_gallery_image_version_vhd000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm1VMNic"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_gallery_image_version_vhd000001/providers/Microsoft.Compute/virtualMachines/vm1","resourceType":"Microsoft.Compute/virtualMachines","resourceName":"vm1"}]}}' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_gallery_image_version_vhd000001/providers/Microsoft.Resources/deployments/vm_deploy_U7gWui2V4NaBhgRthSL2wToZkmDbYJxD/operationStatuses/08585836677194191191?api-version=2020-10-01 - cache-control: - - no-cache - content-length: - - '3166' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 09 Apr 2021 03:32:48 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 --use-unmanaged-disk --nsg-rule --generate-ssh-key - User-Agent: - - python/3.7.4 (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_gallery_image_version_vhd000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585836677194191191?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: - - Fri, 09 Apr 2021 03:33:19 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 --use-unmanaged-disk --nsg-rule --generate-ssh-key - User-Agent: - - python/3.7.4 (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_gallery_image_version_vhd000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585836677194191191?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: - - Fri, 09 Apr 2021 03:33:50 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 --use-unmanaged-disk --nsg-rule --generate-ssh-key - User-Agent: - - python/3.7.4 (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_gallery_image_version_vhd000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585836677194191191?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: - - Fri, 09 Apr 2021 03:34:21 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 --use-unmanaged-disk --nsg-rule --generate-ssh-key - User-Agent: - - python/3.7.4 (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_gallery_image_version_vhd000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08585836677194191191?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: - - Fri, 09 Apr 2021 03:34:51 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 --use-unmanaged-disk --nsg-rule --generate-ssh-key - User-Agent: - - python/3.7.4 (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_gallery_image_version_vhd000001/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2020-10-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_gallery_image_version_vhd000001/providers/Microsoft.Resources/deployments/vm_deploy_U7gWui2V4NaBhgRthSL2wToZkmDbYJxD","name":"vm_deploy_U7gWui2V4NaBhgRthSL2wToZkmDbYJxD","type":"Microsoft.Resources/deployments","properties":{"templateHash":"8744553287868360303","parameters":{},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2021-04-09T03:34:27.4553531Z","duration":"PT1M41.3968308S","correlationId":"c17a7c27-81c9-435c-ba0b-9c6492fb3986","providers":[{"namespace":"Microsoft.Storage","resourceTypes":[{"resourceType":"storageAccounts","locations":["westus"]}]},{"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_gallery_image_version_vhd000001/providers/Microsoft.Network/virtualNetworks/vm1VNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"vm1VNET"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_gallery_image_version_vhd000001/providers/Microsoft.Network/networkSecurityGroups/vm1NSG","resourceType":"Microsoft.Network/networkSecurityGroups","resourceName":"vm1NSG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_gallery_image_version_vhd000001/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP","resourceType":"Microsoft.Network/publicIPAddresses","resourceName":"vm1PublicIP"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_gallery_image_version_vhd000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm1VMNic"},{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_gallery_image_version_vhd000001/providers/Microsoft.Storage/storageAccounts/vhdstorage1a626868697e4c","resourceType":"Microsoft.Storage/storageAccounts","resourceName":"vhdstorage1a626868697e4c"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_gallery_image_version_vhd000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm1VMNic"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_gallery_image_version_vhd000001/providers/Microsoft.Compute/virtualMachines/vm1","resourceType":"Microsoft.Compute/virtualMachines","resourceName":"vm1"}],"outputs":{},"outputResources":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_gallery_image_version_vhd000001/providers/Microsoft.Compute/virtualMachines/vm1"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_gallery_image_version_vhd000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_gallery_image_version_vhd000001/providers/Microsoft.Network/networkSecurityGroups/vm1NSG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_gallery_image_version_vhd000001/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_gallery_image_version_vhd000001/providers/Microsoft.Network/virtualNetworks/vm1VNET"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_gallery_image_version_vhd000001/providers/Microsoft.Storage/storageAccounts/vhdstorage1a626868697e4c"}]}}' - headers: - cache-control: - - no-cache - content-length: - - '4454' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 09 Apr 2021 03:34:51 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 --use-unmanaged-disk --nsg-rule --generate-ssh-key - User-Agent: - - AZURECLI/2.21.0 azsdk-python-azure-mgmt-compute/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_gallery_image_version_vhd000001/providers/Microsoft.Compute/virtualMachines/vm1?$expand=instanceView&api-version=2020-12-01 - response: - body: - string: "{\r\n \"name\": \"vm1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_gallery_image_version_vhd000001/providers/Microsoft.Compute/virtualMachines/vm1\",\r\n - \ \"type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\": \"westus\",\r\n - \ \"tags\": {},\r\n \"properties\": {\r\n \"vmId\": \"95c07b69-8300-4fc0-b675-d73a492a0fe4\",\r\n - \ \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_DS1_v2\"\r\n },\r\n - \ \"storageProfile\": {\r\n \"imageReference\": {\r\n \"publisher\": - \"OpenLogic\",\r\n \"offer\": \"CentOS\",\r\n \"sku\": \"7.5\",\r\n - \ \"version\": \"latest\",\r\n \"exactVersion\": \"7.5.201808150\"\r\n - \ },\r\n \"osDisk\": {\r\n \"osType\": \"Linux\",\r\n \"name\": - \"osdisk_1a62686869\",\r\n \"createOption\": \"FromImage\",\r\n \"vhd\": - {\r\n \"uri\": \"https://vhdstorage1a626868697e4c.blob.core.windows.net/vhds/osdisk_1a62686869.vhd\"\r\n - \ },\r\n \"caching\": \"ReadWrite\",\r\n \"diskSizeGB\": - 30\r\n },\r\n \"dataDisks\": []\r\n },\r\n \"osProfile\": - {\r\n \"computerName\": \"vm1\",\r\n \"adminUsername\": \"fey\",\r\n - \ \"linuxConfiguration\": {\r\n \"disablePasswordAuthentication\": - true,\r\n \"ssh\": {\r\n \"publicKeys\": [\r\n {\r\n - \ \"path\": \"/home/fey/.ssh/authorized_keys\",\r\n \"keyData\": - \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDmzXeK++L20uMK/Ug5wpjnWWyMlHoecEOxyHueHc1gPDj8qgLChiHt1OWJ1sDjiqBJ+hEEwZLjN8lCmUvWzzrl20d7M/BVp1ejulE/zr999kWuY3m5+FpAkbbxeO9LWoafwOir9dPzIOjDGdPWKbgHr3SerOHAuvVdXJDhWHtW5lB/MEnrxi48Pz/8k1lD1YccUAI6zDgKVJPBEk9fWMW8H0hKYsRXmlxdtg2npBQK7kbmcB2NJPEhTVgxVPqSaBVAt2lOCC/QQvAXcoD0lJGujp1IVYqSUarS5RnrYEDZ9Q6EKduWrP0GFkFkF8YzpFe+BRFaV8bLJrvZN43vgzRj - fey@DESKTOP-ARGPJS4\\n\"\r\n }\r\n ]\r\n },\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_gallery_image_version_vhd000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic\"}]},\r\n - \ \"provisioningState\": \"Succeeded\",\r\n \"instanceView\": {\r\n \"computerName\": - \"vm1\",\r\n \"osName\": \"centos\",\r\n \"osVersion\": \"7.5.1804\",\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-09T03:34:48+00:00\"\r\n }\r\n ],\r\n \"extensionHandlers\": - []\r\n },\r\n \"disks\": [\r\n {\r\n \"name\": \"osdisk_1a62686869\",\r\n - \ \"statuses\": [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n - \ \"level\": \"Info\",\r\n \"displayStatus\": \"Provisioning - succeeded\",\r\n \"time\": \"2021-04-09T03:33:23.4167434+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-09T03:34:25.9977213+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: - - '3580' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 09 Apr 2021 03:34: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-ratelimit-remaining-resource: - - Microsoft.Compute/LowCostGet3Min;3968,Microsoft.Compute/LowCostGet30Min;31606 - 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 --use-unmanaged-disk --nsg-rule --generate-ssh-key - User-Agent: - - AZURECLI/2.21.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_gallery_image_version_vhd000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic?api-version=2018-01-01 - response: - body: - string: "{\r\n \"name\": \"vm1VMNic\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_gallery_image_version_vhd000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic\",\r\n - \ \"etag\": \"W/\\\"11477d04-5dab-4a8e-a37b-b23f25da92d2\\\"\",\r\n \"location\": - \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": - \"Succeeded\",\r\n \"resourceGuid\": \"5479f59b-839c-4ff7-be9e-4db8434ce67d\",\r\n - \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"ipconfigvm1\",\r\n - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_gallery_image_version_vhd000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic/ipConfigurations/ipconfigvm1\",\r\n - \ \"etag\": \"W/\\\"11477d04-5dab-4a8e-a37b-b23f25da92d2\\\"\",\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_gallery_image_version_vhd000001/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP\"\r\n - \ },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_gallery_image_version_vhd000001/providers/Microsoft.Network/virtualNetworks/vm1VNET/subnets/vm1Subnet\"\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\": - \"ygsgdt4h3p5uxav342wlmfodag.dx.internal.cloudapp.net\"\r\n },\r\n \"macAddress\": - \"00-0D-3A-59-5F-DD\",\r\n \"enableAcceleratedNetworking\": false,\r\n - \ \"enableIPForwarding\": false,\r\n \"networkSecurityGroup\": {\r\n - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_gallery_image_version_vhd000001/providers/Microsoft.Network/networkSecurityGroups/vm1NSG\"\r\n - \ },\r\n \"primary\": true,\r\n \"virtualMachine\": {\r\n \"id\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_gallery_image_version_vhd000001/providers/Microsoft.Compute/virtualMachines/vm1\"\r\n - \ }\r\n },\r\n \"type\": \"Microsoft.Network/networkInterfaces\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '2568' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 09 Apr 2021 03:34:53 GMT - etag: - - W/"11477d04-5dab-4a8e-a37b-b23f25da92d2" - 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: - - e88b37ff-bc7f-4a37-b16e-b1890b383081 - 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 --use-unmanaged-disk --nsg-rule --generate-ssh-key - User-Agent: - - AZURECLI/2.21.0 azsdk-python-azure-mgmt-network/18.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_gallery_image_version_vhd000001/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP?api-version=2018-01-01 - response: - body: - string: "{\r\n \"name\": \"vm1PublicIP\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_gallery_image_version_vhd000001/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP\",\r\n - \ \"etag\": \"W/\\\"6b1eb47d-548c-4da5-b77e-39b7c07d820f\\\"\",\r\n \"location\": - \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": - \"Succeeded\",\r\n \"resourceGuid\": \"41d9c647-161e-4d9e-bda6-aa65db775602\",\r\n - \ \"ipAddress\": \"13.93.176.85\",\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_gallery_image_version_vhd000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic/ipConfigurations/ipconfigvm1\"\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: - - Fri, 09 Apr 2021 03:34:53 GMT - etag: - - W/"6b1eb47d-548c-4da5-b77e-39b7c07d820f" - 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: - - a518a27b-90de-4343-991a-976ab7eedcc2 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - vm show - Connection: - - keep-alive - ParameterSetName: - - -g -n - User-Agent: - - AZURECLI/2.21.0 azsdk-python-azure-mgmt-compute/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_gallery_image_version_vhd000001/providers/Microsoft.Compute/virtualMachines/vm1?api-version=2020-12-01 - response: - body: - string: "{\r\n \"name\": \"vm1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_gallery_image_version_vhd000001/providers/Microsoft.Compute/virtualMachines/vm1\",\r\n - \ \"type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\": \"westus\",\r\n - \ \"tags\": {},\r\n \"properties\": {\r\n \"vmId\": \"95c07b69-8300-4fc0-b675-d73a492a0fe4\",\r\n - \ \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_DS1_v2\"\r\n },\r\n - \ \"storageProfile\": {\r\n \"imageReference\": {\r\n \"publisher\": - \"OpenLogic\",\r\n \"offer\": \"CentOS\",\r\n \"sku\": \"7.5\",\r\n - \ \"version\": \"latest\",\r\n \"exactVersion\": \"7.5.201808150\"\r\n - \ },\r\n \"osDisk\": {\r\n \"osType\": \"Linux\",\r\n \"name\": - \"osdisk_1a62686869\",\r\n \"createOption\": \"FromImage\",\r\n \"vhd\": - {\r\n \"uri\": \"https://vhdstorage1a626868697e4c.blob.core.windows.net/vhds/osdisk_1a62686869.vhd\"\r\n - \ },\r\n \"caching\": \"ReadWrite\",\r\n \"diskSizeGB\": - 30\r\n },\r\n \"dataDisks\": []\r\n },\r\n \"osProfile\": - {\r\n \"computerName\": \"vm1\",\r\n \"adminUsername\": \"fey\",\r\n - \ \"linuxConfiguration\": {\r\n \"disablePasswordAuthentication\": - true,\r\n \"ssh\": {\r\n \"publicKeys\": [\r\n {\r\n - \ \"path\": \"/home/fey/.ssh/authorized_keys\",\r\n \"keyData\": - \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDmzXeK++L20uMK/Ug5wpjnWWyMlHoecEOxyHueHc1gPDj8qgLChiHt1OWJ1sDjiqBJ+hEEwZLjN8lCmUvWzzrl20d7M/BVp1ejulE/zr999kWuY3m5+FpAkbbxeO9LWoafwOir9dPzIOjDGdPWKbgHr3SerOHAuvVdXJDhWHtW5lB/MEnrxi48Pz/8k1lD1YccUAI6zDgKVJPBEk9fWMW8H0hKYsRXmlxdtg2npBQK7kbmcB2NJPEhTVgxVPqSaBVAt2lOCC/QQvAXcoD0lJGujp1IVYqSUarS5RnrYEDZ9Q6EKduWrP0GFkFkF8YzpFe+BRFaV8bLJrvZN43vgzRj - fey@DESKTOP-ARGPJS4\\n\"\r\n }\r\n ]\r\n },\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_gallery_image_version_vhd000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic\"}]},\r\n - \ \"provisioningState\": \"Succeeded\"\r\n }\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '2311' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 09 Apr 2021 03:34:54 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;3967,Microsoft.Compute/LowCostGet30Min;31605 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - sig create - Connection: - - keep-alive - ParameterSetName: - - -g --gallery-name - User-Agent: - - python/3.7.4 (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_gallery_image_version_vhd000001?api-version=2020-10-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_gallery_image_version_vhd000001","name":"cli_test_gallery_image_version_vhd000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2021-04-09T03:32:38Z"},"properties":{"provisioningState":"Succeeded"}}' - headers: - cache-control: - - no-cache - content-length: - - '428' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 09 Apr 2021 03:34:55 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: '{"location": "westus", "tags": {}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - sig create Connection: - keep-alive Content-Length: - - '34' - Content-Type: - - application/json - ParameterSetName: - - -g --gallery-name - User-Agent: - - AZURECLI/2.21.0 azsdk-python-azure-mgmt-compute/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + - '0' + User-Agent: + - Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.4; Windows 10) AZURECLI/2.22.0 + x-ms-blob-public-access: + - container + x-ms-date: + - Tue, 20 Apr 2021 09:24:58 GMT + x-ms-version: + - '2018-11-09' method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_gallery_image_version_vhd000001/providers/Microsoft.Compute/galleries/gallery_000002?api-version=2019-12-01 - response: - body: - string: "{\r\n \"name\": \"gallery_000002\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_gallery_image_version_vhd000001/providers/Microsoft.Compute/galleries/gallery_000002\",\r\n - \ \"type\": \"Microsoft.Compute/galleries\",\r\n \"location\": \"westus\",\r\n - \ \"tags\": {},\r\n \"properties\": {\r\n \"identifier\": {\r\n \"uniqueName\": - \"0b1f6471-1bf0-4dda-aec3-cb9272f09590-GALLERY_AQCU7QAV5BVB\"\r\n },\r\n - \ \"provisioningState\": \"Creating\"\r\n }\r\n}" - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/capsOperations/07a6d42c-7c99-4f8c-b194-7998dc1c9116?api-version=2019-12-01 - cache-control: - - no-cache - content-length: - - '506' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 09 Apr 2021 03:35:02 GMT - expires: - - '-1' - 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/CreateUpdateGallery3Min;48,Microsoft.Compute/CreateUpdateGallery30Min;297 - x-ms-ratelimit-remaining-subscription-writes: - - '1198' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - sig create - Connection: - - keep-alive - ParameterSetName: - - -g --gallery-name - User-Agent: - - AZURECLI/2.21.0 azsdk-python-azure-mgmt-compute/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/capsOperations/07a6d42c-7c99-4f8c-b194-7998dc1c9116?api-version=2019-12-01 - response: - body: - string: "{\r\n \"startTime\": \"2021-04-09T03:35:02.0714854+00:00\",\r\n \"endTime\": - \"2021-04-09T03:35:02.1808508+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"name\": \"07a6d42c-7c99-4f8c-b194-7998dc1c9116\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '184' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 09 Apr 2021 03:35:33 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/GetOperationStatus3Min;1194,Microsoft.Compute/GetOperationStatus30Min;4186 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - sig create - Connection: - - keep-alive - ParameterSetName: - - -g --gallery-name - User-Agent: - - AZURECLI/2.21.0 azsdk-python-azure-mgmt-compute/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_gallery_image_version_vhd000001/providers/Microsoft.Compute/galleries/gallery_000002?api-version=2019-12-01 - response: - body: - string: "{\r\n \"name\": \"gallery_000002\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_gallery_image_version_vhd000001/providers/Microsoft.Compute/galleries/gallery_000002\",\r\n - \ \"type\": \"Microsoft.Compute/galleries\",\r\n \"location\": \"westus\",\r\n - \ \"tags\": {},\r\n \"properties\": {\r\n \"identifier\": {\r\n \"uniqueName\": - \"0b1f6471-1bf0-4dda-aec3-cb9272f09590-GALLERY_AQCU7QAV5BVB\"\r\n },\r\n - \ \"provisioningState\": \"Succeeded\"\r\n }\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '507' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 09 Apr 2021 03:35:33 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/GetGallery3Min;335,Microsoft.Compute/GetGallery30Min;2474 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - sig image-definition create - Connection: - - keep-alive - ParameterSetName: - - -g --gallery-name --gallery-image-definition --os-type -p -f -s - User-Agent: - - python/3.7.4 (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_gallery_image_version_vhd000001?api-version=2020-10-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_gallery_image_version_vhd000001","name":"cli_test_gallery_image_version_vhd000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2021-04-09T03:32:38Z"},"properties":{"provisioningState":"Succeeded"}}' - headers: - cache-control: - - no-cache - content-length: - - '428' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 09 Apr 2021 03:35:33 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: '{"location": "westus", "tags": {}, "properties": {"osType": "Linux", "osState": - "Generalized", "hyperVGeneration": "V1", "identifier": {"publisher": "publisher1", - "offer": "offer1", "sku": "sku1"}, "disallowed": {}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - sig image-definition create - Connection: - - keep-alive - Content-Length: - - '216' - Content-Type: - - application/json - ParameterSetName: - - -g --gallery-name --gallery-image-definition --os-type -p -f -s - User-Agent: - - AZURECLI/2.21.0 azsdk-python-azure-mgmt-compute/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_gallery_image_version_vhd000001/providers/Microsoft.Compute/galleries/gallery_000002/images/image1?api-version=2020-09-30 - response: - body: - string: "{\r\n \"name\": \"image1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_gallery_image_version_vhd000001/providers/Microsoft.Compute/galleries/gallery_000002/images/image1\",\r\n - \ \"type\": \"Microsoft.Compute/galleries/images\",\r\n \"location\": \"westus\",\r\n - \ \"tags\": {},\r\n \"properties\": {\r\n \"hyperVGeneration\": \"V1\",\r\n - \ \"osType\": \"Linux\",\r\n \"osState\": \"Generalized\",\r\n \"identifier\": - {\r\n \"publisher\": \"publisher1\",\r\n \"offer\": \"offer1\",\r\n - \ \"sku\": \"sku1\"\r\n },\r\n \"provisioningState\": \"Creating\"\r\n - \ }\r\n}" - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/capsOperations/ffb5c40a-d8f6-4d21-86c5-bcd21622b979?api-version=2020-09-30 - cache-control: - - no-cache - content-length: - - '599' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 09 Apr 2021 03:35:40 GMT - expires: - - '-1' - 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/CreateUpdateGalleryImage3Min;148,Microsoft.Compute/CreateUpdateGalleryImage30Min;747 - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - sig image-definition create - Connection: - - keep-alive - ParameterSetName: - - -g --gallery-name --gallery-image-definition --os-type -p -f -s - User-Agent: - - AZURECLI/2.21.0 azsdk-python-azure-mgmt-compute/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/capsOperations/ffb5c40a-d8f6-4d21-86c5-bcd21622b979?api-version=2020-09-30 - response: - body: - string: "{\r\n \"startTime\": \"2021-04-09T03:35:40.7127051+00:00\",\r\n \"endTime\": - \"2021-04-09T03:35:40.8220775+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"name\": \"ffb5c40a-d8f6-4d21-86c5-bcd21622b979\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '184' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 09 Apr 2021 03:36:11 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/GetOperationStatus3Min;1191,Microsoft.Compute/GetOperationStatus30Min;4182 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - sig image-definition create - Connection: - - keep-alive - ParameterSetName: - - -g --gallery-name --gallery-image-definition --os-type -p -f -s - User-Agent: - - AZURECLI/2.21.0 azsdk-python-azure-mgmt-compute/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_gallery_image_version_vhd000001/providers/Microsoft.Compute/galleries/gallery_000002/images/image1?api-version=2020-09-30 - response: - body: - string: "{\r\n \"name\": \"image1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_gallery_image_version_vhd000001/providers/Microsoft.Compute/galleries/gallery_000002/images/image1\",\r\n - \ \"type\": \"Microsoft.Compute/galleries/images\",\r\n \"location\": \"westus\",\r\n - \ \"tags\": {},\r\n \"properties\": {\r\n \"hyperVGeneration\": \"V1\",\r\n - \ \"osType\": \"Linux\",\r\n \"osState\": \"Generalized\",\r\n \"identifier\": - {\r\n \"publisher\": \"publisher1\",\r\n \"offer\": \"offer1\",\r\n - \ \"sku\": \"sku1\"\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n - \ }\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '600' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 09 Apr 2021 03:36:12 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/GetGalleryImage3Min;586,Microsoft.Compute/GetGalleryImage30Min;2975 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - sig image-version create - Connection: - - keep-alive - ParameterSetName: - - -g --gallery-name --gallery-image-definition --gallery-image-version --os-vhd - --os-vhd-storage-account --replica-count - User-Agent: - - python/3.7.4 (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_gallery_image_version_vhd000001?api-version=2020-10-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_gallery_image_version_vhd000001","name":"cli_test_gallery_image_version_vhd000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2021-04-09T03:32:38Z"},"properties":{"provisioningState":"Succeeded"}}' - headers: - cache-control: - - no-cache - content-length: - - '428' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 09 Apr 2021 03:36:12 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: '{"location": "westus", "tags": {}, "properties": {"publishingProfile": - {"targetRegions": [{"name": "westus"}], "replicaCount": 1}, "storageProfile": - {"osDiskImage": {"source": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_gallery_image_version_vhd000001/providers/Microsoft.Storage/storageAccounts/vhdstorage1a626868697e4c", - "uri": "https://vhdstorage1a626868697e4c.blob.core.windows.net/vhds/osdisk_1a62686869.vhd"}}}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - CommandName: - - sig image-version create - Connection: - - keep-alive - Content-Length: - - '493' - Content-Type: - - application/json - ParameterSetName: - - -g --gallery-name --gallery-image-definition --gallery-image-version --os-vhd - --os-vhd-storage-account --replica-count - User-Agent: - - AZURECLI/2.21.0 azsdk-python-azure-mgmt-compute/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_gallery_image_version_vhd000001/providers/Microsoft.Compute/galleries/gallery_000002/images/image1/versions/1.0.0?api-version=2020-09-30 - response: - body: - string: "{\r\n \"name\": \"1.0.0\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_gallery_image_version_vhd000001/providers/Microsoft.Compute/galleries/gallery_000002/images/image1/versions/1.0.0\",\r\n - \ \"type\": \"Microsoft.Compute/galleries/images/versions\",\r\n \"location\": - \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"publishingProfile\": - {\r\n \"targetRegions\": [\r\n {\r\n \"name\": \"West - US\",\r\n \"regionalReplicaCount\": 1,\r\n \"storageAccountType\": - \"Standard_LRS\"\r\n }\r\n ],\r\n \"replicaCount\": 1,\r\n - \ \"excludeFromLatest\": false,\r\n \"publishedDate\": \"2021-04-09T03:36:17.0098546+00:00\",\r\n - \ \"storageAccountType\": \"Standard_LRS\"\r\n },\r\n \"storageProfile\": - {\r\n \"osDiskImage\": {\r\n \"hostCaching\": \"ReadWrite\",\r\n - \ \"source\": {\r\n \"uri\": \"https://vhdstorage1a626868697e4c.blob.core.windows.net/vhds/osdisk_1a62686869.vhd\",\r\n - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_gallery_image_version_vhd000001/providers/Microsoft.Storage/storageAccounts/vhdstorage1a626868697e4c\"\r\n - \ }\r\n }\r\n },\r\n \"provisioningState\": \"Creating\"\r\n - \ }\r\n}" - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/capsOperations/8cbab3e0-ff64-40a1-84c7-25827dd157f7?api-version=2020-09-30 - cache-control: - - no-cache - content-length: - - '1271' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 09 Apr 2021 03:36:17 GMT - expires: - - '-1' - 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/CreateUpdateGalleryImageVersion3Min;373,Microsoft.Compute/CreateUpdateGalleryImageVersion30Min;1197 - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - sig image-version create - Connection: - - keep-alive - ParameterSetName: - - -g --gallery-name --gallery-image-definition --gallery-image-version --os-vhd - --os-vhd-storage-account --replica-count - User-Agent: - - AZURECLI/2.21.0 azsdk-python-azure-mgmt-compute/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/capsOperations/8cbab3e0-ff64-40a1-84c7-25827dd157f7?api-version=2020-09-30 - response: - body: - string: "{\r\n \"startTime\": \"2021-04-09T03:36:16.9942143+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"8cbab3e0-ff64-40a1-84c7-25827dd157f7\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '134' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 09 Apr 2021 03:37:18 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/GetOperationStatus3Min;1190,Microsoft.Compute/GetOperationStatus30Min;4178 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - sig image-version create - Connection: - - keep-alive - ParameterSetName: - - -g --gallery-name --gallery-image-definition --gallery-image-version --os-vhd - --os-vhd-storage-account --replica-count - User-Agent: - - AZURECLI/2.21.0 azsdk-python-azure-mgmt-compute/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/capsOperations/8cbab3e0-ff64-40a1-84c7-25827dd157f7?api-version=2020-09-30 - response: - body: - string: "{\r\n \"startTime\": \"2021-04-09T03:36:16.9942143+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"8cbab3e0-ff64-40a1-84c7-25827dd157f7\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '134' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 09 Apr 2021 03:38:19 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/GetOperationStatus3Min;1188,Microsoft.Compute/GetOperationStatus30Min;4175 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - sig image-version create - Connection: - - keep-alive - ParameterSetName: - - -g --gallery-name --gallery-image-definition --gallery-image-version --os-vhd - --os-vhd-storage-account --replica-count - User-Agent: - - AZURECLI/2.21.0 azsdk-python-azure-mgmt-compute/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/capsOperations/8cbab3e0-ff64-40a1-84c7-25827dd157f7?api-version=2020-09-30 - response: - body: - string: "{\r\n \"startTime\": \"2021-04-09T03:36:16.9942143+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"8cbab3e0-ff64-40a1-84c7-25827dd157f7\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '134' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 09 Apr 2021 03:39:20 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/GetOperationStatus3Min;1189,Microsoft.Compute/GetOperationStatus30Min;4171 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - sig image-version create - Connection: - - keep-alive - ParameterSetName: - - -g --gallery-name --gallery-image-definition --gallery-image-version --os-vhd - --os-vhd-storage-account --replica-count - User-Agent: - - AZURECLI/2.21.0 azsdk-python-azure-mgmt-compute/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/capsOperations/8cbab3e0-ff64-40a1-84c7-25827dd157f7?api-version=2020-09-30 - response: - body: - string: "{\r\n \"startTime\": \"2021-04-09T03:36:16.9942143+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"8cbab3e0-ff64-40a1-84c7-25827dd157f7\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '134' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 09 Apr 2021 03:40:20 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/GetOperationStatus3Min;1189,Microsoft.Compute/GetOperationStatus30Min;4171 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - sig image-version create - Connection: - - keep-alive - ParameterSetName: - - -g --gallery-name --gallery-image-definition --gallery-image-version --os-vhd - --os-vhd-storage-account --replica-count - User-Agent: - - AZURECLI/2.21.0 azsdk-python-azure-mgmt-compute/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/capsOperations/8cbab3e0-ff64-40a1-84c7-25827dd157f7?api-version=2020-09-30 - response: - body: - string: "{\r\n \"startTime\": \"2021-04-09T03:36:16.9942143+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"8cbab3e0-ff64-40a1-84c7-25827dd157f7\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '134' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 09 Apr 2021 03:41:20 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/GetOperationStatus3Min;1187,Microsoft.Compute/GetOperationStatus30Min;4165 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - sig image-version create - Connection: - - keep-alive - ParameterSetName: - - -g --gallery-name --gallery-image-definition --gallery-image-version --os-vhd - --os-vhd-storage-account --replica-count - User-Agent: - - AZURECLI/2.21.0 azsdk-python-azure-mgmt-compute/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/capsOperations/8cbab3e0-ff64-40a1-84c7-25827dd157f7?api-version=2020-09-30 - response: - body: - string: "{\r\n \"startTime\": \"2021-04-09T03:36:16.9942143+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"8cbab3e0-ff64-40a1-84c7-25827dd157f7\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '134' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 09 Apr 2021 03:42:21 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/GetOperationStatus3Min;1185,Microsoft.Compute/GetOperationStatus30Min;4159 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - sig image-version create - Connection: - - keep-alive - ParameterSetName: - - -g --gallery-name --gallery-image-definition --gallery-image-version --os-vhd - --os-vhd-storage-account --replica-count - User-Agent: - - AZURECLI/2.21.0 azsdk-python-azure-mgmt-compute/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/capsOperations/8cbab3e0-ff64-40a1-84c7-25827dd157f7?api-version=2020-09-30 - response: - body: - string: "{\r\n \"startTime\": \"2021-04-09T03:36:16.9942143+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"8cbab3e0-ff64-40a1-84c7-25827dd157f7\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '134' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 09 Apr 2021 03:43:21 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/GetOperationStatus3Min;1183,Microsoft.Compute/GetOperationStatus30Min;4153 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - sig image-version create - Connection: - - keep-alive - ParameterSetName: - - -g --gallery-name --gallery-image-definition --gallery-image-version --os-vhd - --os-vhd-storage-account --replica-count - User-Agent: - - AZURECLI/2.21.0 azsdk-python-azure-mgmt-compute/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/capsOperations/8cbab3e0-ff64-40a1-84c7-25827dd157f7?api-version=2020-09-30 - response: - body: - string: "{\r\n \"startTime\": \"2021-04-09T03:36:16.9942143+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"8cbab3e0-ff64-40a1-84c7-25827dd157f7\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '134' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 09 Apr 2021 03:44:23 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/GetOperationStatus3Min;1183,Microsoft.Compute/GetOperationStatus30Min;4147 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - sig image-version create - Connection: - - keep-alive - ParameterSetName: - - -g --gallery-name --gallery-image-definition --gallery-image-version --os-vhd - --os-vhd-storage-account --replica-count - User-Agent: - - AZURECLI/2.21.0 azsdk-python-azure-mgmt-compute/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/capsOperations/8cbab3e0-ff64-40a1-84c7-25827dd157f7?api-version=2020-09-30 - response: - body: - string: "{\r\n \"startTime\": \"2021-04-09T03:36:16.9942143+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"8cbab3e0-ff64-40a1-84c7-25827dd157f7\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '134' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 09 Apr 2021 03:45:23 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/GetOperationStatus3Min;1183,Microsoft.Compute/GetOperationStatus30Min;4141 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - sig image-version create - Connection: - - keep-alive - ParameterSetName: - - -g --gallery-name --gallery-image-definition --gallery-image-version --os-vhd - --os-vhd-storage-account --replica-count - User-Agent: - - AZURECLI/2.21.0 azsdk-python-azure-mgmt-compute/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/capsOperations/8cbab3e0-ff64-40a1-84c7-25827dd157f7?api-version=2020-09-30 - response: - body: - string: "{\r\n \"startTime\": \"2021-04-09T03:36:16.9942143+00:00\",\r\n \"endTime\": - \"2021-04-09T03:45:32.8711971+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"name\": \"8cbab3e0-ff64-40a1-84c7-25827dd157f7\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '184' - content-type: - - application/json; charset=utf-8 - date: - - Fri, 09 Apr 2021 03:46:24 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/GetOperationStatus3Min;1185,Microsoft.Compute/GetOperationStatus30Min;4137 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - sig image-version create - Connection: - - keep-alive - ParameterSetName: - - -g --gallery-name --gallery-image-definition --gallery-image-version --os-vhd - --os-vhd-storage-account --replica-count - User-Agent: - - AZURECLI/2.21.0 azsdk-python-azure-mgmt-compute/19.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_gallery_image_version_vhd000001/providers/Microsoft.Compute/galleries/gallery_000002/images/image1/versions/1.0.0?api-version=2020-09-30 + uri: https://clitest000002.blob.core.windows.net/ct?restype=container response: body: - string: "{\r\n \"name\": \"1.0.0\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_gallery_image_version_vhd000001/providers/Microsoft.Compute/galleries/gallery_000002/images/image1/versions/1.0.0\",\r\n - \ \"type\": \"Microsoft.Compute/galleries/images/versions\",\r\n \"location\": - \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"publishingProfile\": - {\r\n \"targetRegions\": [\r\n {\r\n \"name\": \"West - US\",\r\n \"regionalReplicaCount\": 1,\r\n \"storageAccountType\": - \"Standard_LRS\"\r\n }\r\n ],\r\n \"replicaCount\": 1,\r\n - \ \"excludeFromLatest\": false,\r\n \"publishedDate\": \"2021-04-09T03:36:17.0098546+00:00\",\r\n - \ \"storageAccountType\": \"Standard_LRS\"\r\n },\r\n \"storageProfile\": - {\r\n \"osDiskImage\": {\r\n \"hostCaching\": \"ReadWrite\",\r\n - \ \"source\": {\r\n \"uri\": \"https://vhdstorage1a626868697e4c.blob.core.windows.net/vhds/osdisk_1a62686869.vhd\",\r\n - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_gallery_image_version_vhd000001/providers/Microsoft.Storage/storageAccounts/vhdstorage1a626868697e4c\"\r\n - \ }\r\n }\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n - \ }\r\n}" + string: "\uFEFFOutOfRangeInputThe + specified resource name length is not within the permissible limits.\nRequestId:e8a5d25e-e01e-0005-52c7-356172000000\nTime:2021-04-20T09:25:00.6439650Z" headers: - cache-control: - - no-cache content-length: - - '1272' + - '256' content-type: - - application/json; charset=utf-8 + - application/xml date: - - Fri, 09 Apr 2021 03:46:25 GMT - expires: - - '-1' - pragma: - - no-cache + - Tue, 20 Apr 2021 09:25:00 GMT 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/GetGalleryImageVersion3Min;1994,Microsoft.Compute/GetGalleryImageVersion30Min;9985 + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - OutOfRangeInput + x-ms-version: + - '2018-11-09' status: - code: 200 - message: OK + code: 400 + message: The specified resource name length is not within the permissible limits. 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 f8ad41bc0be..9ed2ebb53ee 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 @@ -3824,18 +3824,30 @@ def test_gallery_e2e(self, resource_group, resource_group_location): self.cmd('sig delete -g {rg} --gallery-name {gallery}') @ResourceGroupPreparer(name_prefix='cli_test_gallery_image_version_vhd') - def test_gallery_image_version_vhd(self, resource_group): + @StorageAccountPreparer() + def test_gallery_image_version_vhd(self, resource_group, storage_account, storage_account_info): self.kwargs.update({ 'gallery': self.create_random_name(prefix='gallery_', length=20), + 'account_key': storage_account_info[1] }) - self.cmd('vm create -g {rg} -n vm1 --image centos --use-unmanaged-disk --nsg-rule NONE --generate-ssh-key') - vhd_uri = self.cmd('vm show -g {rg} -n vm1').get_output_in_json()['storageProfile']['osDisk']['vhd']['uri'] - storage_account = vhd_uri.split('.')[0].split('/')[-1] - self.kwargs.update({ - 'vhd': vhd_uri, - 'stac': storage_account - }) + # self.cmd('vm create -g {rg} -n vm1 --image centos --use-unmanaged-disk --nsg-rule NONE --generate-ssh-key') + # vhd_uri = self.cmd('vm show -g {rg} -n vm1').get_output_in_json()['storageProfile']['osDisk']['vhd']['uri'] + # storage_account = vhd_uri.split('.')[0].split('/')[-1] + # self.kwargs.update({ + # 'vhd': vhd_uri, + # 'stac': storage_account + # }) + + local_file_1 = self.create_temp_file(2 * 1024 * 1024, full_random=True) + local_file_2 = self.create_temp_file(2 * 1024 * 1024, full_random=True) + + self.cmd('storage container create -n ct --account-name {sa} --account-key {account_key} --public-access container') + self.cmd('storage blob upload -c {} -f {} -n file1'.format(storage_account, local_file_1)) + self.cmd('storage blob upload -c {} -f {} -n file2'.format(storage_account, local_file_2)) + + + self.cmd('sig create -g {rg} --gallery-name {gallery}') self.cmd('sig image-definition create -g {rg} --gallery-name {gallery} --gallery-image-definition image1 --os-type linux -p publisher1 -f offer1 -s sku1') self.cmd('sig image-version create -g {rg} --gallery-name {gallery} --gallery-image-definition image1 --gallery-image-version 1.0.0 --os-vhd-uri {vhd} --os-vhd-storage-account {stac} --replica-count 1', checks=[ From d97d7443a295ad0789be3bc9b8fc619cfc48c73e Mon Sep 17 00:00:00 2001 From: Feiyue Yu Date: Wed, 21 Apr 2021 16:29:54 +0800 Subject: [PATCH 4/8] test --- .../test_gallery_image_version_vhd.yaml | 39 ------------------ .../vm/tests/latest/test_vm_commands.py | 40 ++++++++++++------- 2 files changed, 25 insertions(+), 54 deletions(-) delete mode 100644 src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_gallery_image_version_vhd.yaml diff --git a/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_gallery_image_version_vhd.yaml b/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_gallery_image_version_vhd.yaml deleted file mode 100644 index 97e455e93ee..00000000000 --- a/src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_gallery_image_version_vhd.yaml +++ /dev/null @@ -1,39 +0,0 @@ -interactions: -- request: - body: null - headers: - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.4; Windows 10) AZURECLI/2.22.0 - x-ms-blob-public-access: - - container - x-ms-date: - - Tue, 20 Apr 2021 09:24:58 GMT - x-ms-version: - - '2018-11-09' - method: PUT - uri: https://clitest000002.blob.core.windows.net/ct?restype=container - response: - body: - string: "\uFEFFOutOfRangeInputThe - specified resource name length is not within the permissible limits.\nRequestId:e8a5d25e-e01e-0005-52c7-356172000000\nTime:2021-04-20T09:25:00.6439650Z" - headers: - content-length: - - '256' - content-type: - - application/xml - date: - - Tue, 20 Apr 2021 09:25:00 GMT - server: - - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - x-ms-error-code: - - OutOfRangeInput - x-ms-version: - - '2018-11-09' - status: - code: 400 - message: The specified resource name length is not within the permissible limits. -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 9ed2ebb53ee..473388c65e6 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 @@ -3823,6 +3823,7 @@ def test_gallery_e2e(self, resource_group, resource_group_location): self.cmd('sig image-definition delete -g {rg} --gallery-name {gallery} --gallery-image-definition {image}') self.cmd('sig delete -g {rg} --gallery-name {gallery}') + @unittest.skip('Service failed') @ResourceGroupPreparer(name_prefix='cli_test_gallery_image_version_vhd') @StorageAccountPreparer() def test_gallery_image_version_vhd(self, resource_group, storage_account, storage_account_info): @@ -3831,27 +3832,36 @@ def test_gallery_image_version_vhd(self, resource_group, storage_account, storag 'account_key': storage_account_info[1] }) - # self.cmd('vm create -g {rg} -n vm1 --image centos --use-unmanaged-disk --nsg-rule NONE --generate-ssh-key') - # vhd_uri = self.cmd('vm show -g {rg} -n vm1').get_output_in_json()['storageProfile']['osDisk']['vhd']['uri'] - # storage_account = vhd_uri.split('.')[0].split('/')[-1] - # self.kwargs.update({ - # 'vhd': vhd_uri, - # 'stac': storage_account - # }) - - local_file_1 = self.create_temp_file(2 * 1024 * 1024, full_random=True) - local_file_2 = self.create_temp_file(2 * 1024 * 1024, full_random=True) + self.cmd('vm create -g {rg} -n vm1 --image centos --use-unmanaged-disk --nsg-rule NONE --generate-ssh-key') + vhd_uri = self.cmd('vm show -g {rg} -n vm1').get_output_in_json()['storageProfile']['osDisk']['vhd']['uri'] + storage_account_os = vhd_uri.split('.')[0].split('/')[-1] + self.kwargs.update({ + 'vhd': vhd_uri, + 'stac': storage_account_os + }) - self.cmd('storage container create -n ct --account-name {sa} --account-key {account_key} --public-access container') - self.cmd('storage blob upload -c {} -f {} -n file1'.format(storage_account, local_file_1)) - self.cmd('storage blob upload -c {} -f {} -n file2'.format(storage_account, local_file_2)) + local_file_1 = self.create_temp_file(1024) + local_file_2 = self.create_temp_file(1024) + self.cmd('storage container create -n container1 --account-name {sa} --account-key {account_key} --public-access container') + self.cmd('storage blob upload -c container1 --account-name {} -f "{}" -n file1.vhd --type page'.format(storage_account, local_file_1)) + self.cmd('storage blob upload -c container1 --account-name {} -f "{}" -n file2.vhd --type page'.format(storage_account, local_file_2)) + vhd1_uri = 'https://{}.blob.core.windows.net/container1/file1.vhd'.format(storage_account) + vhd2_uri = 'https://{}.blob.core.windows.net/container1/file2.vhd'.format(storage_account) + self.kwargs.update({ + 'vhd1': vhd1_uri, + 'vhd2': vhd2_uri + }) self.cmd('sig create -g {rg} --gallery-name {gallery}') self.cmd('sig image-definition create -g {rg} --gallery-name {gallery} --gallery-image-definition image1 --os-type linux -p publisher1 -f offer1 -s sku1') - self.cmd('sig image-version create -g {rg} --gallery-name {gallery} --gallery-image-definition image1 --gallery-image-version 1.0.0 --os-vhd-uri {vhd} --os-vhd-storage-account {stac} --replica-count 1', checks=[ - self.check('storageProfile.osDiskImage.source.uri', vhd_uri) + self.cmd('sig image-version create -g {rg} --gallery-name {gallery} --gallery-image-definition image1 --gallery-image-version 1.0.0 --os-vhd-uri {vhd} --os-vhd-storage-account {stac} --data-vhds-uris {vhd1} {vhd2} --data-vhds-luns 0 1 --data-vhds-storage-accounts {sa} {sa} --replica-count 1', checks=[ + self.check('storageProfile.osDiskImage.source.uri', vhd_uri), + self.check('storageProfile.dataDiskImages[0].source.uri', vhd1_uri), + self.check('storageProfile.dataDiskImages[1].source.uri', vhd2_uri), + self.check('storageProfile.dataDiskImages[0].lun', 0), + self.check('storageProfile.dataDiskImages[1].lun', 1), ]) @ResourceGroupPreparer(name_prefix='cli_test_gallery_specialized_', location='eastus2') From dd4aac4b69145f078de55a02d2bef806b0c540ef Mon Sep 17 00:00:00 2001 From: Feiyue Yu Date: Wed, 21 Apr 2021 16:45:23 +0800 Subject: [PATCH 5/8] style --- src/azure-cli/azure/cli/command_modules/vm/_params.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 2ad9f3471cf..fcc2f377205 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/_params.py +++ b/src/azure-cli/azure/cli/command_modules/vm/_params.py @@ -950,7 +950,7 @@ def load_arguments(self, _): c.argument('os_vhd_storage_account', help='Name or ID of storage account of source VHD URI of OS disk') c.argument('data_vhds_uris', nargs='+', help='Source VHD URIs (space-delimited) of data disks') c.argument('data_vhds_luns', nargs='+', help='Logical unit numbers (space-delimited) of source VHD URIs of data disks') - c.argument('data_vhds_storage_accounts', nargs='+', help='Names or IDs (space-delimited) of storage accounts of source VHD URIs of data disks') + c.argument('data_vhds_storage_accounts', options_list=['--data-vhds-storage-accounts', '--data-vhds-sa'], nargs='+', help='Names or IDs (space-delimited) of storage accounts of source VHD URIs of data disks') with self.argument_context('sig image-version show') as c: c.argument('expand', help="The expand expression to apply on the operation, e.g. 'ReplicationStatus'") From f1d2450f1015fa6146daf64bf64afcbcc5e3ef91 Mon Sep 17 00:00:00 2001 From: Feiyue Yu Date: Wed, 21 Apr 2021 17:39:30 +0800 Subject: [PATCH 6/8] fix a small bug --- src/azure-cli/azure/cli/command_modules/vm/custom.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 bfada11b505..1134a017157 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/custom.py +++ b/src/azure-cli/azure/cli/command_modules/vm/custom.py @@ -3487,10 +3487,10 @@ def create_image_version(cmd, resource_group_name, gallery_name, gallery_image_n data_vhds_storage_accounts[i] = resource_id( subscription=get_subscription_id(cmd.cli_ctx), resource_group=resource_group_name, namespace='Microsoft.Storage', type='storageAccounts', name=storage_account) - data_disk_images = [] - for uri, lun, account in zip(data_vhds_uris, data_vhds_luns, data_vhds_storage_accounts): - data_disk_images.append(GalleryDataDiskImage( - source=GalleryArtifactVersionSource(id=account, uri=uri), lun=lun)) + data_disk_images = [] + for uri, lun, account in zip(data_vhds_uris, data_vhds_luns, data_vhds_storage_accounts): + data_disk_images.append(GalleryDataDiskImage( + source=GalleryArtifactVersionSource(id=account, uri=uri), lun=lun)) storage_profile = GalleryImageVersionStorageProfile(source=source, os_disk_image=os_disk_image, data_disk_images=data_disk_images) From 7b1b2fe41a82cafd5f8eec8170d332dcdc158c57 Mon Sep 17 00:00:00 2001 From: Feiyue Yu Date: Thu, 22 Apr 2021 10:31:48 +0800 Subject: [PATCH 7/8] update --- .../storage/tests/latest/test_storage_blob_live_scenarios.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/azure-cli/azure/cli/command_modules/storage/tests/latest/test_storage_blob_live_scenarios.py b/src/azure-cli/azure/cli/command_modules/storage/tests/latest/test_storage_blob_live_scenarios.py index b1646a70823..bb839418b7b 100644 --- a/src/azure-cli/azure/cli/command_modules/storage/tests/latest/test_storage_blob_live_scenarios.py +++ b/src/azure-cli/azure/cli/command_modules/storage/tests/latest/test_storage_blob_live_scenarios.py @@ -48,7 +48,7 @@ def test_storage_blob_upload_2G_file(self, resource_group, storage_account): @serial_test() @ResourceGroupPreparer() @StorageAccountPreparer() - def test_storage_blob_upload_10G_file(self, resource_group, storage_account, storage_account_info): + def test_storage_blob_upload_10G_file(self, resource_group, storage_account): self.verify_blob_upload_and_download(resource_group, storage_account, 10 * 1024 * 1024, 'block', skip_download=True) From d4750f9aff5629b86723334123888a7fb97e3682 Mon Sep 17 00:00:00 2001 From: Feiyue Yu Date: Fri, 23 Apr 2021 13:16:40 +0800 Subject: [PATCH 8/8] test --- .../cli/command_modules/vm/tests/latest/test_vm_commands.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 473388c65e6..aaa128cf37d 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 @@ -3824,6 +3824,7 @@ def test_gallery_e2e(self, resource_group, resource_group_location): self.cmd('sig delete -g {rg} --gallery-name {gallery}') @unittest.skip('Service failed') + @AllowLargeResponse() @ResourceGroupPreparer(name_prefix='cli_test_gallery_image_version_vhd') @StorageAccountPreparer() def test_gallery_image_version_vhd(self, resource_group, storage_account, storage_account_info): @@ -3840,8 +3841,8 @@ def test_gallery_image_version_vhd(self, resource_group, storage_account, storag 'stac': storage_account_os }) - local_file_1 = self.create_temp_file(1024) - local_file_2 = self.create_temp_file(1024) + local_file_1 = self.create_temp_file(1024 * 1024) + local_file_2 = self.create_temp_file(1024 * 1024) self.cmd('storage container create -n container1 --account-name {sa} --account-key {account_key} --public-access container') self.cmd('storage blob upload -c container1 --account-name {} -f "{}" -n file1.vhd --type page'.format(storage_account, local_file_1))