Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

az snapshot create sets --copy-start true by default #20182

Closed
cavemandaveman opened this issue Nov 3, 2021 · 8 comments · Fixed by #20190
Closed

az snapshot create sets --copy-start true by default #20182

cavemandaveman opened this issue Nov 3, 2021 · 8 comments · Fixed by #20190
Assignees
Labels
Compute az vm/vmss/image/disk/snapshot
Milestone

Comments

@cavemandaveman
Copy link

Azure CLI 2.30.0 introduces a breaking change where --copy-start needs to be set to false for subscriptions which do not support CopyStart, otherwise you get this error:

ERROR: (OperationNotAllowed) CopyStart creation is not supported for this subscription.
Code: OperationNotAllowed
Message: CopyStart creation is not supported for this subscription.

Please update the documentation to include a message that --copy-start is set to true by default, even if not specified.


Document Details

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

@ghost ghost added needs-triage This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that customer-reported Issues that are reported by GitHub users external to the Azure organization. labels Nov 3, 2021
@yonzhan yonzhan added the Compute az vm/vmss/image/disk/snapshot label Nov 3, 2021
@ghost ghost removed the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Nov 3, 2021
@yonzhan yonzhan removed question The issue doesn't require a change to the product in order to be resolved. Most issues start as that customer-reported Issues that are reported by GitHub users external to the Azure organization. labels Nov 3, 2021
@yonzhan yonzhan added this to the Backlog milestone Nov 3, 2021
@yonzhan
Copy link
Collaborator

yonzhan commented Nov 3, 2021

Compute

@evelyn-ys
Copy link
Member

Hi @cavemandaveman, this could happen because the source resource location you want to use is different from the location you want to create the snapshot in. CLI will auto-detect whether to use Copy or CopyStart according to location. We don't default --copy-start true.

@cavemandaveman
Copy link
Author

Hmm. I am not specifying the location. My resource group and source disk are in the same location.

The command I have been using is:
az snapshot create --resource-group {{ resource_group }} --name {{ snap_name }} --source {{ source_disk }}

This has worked flawlessly, but now that I have upgraded to CLI 2.30.0, it fails with the error I posted earlier.

@evelyn-ys
Copy link
Member

@cavemandaveman Thanks for reporting! This is a bug for using same region resource group without specifying --location.
You can see my fix PR comment for details: #20190 (comment)

@cavemandaveman
Copy link
Author

Great! Glad you were able to find the root cause.

Do you think we well see this fix included in the next point release of CLI?

zhoxing-ms pushed a commit that referenced this issue Nov 8, 2021
…r `--copy-start` (#20190)

* `az snapshot create`: Fix auto-detection bug for `--copy-start`

* add test
@kostukp96
Copy link

I dont understand what i need change in my powershell script, if i use az snapshot create --resource-group {{ resource_group }} --name {{ snap_name }} --source {{ source_disk }} ??

@evelyn-ys
Copy link
Member

Do you think we well see this fix included in the next point release of CLI?

Yes, definitely!

@evelyn-ys
Copy link
Member

I dont understand what i need change in my powershell script, if i use az snapshot create --resource-group {{ resource_group }} --name {{ snap_name }} --source {{ source_disk }} ??

If everything is going well, then noting need to be changed. If you fail with (OperationNotAllowed) CopyStart creation is not supported for this subscription, please use az snapshot create --resource-group {{ resource_group }} --name {{ snap_name }} --source {{ source_disk }} --copy-start false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Compute az vm/vmss/image/disk/snapshot
Projects
None yet
5 participants