Open aamorale opened 4 years ago
hi @qwordy could you pls have a look?
Known issue. And it doesn't support image with data disks. You may want to try shared image gallery.
I hit an weird issue. I ran 2 cmds.
_az image copy --source-resource-group XXX --source-object-name YYY-image --source-type image --target-location eastus --target-resource-group "XXX" --target-name YYY-eastus
az image copy --source-resource-group XXX --source-object-name YYY-image --source-type image --target-location eastus2 --target-resource-group "XXX" --target-name YYY-eastus2_
2nd passed, while 1st failed with:
Output: Changing property 'sourceUri' is not allowed for existing disk 'YYY-image_os_disk_snapshot-eastus'.
What could be the reason?
@kgflying Could you please send me the debug log via email? Please add parameter --debug
after the executed commands, and then send the printed email to me. My email address is Zhou.Xing@microsoft.com
@zhoxing-ms , I've sent you the log. Thanks for helping!
@kgflying This issue seems to be a problem in creating snapshot in target region from the copied blob. Could you determine the snapshot with name "ANMImage-image_os_disk_snapshot-eastus2" already exist?
If so, this is because a new target storage account will be created for copying the snapshot to the target region every time when the target image is created, which will cause the target blob path to be different from the previous one, resulting in the change of sourceUri. However, at present, the service does not support modifying the sourceUri of an existing disk, so this problem occurs.
@zhoxing-ms , just double checked. "ANMImage-image_os_disk_snapshot-eastus2" does not exist. I only have " ANMImage-image_os_disk_snapshot"
Because this is an error returned by the REST, so we need the service team to see why this error is returned
@grizzlytheodore Could you please help look at the cause of error Output: Changing property 'sourceUri' is not allowed for existing disk 'YYY-image_os_disk_snapshot-eastus'.
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.