Azure / Azure/azure-cli-extensions

az image copy doesn't allow copy images across regions with snapshots attached

Open
#1,920 9 comments 0 reactions 1 assignee Assigned to @zhoxing-ms View on GitHub
customer-reported extension/image-copy feature-request Service Attention
Dominant language
Python
Stars
454
Forks
1.7k
Avg merge
2d 19h
Merged PRs (30d)
64

Description

Please include a note that mention about a possible failure if the VM Image has Snapshots attached since it will not possible changing the property "sourceuri" for the snapshot of a managed disk. Please refer the following example:

command failed: ['/usr/local/xxxx/azure-cli/2.2.0_1/libexec/bin/python', '-m', 'azure.cli', 'snapshot', 'create', '--resource-group', 'image-copy-rg', '--name', 'image-20200422_os_disk_snapshot-eastus', '--location', 'eastus', '--source', 'https://eastusx3245an0rwlifpkzay.blob.core.windows.net/snapshots/image-20200422_os_disk_snapshot.vhd', '--source-storage-account-id', '/subscriptions/SubscriptionID/resourceGroups/image-copy-rg/providers/Microsoft.Storage/storageAccounts/storageacountname', '--output', 'json', '--tags', 'created_by=image-copy-extension']
output: ERROR: Changing property 'sourceUri' is not allowed for existing disk 'aura-aes-image-20200422_os_disk_snapshot-eastus'.

---
#### Document Details

⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*

* ID: 1806a2fb-e007-03d5-ac2d-277da130d29b
* Version Independent ID: f8583594-0ed8-ff4d-33a8-2f7c9f41c288
* Content: [az image](https://docs.microsoft.com/en-us/cli/azure/ext/image-copy-extension/image?view=azure-cli-latest)
* Content Source: [latest/docs-ref-autogen/ext/image-copy-extension/image.yml](https://github.com/MicrosoftDocs/azure-docs-cli/blob/live/latest/docs-ref-autogen/ext/image-copy-extension/image.yml)
* Service: **virtual-machines**
* GitHub Login: @rloutlaw
* Microsoft Alias: **routlaw**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.