From d3a0daddb69d0b5efb49a0f1731744bdf608861e Mon Sep 17 00:00:00 2001 From: Olayemi Oyebode Date: Tue, 17 Nov 2020 14:49:06 -0800 Subject: [PATCH 01/11] updated 'az sig image-version create/update' --- .../azure/cli/command_modules/vm/_help.py | 35 ++++++++++++++++--- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/src/azure-cli/azure/cli/command_modules/vm/_help.py b/src/azure-cli/azure/cli/command_modules/vm/_help.py index c828db69084..b0dcce25348 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/_help.py +++ b/src/azure-cli/azure/cli/command_modules/vm/_help.py @@ -611,9 +611,30 @@ short-summary: create a new image version long-summary: this operation might take a long time depending on the replicate region number. Use "--no-wait" is advised. examples: - - name: Add a new image version + - name: Add a new image version from a managed image text: | - az sig image-version create -g MyResourceGroup --gallery-name MyGallery --gallery-image-definition MyImage --gallery-image-version 1.0.0 --managed-image /subscriptions/00000000-0000-0000-0000-00000000xxxx/resourceGroups/imageGroups/providers/images/MyManagedImage + az sig image-version create -g MyResourceGroup --gallery-name MyGallery --gallery-image-definition MyImage --gallery-image-version 1.0.0 --managed-image /subscriptions/00000000-0000-0000-0000-00000000xxxx/resourceGroups/imageGroups/providers/Microsoft.Compute/images/MyManagedImage + - name: Add a new image version from a virtual machine + text: | + az sig image-version create -g MyResourceGroup --gallery-name MyGallery --gallery-image-definition MyImage --gallery-image-version 1.0.0 --os-snapshot /subscriptions/00000000-0000-0000-0000-00000000xxxx/resourceGroups/imageGroups/providers/Microsoft.Compute/virtualMachines/MyVM + - name: Add a new image version from another image version + text: | + az sig image-version create -g MyResourceGroup --gallery-name MyGallery --gallery-image-definition MyImage --gallery-image-version 1.0.0 --managed-image /subscriptions/00000000-0000-0000-0000-00000000xxxx/resourceGroups/imageGroups/providers/Microsoft.Compute/galleries/MyGallery/images/MyImageDefinition/versions/1.0.0 + - name: Add a new image version from a snapshot of an OS disk. + text: | + az sig image-version create -g MyResourceGroup --gallery-name MyGallery --gallery-image-definition MyImage --gallery-image-version 1.0.0 --os-snapshot /subscriptions/00000000-0000-0000-0000-00000000xxxx/resourceGroups/imageGroups/providers/Microsoft.Compute/snapshots/MyOsDiskSnapshot + - name: Add a new image version from a snapshot of an OS disk and add additional data disks + text: | + az sig image-version create -g MyResourceGroup --gallery-name MyGallery --gallery-image-definition MyImage --gallery-image-version 1.0.0 --os-snapshot /subscriptions/00000000-0000-0000-0000-00000000xxxx/resourceGroups/imageGroups/providers/Microsoft.Compute/snapshots/MyOsDiskSnapshot --data-snapshots /subscriptions/00000000-0000-0000-0000-00000000xxxx/resourceGroups/imageGroups/providers/Microsoft.Compute/snapshots/MyDiskSnapshot --data-snapshot-luns 0 + - name: Add a new image version from a managed disk + text: | + az sig image-version create -g MyResourceGroup --gallery-name MyGallery --gallery-image-definition MyImage --gallery-image-version 1.0.0 --os-snapshot /subscriptions/00000000-0000-0000-0000-00000000xxxx/resourceGroups/imageGroups/providers/Microsoft.Compute/disks/MyOSDisk + - name: Add a new image version from a managed disk and add additional data disks + text: | + az sig image-version create -g MyResourceGroup --gallery-name MyGallery --gallery-image-definition MyImage --gallery-image-version 1.0.0 --os-snapshot /subscriptions/00000000-0000-0000-0000-00000000xxxx/resourceGroups/imageGroups/providers/Microsoft.Compute/disks/MyOSDisk --data-snapshots /subscriptions/00000000-0000-0000-0000-00000000xxxx/resourceGroups/imageGroups/providers/Microsoft.Compute/disks/MyDataDisk --data-snapshot-luns 0 + - name: You can Add a new image version containing a mix of snapshots and managed disks + text: | + az sig image-version create -g MyResourceGroup --gallery-name MyGallery --gallery-image-definition MyImage --gallery-image-version 1.0.0 --os-snapshot /subscriptions/00000000-0000-0000-0000-00000000xxxx/resourceGroups/imageGroups/providers/Microsoft.Compute/disks/MyOSDisk --data-snapshots /subscriptions/00000000-0000-0000-0000-00000000xxxx/resourceGroups/imageGroups/providers/Microsoft.Compute/snapshots/MyDiskSnapshot1 /subscriptions/00000000-0000-0000-0000-00000000xxxx/resourceGroups/imageGroups/providers/Microsoft.Compute/disks/MyDataDisk2 --data-snapshot-luns 1 2 - name: Add a new image version replicated across multiple regions with different replication counts each. Eastus2 will have it's replica count set to the default replica count. text: | az sig image-version create -g MyResourceGroup --gallery-name MyGallery \\ @@ -631,9 +652,13 @@ --target-regions westus=2=standard_lrs eastus=3=standard_zrs \\ --gallery-name MyGallery --gallery-image-definition MyImage \\ --managed-image imageInTheSameResourceGroup - - name: Add a new image version with target regions and customer managed keys for encryption. + - name: Add a new image version using a VM with target regions and customer managed keys for encryption. You specify which disks in the image version to encrypt. Disks encrypted in one region must be encrypted in another region with a different disk encryption set. + text: > + az sig image-version create -g MyResourceGroup --gallery-image-version 1.0.0 --target-regions westus=2=standard eastus --target-region-encryption WestUSDiskEncryptionSet1,0,WestUSDiskEncryptionSet2 EastUSDiskEncryptionSet1,0,EastUSDiskEncryptionSet2 --gallery-name MyGallery --gallery-image-definition MyImage --managed-image /subscriptions/00000000-0000-0000-0000-00000000xxxx/resourceGroups/imageGroups/providers/Microsoft.Compute/virtualMachines/MyVM + + - name: Add a new image version using disks with target regions and customer managed keys for encryption. You specify which disks in the image version to encrypt. Disks encrypted in one region must be encrypted in another region with a different disk encryption set. text: > - az sig image-version create -g MyResourceGroup --gallery-image-version 1.0.0 --target-regions westus=2=standard --target-region-encryption DiskEncryptionSet1,0,DiskEncryptionSet2 --gallery-name MyGallery --gallery-image-definition MyImage --managed-image imageInTheSameResourceGroup + az sig image-version create -g MyResourceGroup --gallery-image-version 1.0.0 --target-regions westus=2=standard eastus --target-region-encryption WestUSDiskEncryptionSet1,0,WestUSDiskEncryptionSet2 EastUSDiskEncryptionSet1,0,EastUSDiskEncryptionSet2 --gallery-name MyGallery --gallery-image-definition MyImage --os-snapshot /subscriptions/00000000-0000-0000-0000-00000000xxxx/resourceGroups/imageGroups/providers/Microsoft.Compute/disks/MyOSDisk --data-snapshots /subscriptions/00000000-0000-0000-0000-00000000xxxx/resourceGroups/imageGroups/providers/Microsoft.Compute/disks/MyDataDisk --data-snapshot-luns 0 """ helps['sig image-version update'] = """ @@ -646,7 +671,7 @@ - name: Replicate to one more region text: | az sig image-version update -g MyResourceGroup --gallery-name MyGallery --gallery-image-definition MyImage --gallery-image-version 1.0.0 --add publishingProfile.targetRegions name=westcentralus - - name: Update --exclude-from-latest. If it is set to true, people deploying VMs with version omitted will not use this version. + - name: Change whether an image should be included in consideration for latest version in the image definition. Setting this value to true excludes the image from consideration and setting this value to false includes the image for consideration. text: | az sig image-version update -g MyResourceGroup --gallery-name MyGallery --gallery-image-definition MyImage --gallery-image-version 1.0.0 --set publishingProfile.excludeFromLatest=true """ From 7c2a255fe4351367a52f60dade18a7ac339bf001 Mon Sep 17 00:00:00 2001 From: Olayemi Oyebode Date: Tue, 17 Nov 2020 14:50:54 -0800 Subject: [PATCH 02/11] included custom image scenario for az vmss update --- src/azure-cli/azure/cli/command_modules/vm/_help.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/azure-cli/azure/cli/command_modules/vm/_help.py b/src/azure-cli/azure/cli/command_modules/vm/_help.py index b0dcce25348..682a15c775d 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/_help.py +++ b/src/azure-cli/azure/cli/command_modules/vm/_help.py @@ -2713,6 +2713,8 @@ text: az vmss update --name MyScaleSet --resource-group MyResourceGroup --set virtualMachineProfile.storageProfile.dataDisks[0].diskIOPSReadWrite=444 - name: Update a VM instance's bandwidth in MB per second of the managed disk. text: az vmss update --name MyScaleSet --resource-group MyResourceGroup --set virtualMachineProfile.storageProfile.dataDisks[0].diskMBpsReadWrite=66 + - name: Update a VM to use a custom image. + text: az vmss update --name MyScaleSet --resource-group MyResourceGroup --set virtualMachineProfile.imageReference.id=imageID """ helps['vmss update-instances'] = """ From f0eaea390de9cfc9bcf409b987bdd8610b651cae Mon Sep 17 00:00:00 2001 From: Olayemi Oyebode Date: Tue, 17 Nov 2020 14:51:41 -0800 Subject: [PATCH 03/11] correct custom image scenario for az vmss update --- src/azure-cli/azure/cli/command_modules/vm/_help.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/azure-cli/azure/cli/command_modules/vm/_help.py b/src/azure-cli/azure/cli/command_modules/vm/_help.py index 682a15c775d..a22fee34c3c 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/_help.py +++ b/src/azure-cli/azure/cli/command_modules/vm/_help.py @@ -2714,7 +2714,7 @@ - name: Update a VM instance's bandwidth in MB per second of the managed disk. text: az vmss update --name MyScaleSet --resource-group MyResourceGroup --set virtualMachineProfile.storageProfile.dataDisks[0].diskMBpsReadWrite=66 - name: Update a VM to use a custom image. - text: az vmss update --name MyScaleSet --resource-group MyResourceGroup --set virtualMachineProfile.imageReference.id=imageID + text: az vmss update --name MyScaleSet --resource-group MyResourceGroup --set virtualMachineProfile.storageProfile.imageReference.id=imageID """ helps['vmss update-instances'] = """ From de60862cfe60b172bc265a3c327c07b6771ab1a6 Mon Sep 17 00:00:00 2001 From: Olayemi Oyebode Date: Thu, 19 Nov 2020 09:16:22 -0800 Subject: [PATCH 04/11] remove trailing whitespace --- .vscode/launch.json | 6 +++--- src/azure-cli/azure/cli/command_modules/vm/_help.py | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 1187e215bf1..c2a47d74891 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -5,7 +5,7 @@ "name": "Azure CLI Debug (Integrated Console)", "type": "python", "request": "launch", - "pythonPath": "${command:python.interpreterPath}", + "python": "${command:python.interpreterPath}", "program": "${workspaceRoot}/src/azure-cli/azure/cli/__main__.py", "cwd": "${workspaceRoot}", "args": [ @@ -24,7 +24,7 @@ "type": "python", "request": "launch", "stopOnEntry": true, - "pythonPath": "${command:python.interpreterPath}", + "python": "${command:python.interpreterPath}", "program": "${workspaceRoot}/src/azure-cli/azure/cli/__main__.py", "cwd": "${workspaceRoot}", "args": [ @@ -40,7 +40,7 @@ "name": "Azdev Scripts", "type": "python", "request": "launch", - "pythonPath": "${command:python.interpreterPath}", + "python": "${command:python.interpreterPath}", "program": "${workspaceRoot}/tools/automation/__main__.py", "cwd": "${workspaceRoot}", "args": [ diff --git a/src/azure-cli/azure/cli/command_modules/vm/_help.py b/src/azure-cli/azure/cli/command_modules/vm/_help.py index a22fee34c3c..395423b9bfa 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/_help.py +++ b/src/azure-cli/azure/cli/command_modules/vm/_help.py @@ -626,9 +626,9 @@ - name: Add a new image version from a snapshot of an OS disk and add additional data disks text: | az sig image-version create -g MyResourceGroup --gallery-name MyGallery --gallery-image-definition MyImage --gallery-image-version 1.0.0 --os-snapshot /subscriptions/00000000-0000-0000-0000-00000000xxxx/resourceGroups/imageGroups/providers/Microsoft.Compute/snapshots/MyOsDiskSnapshot --data-snapshots /subscriptions/00000000-0000-0000-0000-00000000xxxx/resourceGroups/imageGroups/providers/Microsoft.Compute/snapshots/MyDiskSnapshot --data-snapshot-luns 0 - - name: Add a new image version from a managed disk + - name: Add a new image version from a managed disk text: | - az sig image-version create -g MyResourceGroup --gallery-name MyGallery --gallery-image-definition MyImage --gallery-image-version 1.0.0 --os-snapshot /subscriptions/00000000-0000-0000-0000-00000000xxxx/resourceGroups/imageGroups/providers/Microsoft.Compute/disks/MyOSDisk + az sig image-version create -g MyResourceGroup --gallery-name MyGallery --gallery-image-definition MyImage --gallery-image-version 1.0.0 --os-snapshot /subscriptions/00000000-0000-0000-0000-00000000xxxx/resourceGroups/imageGroups/providers/Microsoft.Compute/disks/MyOSDisk - name: Add a new image version from a managed disk and add additional data disks text: | az sig image-version create -g MyResourceGroup --gallery-name MyGallery --gallery-image-definition MyImage --gallery-image-version 1.0.0 --os-snapshot /subscriptions/00000000-0000-0000-0000-00000000xxxx/resourceGroups/imageGroups/providers/Microsoft.Compute/disks/MyOSDisk --data-snapshots /subscriptions/00000000-0000-0000-0000-00000000xxxx/resourceGroups/imageGroups/providers/Microsoft.Compute/disks/MyDataDisk --data-snapshot-luns 0 @@ -652,11 +652,11 @@ --target-regions westus=2=standard_lrs eastus=3=standard_zrs \\ --gallery-name MyGallery --gallery-image-definition MyImage \\ --managed-image imageInTheSameResourceGroup - - name: Add a new image version using a VM with target regions and customer managed keys for encryption. You specify which disks in the image version to encrypt. Disks encrypted in one region must be encrypted in another region with a different disk encryption set. + - name: Add a new image version using a VM with target regions and customer managed keys for encryption. You specify which disks in the image version to encrypt. Disks encrypted in one region must be encrypted in another region with a different disk encryption set. text: > az sig image-version create -g MyResourceGroup --gallery-image-version 1.0.0 --target-regions westus=2=standard eastus --target-region-encryption WestUSDiskEncryptionSet1,0,WestUSDiskEncryptionSet2 EastUSDiskEncryptionSet1,0,EastUSDiskEncryptionSet2 --gallery-name MyGallery --gallery-image-definition MyImage --managed-image /subscriptions/00000000-0000-0000-0000-00000000xxxx/resourceGroups/imageGroups/providers/Microsoft.Compute/virtualMachines/MyVM - - name: Add a new image version using disks with target regions and customer managed keys for encryption. You specify which disks in the image version to encrypt. Disks encrypted in one region must be encrypted in another region with a different disk encryption set. + - name: Add a new image version using disks with target regions and customer managed keys for encryption. You specify which disks in the image version to encrypt. Disks encrypted in one region must be encrypted in another region with a different disk encryption set. text: > az sig image-version create -g MyResourceGroup --gallery-image-version 1.0.0 --target-regions westus=2=standard eastus --target-region-encryption WestUSDiskEncryptionSet1,0,WestUSDiskEncryptionSet2 EastUSDiskEncryptionSet1,0,EastUSDiskEncryptionSet2 --gallery-name MyGallery --gallery-image-definition MyImage --os-snapshot /subscriptions/00000000-0000-0000-0000-00000000xxxx/resourceGroups/imageGroups/providers/Microsoft.Compute/disks/MyOSDisk --data-snapshots /subscriptions/00000000-0000-0000-0000-00000000xxxx/resourceGroups/imageGroups/providers/Microsoft.Compute/disks/MyDataDisk --data-snapshot-luns 0 """ From 4c94ebea15aea8f8213297416f961cb0b285b9c8 Mon Sep 17 00:00:00 2001 From: Olayemi Oyebode Date: Fri, 20 Nov 2020 06:57:20 -0800 Subject: [PATCH 05/11] Delete launch.json --- .vscode/launch.json | 57 --------------------------------------------- 1 file changed, 57 deletions(-) delete mode 100644 .vscode/launch.json diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index c2a47d74891..00000000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "version": "0.2.0", - "configurations": [ - { - "name": "Azure CLI Debug (Integrated Console)", - "type": "python", - "request": "launch", - "python": "${command:python.interpreterPath}", - "program": "${workspaceRoot}/src/azure-cli/azure/cli/__main__.py", - "cwd": "${workspaceRoot}", - "args": [ - "--help" - ], - "console": "integratedTerminal", - "debugOptions": [ - "WaitOnAbnormalExit", - "WaitOnNormalExit", - "RedirectOutput" - ], - "justMyCode": false - }, - { - "name": "Azure CLI Debug (External Console)", - "type": "python", - "request": "launch", - "stopOnEntry": true, - "python": "${command:python.interpreterPath}", - "program": "${workspaceRoot}/src/azure-cli/azure/cli/__main__.py", - "cwd": "${workspaceRoot}", - "args": [ - "--help" - ], - "console": "externalTerminal", - "debugOptions": [ - "WaitOnAbnormalExit", - "WaitOnNormalExit" - ] - }, - { - "name": "Azdev Scripts", - "type": "python", - "request": "launch", - "python": "${command:python.interpreterPath}", - "program": "${workspaceRoot}/tools/automation/__main__.py", - "cwd": "${workspaceRoot}", - "args": [ - "--help" - ], - "console": "integratedTerminal", - "debugOptions": [ - "WaitOnAbnormalExit", - "WaitOnNormalExit", - "RedirectOutput" - ] - } - ] -} From 08123e1e6f5253f3877cc458855cb27743a67daa Mon Sep 17 00:00:00 2001 From: Olayemi Oyebode Date: Wed, 2 Dec 2020 19:21:48 -0800 Subject: [PATCH 06/11] restore launch.json --- .vscode/launch.json | 57 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .vscode/launch.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000000..c2a47d74891 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,57 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Azure CLI Debug (Integrated Console)", + "type": "python", + "request": "launch", + "python": "${command:python.interpreterPath}", + "program": "${workspaceRoot}/src/azure-cli/azure/cli/__main__.py", + "cwd": "${workspaceRoot}", + "args": [ + "--help" + ], + "console": "integratedTerminal", + "debugOptions": [ + "WaitOnAbnormalExit", + "WaitOnNormalExit", + "RedirectOutput" + ], + "justMyCode": false + }, + { + "name": "Azure CLI Debug (External Console)", + "type": "python", + "request": "launch", + "stopOnEntry": true, + "python": "${command:python.interpreterPath}", + "program": "${workspaceRoot}/src/azure-cli/azure/cli/__main__.py", + "cwd": "${workspaceRoot}", + "args": [ + "--help" + ], + "console": "externalTerminal", + "debugOptions": [ + "WaitOnAbnormalExit", + "WaitOnNormalExit" + ] + }, + { + "name": "Azdev Scripts", + "type": "python", + "request": "launch", + "python": "${command:python.interpreterPath}", + "program": "${workspaceRoot}/tools/automation/__main__.py", + "cwd": "${workspaceRoot}", + "args": [ + "--help" + ], + "console": "integratedTerminal", + "debugOptions": [ + "WaitOnAbnormalExit", + "WaitOnNormalExit", + "RedirectOutput" + ] + } + ] +} From ae25047d07785d04e7af3ef9b1aeee4692945cc3 Mon Sep 17 00:00:00 2001 From: Olayemi Oyebode Date: Wed, 2 Dec 2020 19:31:26 -0800 Subject: [PATCH 07/11] fixed changes to launch.json --- .vscode/launch.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index c2a47d74891..b2fb1192f86 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -5,7 +5,7 @@ "name": "Azure CLI Debug (Integrated Console)", "type": "python", "request": "launch", - "python": "${command:python.interpreterPath}", + "pythonPath": "${command:python.interpreterPath}", "program": "${workspaceRoot}/src/azure-cli/azure/cli/__main__.py", "cwd": "${workspaceRoot}", "args": [ @@ -24,7 +24,7 @@ "type": "python", "request": "launch", "stopOnEntry": true, - "python": "${command:python.interpreterPath}", + "pythonPath": "${command:python.interpreterPath}", "program": "${workspaceRoot}/src/azure-cli/azure/cli/__main__.py", "cwd": "${workspaceRoot}", "args": [ @@ -40,7 +40,7 @@ "name": "Azdev Scripts", "type": "python", "request": "launch", - "python": "${command:python.interpreterPath}", + "pythonPath": "${command:python.interpreterPath}", "program": "${workspaceRoot}/tools/automation/__main__.py", "cwd": "${workspaceRoot}", "args": [ @@ -54,4 +54,4 @@ ] } ] -} +} \ No newline at end of file From 0327d068ed88ad56c9cb43b91e3fe1a04e0c8df2 Mon Sep 17 00:00:00 2001 From: Olayemi Oyebode Date: Wed, 2 Dec 2020 19:35:48 -0800 Subject: [PATCH 08/11] copied original launch.json --- .vscode/launch.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index b2fb1192f86..f53b2dcce5d 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -54,4 +54,4 @@ ] } ] -} \ No newline at end of file +} \ No newline at end of file From 04cfe27dcd79886cea702b692799b3250125b549 Mon Sep 17 00:00:00 2001 From: Olayemi Oyebode Date: Wed, 2 Dec 2020 19:40:40 -0800 Subject: [PATCH 09/11] checked out from main remote --- .vscode/launch.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index f53b2dcce5d..1187e215bf1 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -54,4 +54,4 @@ ] } ] -} \ No newline at end of file +} From 3065ffef9a2ace88b6c3e2a0a05a7e40aa855e98 Mon Sep 17 00:00:00 2001 From: Olayemi Oyebode Date: Thu, 4 Feb 2021 16:25:50 -0800 Subject: [PATCH 10/11] correct incorrect parameter --- src/azure-cli/azure/cli/command_modules/vm/_help.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/azure-cli/azure/cli/command_modules/vm/_help.py b/src/azure-cli/azure/cli/command_modules/vm/_help.py index f23f2c2a0de..826292eef86 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/_help.py +++ b/src/azure-cli/azure/cli/command_modules/vm/_help.py @@ -635,7 +635,7 @@ az sig image-version create -g MyResourceGroup --gallery-name MyGallery --gallery-image-definition MyImage --gallery-image-version 1.0.0 --managed-image /subscriptions/00000000-0000-0000-0000-00000000xxxx/resourceGroups/imageGroups/providers/Microsoft.Compute/images/MyManagedImage - name: Add a new image version from a virtual machine text: | - az sig image-version create -g MyResourceGroup --gallery-name MyGallery --gallery-image-definition MyImage --gallery-image-version 1.0.0 --os-snapshot /subscriptions/00000000-0000-0000-0000-00000000xxxx/resourceGroups/imageGroups/providers/Microsoft.Compute/virtualMachines/MyVM + az sig image-version create -g MyResourceGroup --gallery-name MyGallery --gallery-image-definition MyImage --gallery-image-version 1.0.0 --managed-image /subscriptions/00000000-0000-0000-0000-00000000xxxx/resourceGroups/imageGroups/providers/Microsoft.Compute/virtualMachines/MyVM - name: Add a new image version from another image version text: | az sig image-version create -g MyResourceGroup --gallery-name MyGallery --gallery-image-definition MyImage --gallery-image-version 1.0.0 --managed-image /subscriptions/00000000-0000-0000-0000-00000000xxxx/resourceGroups/imageGroups/providers/Microsoft.Compute/galleries/MyGallery/images/MyImageDefinition/versions/1.0.0 From 63f4f0d3b70c3149e65317711a68cf0f9f3e7ac6 Mon Sep 17 00:00:00 2001 From: Olayemi Oyebode Date: Mon, 22 Feb 2021 05:31:52 -0800 Subject: [PATCH 11/11] add new sig update example --- src/azure-cli/azure/cli/command_modules/vm/_help.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/azure-cli/azure/cli/command_modules/vm/_help.py b/src/azure-cli/azure/cli/command_modules/vm/_help.py index 49335e1ce78..67a681a00a7 100644 --- a/src/azure-cli/azure/cli/command_modules/vm/_help.py +++ b/src/azure-cli/azure/cli/command_modules/vm/_help.py @@ -651,7 +651,7 @@ - name: Add a new image version from a managed disk and add additional data disks text: | az sig image-version create -g MyResourceGroup --gallery-name MyGallery --gallery-image-definition MyImage --gallery-image-version 1.0.0 --os-snapshot /subscriptions/00000000-0000-0000-0000-00000000xxxx/resourceGroups/imageGroups/providers/Microsoft.Compute/disks/MyOSDisk --data-snapshots /subscriptions/00000000-0000-0000-0000-00000000xxxx/resourceGroups/imageGroups/providers/Microsoft.Compute/disks/MyDataDisk --data-snapshot-luns 0 - - name: You can Add a new image version containing a mix of snapshots and managed disks + - name: Add a new image version containing a mix of snapshots and managed disks text: | az sig image-version create -g MyResourceGroup --gallery-name MyGallery --gallery-image-definition MyImage --gallery-image-version 1.0.0 --os-snapshot /subscriptions/00000000-0000-0000-0000-00000000xxxx/resourceGroups/imageGroups/providers/Microsoft.Compute/disks/MyOSDisk --data-snapshots /subscriptions/00000000-0000-0000-0000-00000000xxxx/resourceGroups/imageGroups/providers/Microsoft.Compute/snapshots/MyDiskSnapshot1 /subscriptions/00000000-0000-0000-0000-00000000xxxx/resourceGroups/imageGroups/providers/Microsoft.Compute/disks/MyDataDisk2 --data-snapshot-luns 1 2 - name: Add a new image version replicated across multiple regions with different replication counts each. Eastus2 will have it's replica count set to the default replica count. @@ -690,6 +690,12 @@ - name: Replicate to one more region text: | az sig image-version update -g MyResourceGroup --gallery-name MyGallery --gallery-image-definition MyImage --gallery-image-version 1.0.0 --add publishingProfile.targetRegions name=westcentralus + - name: Add a region with a different regional replica count + text: | + az sig image-version update -g MyResourceGroup --gallery-name MyGallery --gallery-image-definition MyImage --gallery-image-version 1.0.0 --add publishingProfile.targetRegions name=westcentralus regionalReplicaCount=3 + - name: Remove a region + text: | + az sig image-version update -g MyResourceGroup --gallery-name MyGallery --gallery-image-definition MyImage --gallery-image-version 1.0.0 --remove publishingProfile.targetRegions name=westcentralus - name: Change whether an image should be included in consideration for latest version in the image definition. Setting this value to true excludes the image from consideration and setting this value to false includes the image for consideration. text: | az sig image-version update -g MyResourceGroup --gallery-name MyGallery --gallery-image-definition MyImage --gallery-image-version 1.0.0 --set publishingProfile.excludeFromLatest=true