Closed nemrism closed 4 years ago
@nemrism please provide the debug output by running the command again with the --debug flag
Here we go, with a fresh new image, @tamirkamara https://1drv.ms/u/s!Attz0_FK8eIXhss1LGmY8xK-zAOhZw?e=Q8dFSf
Thank you. The error indicates that the OS disk of the VM used to create the image is missing. Are you aware that this is a requirement for the extension to be able to copy the image? If you are aware, please confirm that you see the disk in your subscription.
Indeed, I've checked the resource URI / ID and can access it without any problem in my subscription
And here you'll find its properties @tamirkamara
/subscriptions/6f335c6c-6850-40da-a64c-37021daaa4c6/resourceGroups/AzureDevOps-rg/providers/Microsoft.Compute/disks/devopsVS2017_OsDisk_1_bf58f98dc70144cab32b31b4630d8a61
Can you try and run the failing step "by hand"?
az snapshot create --name devopsVS2017-image-20191019202000_os_disk_snapshot --resource-group AzureDevOps-rg --source /subscriptions/6f335c6c-6850-40da-a64c-37021daaa4c6/resourceGroups/AZUREDEVOPS-RG/providers/Microsoft.Compute/disks/devopsVS2017_OsDisk_1_bf58f98dc70144cab32b31b4630d8a61 --output json --tags created_by=image-copy-extension
if it fails please also add --debug and send me the output
Of course, and if it succeeds, how do I continue the move please? I'll post the result in a few
@tamirkamara, got the exact same problem, which is quite coherent ^^ https://1drv.ms/u/s!Attz0_FK8eIXhss27eacjNCycJ-tcA?e=99wmSB
Yes... so it looks like not something specific to the extension since the native command also fails. I would do the following:
Ok, thanks for your help @tamirkamara
I already have an open ticket for the overall operation but have no solution yet...
Actually just tested, and it works using Azure Portal
I would add the information above to help the support engineer focus on the actual issue...
@tamirkamara Could you tell me what are the other steps the extension is wrapping under the image copy command?
I'll try to make them all under the Portal to see if I can achieve the move like this.
Hi, Have a look in the code here. This is the step which fails for you to create the snapshot. If you follow along you'll find a bunch of commands getting issued from that custom.py file as well as create_target.py. I hope that helps.
@tamirkamara I've been told by the support that azure cli does not support moving image between those regions for the moment. They are guiding me to make it through Powershell which is the only way to do it right now. It should be interesting to document that limitation in the extension wiki/help if it is not already the case!
Hi, While support is right, this isn't exactly what I wanted their help with. Granted that the cli doesn't have builtin support for copying images, which is exactly why the extension exists. The 2 regions aren't related. The extension worked great for the last 2 years between those two regions (and many others). You have a somewhat special case for a reason we don't know yet, which causes a problem to create a disk snapshot through the CLI. I believe there're a couple of other issues from other users that look very similar to yours, and I wanted to get support help in finding out the root cause so we could potentially fix the issue.
Would it be possible for you to ask support a very simple question:
Why does the following command fail:
az snapshot create --name devopsVS2017-image-20191019202000_os_disk_snapshot --resource-group AzureDevOps-rg --source /subscriptions/6f335c6c-6850-40da-a64c-37021daaa4c6/resourceGroups/AZUREDEVOPS-RG/providers/Microsoft.Compute/disks/devopsVS2017_OsDisk_1_bf58f98dc70144cab32b31b4630d8a61 --output json
Thanks, Tamir
Hi Tamir,
I would answer to you like this:
Welcome to my wonderful real world with MS support ^^
While I'm quite aligned with you and would like to understand the root cause of the problem, I was wondering if there is a way for me to copy you directly in my mail thread with those guys.
Moreover, I'll stay in touch with them until I got a full solution. As it will probably also fail using the Powershell commands, which also rely on the Azure API, I'll keep you updated with this.
Best, Aymeric
Sure. My email - firstname.lastname at microsoft.com
Hi @tamirkamara
As expected (or not), I had the session with L2 support engineer which was unsuccessful using Powershell too... I don't know exactly why but you weren't cced in the emails we exchanged during this unsuccessful session. I'll forward you the latest summary and asked them to get in touch with you or at least look at the work with done together using this Github thread.
@tamirkamara things are still ongoing. I'm about to start the 3rd debugging session with support engineers tomorrow. We are currently trying to perform this move using a shared image library, after it failed to perform it with Powershell! (2x)
I've tried to ask them if we could investigate the failing az cli
command, but it seems they are bigger fans of Powershell. Anyway, I'll keep you posted at the end of the support ticket.
Do you want to join us, at some times, in one of our Teams session?
hi @tamirkamara I'm closing this issue as MS support won't investigate further and finally gave me a workaround as it was impossible to perform the move via AzCLI or PS... We finally used a distributed shared image accross regions!
Thanks for working with Microsoft on GitHub! Tell us how you feel about your experience using the reactions on this comment.
Describe the bug
Command Name
az image copy Extension Name: image-copy-extension. Version: 0.2.1.
Errors:
To Reproduce:
az login
az account set -s {}
az image copy --source-object-name {} --source-resource-group {} --target-resource-group {} --target-location {} --debug
Expected Behavior
Expected result is a successful move of the VM image to the new location in order to recreate the VM in the targeted resource group and location.
Environment Summary
Additional Context