-
Notifications
You must be signed in to change notification settings - Fork 3k
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 image copy from one region to another does not work #25431
Comments
@zhoxing-ms for awareness |
@evolkovgit Thank you for bringing this issue to our attention. I apologize for the inconvenience caused by the error in the az image copy process. From my investigation, it appears that the error is caused by the missing "'MyHPCImage-7_os_disk_snapshot" file, which is created during the process of creating an image from a generalized VM. This file is necessary for the image service to store the image information and is also part of the billing process. I understand that you only have the mirror file in your resource group "MyHPCImage-7" which only stores information such as the path and version of the mirror file. In the event that the snapshot file is deleted, the mirror will not be usable or movable. I appreciate your feedback and we will consider reminding users of the consequences of the operation and requesting reconfirmation when they delete the snapshot file of the associated mirror. If you have any follow-up questions, please do not hesitate to contact me. |
Hi @wu5bocheng . Sorry, I am not satisfied with your answer. As I wrote in the initial BUG description, it was clear to me that the missing "'MyHPCImage-7_os_disk_snapshot" was the reason. I created the image "MyHPCImage-7" from running VM via Azure portal feature "Capture" (https://learn.microsoft.com/en-us/azure/virtual-machines/capture-image-portal) and the snapshot was NOT created automatically during the process. "MyHPCImage-7" is still perfectly working image. I successfully use it in deployments without having the "snapshot" . It works. I repeat, it is not a "mirror" as you wrote. Also I never manually deleted any snapshot. There is nothing about the "snapshot" in the above link. Also there is no portal GUI to create a "snapshot" from an image. You wrote that the "snapshot" is created during the process of creating an image from a generalized VM. It is not true. It is never created for me. Which options I should enable so the "snapshot" IS CREATED while using the "capture" feature? So it is a bug. |
Hi, @evolkovgit. I apologize for mislocating your issue earlier, I read it carefully and tried to reproduce your problem. I think you deleted the system disk of the VM where the image was created (or chose to delete the VM while creating the image). Your If it is the case of your problem, here is a temporary solution that you can try to resolve the issue:
If I have mislocated your issue, could you please provide me with the output of I hope this solution helps you. If you have any further questions or concerns, please do not hesitate to contact me. |
Hi @wu5bocheng Thank you for your response. You wrote: I will use your temporary solution (without deleting the VM during the "capture" ) and it will probably help. I still think that it is bug in Azure CLI. The "az image copy" python code should simply create missing "'MyHPCImage-7_os_disk_snapshot" automatically if it needs it and delete it afterwards (by --clean) option . Again, thank you. I will use your temporary solution. Eugene |
Hi @wu5bocheng It still did not work (probably because my VM is Linux and you are experimenting with Windows VMs)
The above is wrong (bug) because I did not specify any --temporary-resource-group-name Something to add: a. The "generalized" "vmimage" Linux VM is useless now, because I cannot SSH-login there after it was "generalized" during the "capture" process. So , since it still does not work, I will delete it. The captured image "MyHPCImage-8" is still OK, though there is still no corresponding snapshot. Since it is the same as the previous one "MyHPCImage-7" I will delete it as well after some attempts. regards, |
Hi @evolkovgit. Sorry, I just tried again, but I couldn't reproduce your problem, so more assistance may be needed from you. Please run 'az image copy --source-resource-group "ResGroupForMetaBatchAccount" --source-object-name "MyHPCImage-8" -- target-location "southcentralus" --target-resource-group "ResGroupForMetaBatchAccount-southcentralus" --cleanup --debug' and send the output to me. |
1. But I already deleted "MyHPCImage-8" and VM "vmimage". I have to do it again.
2. Why didn't you tell me to run it with the -- debug option from the very beginning?
3. Why "move" image via Azure Portal GUI does not work either?
OK, I will do it tomorrow (I am in USA, California) one more time
please, wait for my email
Eugene
|
OK, I decided not to go to sleep :-) and do it now
|
Thank you for bringing your issue to our attention. I apologize for any inconvenience caused. As the problem you are experiencing is specific and is challenging to reproduce. I appreciate your help in resolving this issue. I regret not suggesting "-- debug" option earlier. I will ensure that our team is more proactive in suggesting this option in the future. As for your question about the "move" image via Azure Portal GUI, please note that the "az_image_copy" method is still under preview, and this feature is not yet supported by the portal. We appreciate your patience and understanding as we work to resolve this issue. Thank you for your continued support. You can delete all the new formed items such as vmimage and MyHPCImage-8 except for raw image MyHPCImage-7, and your debug output should help us solve the problem. |
Hello, @evolkovgit. Thank you for bringing to our attention the new issue you are experiencing with the To solve this problem, we recommend two possible workarounds. First, if the We would also like to address your previous feedback about the inability to move images through the portal. Please note that the Also, make sure you fix the previous bug where the system disk was deleted before running copy.
We recommend that when you need to move an image in the future, please move the image first and then delete the original VM. Thank you for your understanding, and please let us know if you have any further questions or concerns. |
Hi @wu5bocheng , I was finally able to copy my image to another region using the workaround you suggested. Thank you again, |
Dear Eugene, |
The below is a command and full output. It cannot be simpler. I also tried it long time ago with "az feedback" but did not see any response. I simply want to copy my custom image from one region (eastus) to another (southcentralus). I understand that the system is looking for "'MyHPCImage-7_os_disk_snapshot" and I do not have it. But why should I have it? I have an existing image "MyHPCImage-7" which I successfully use in my deployments. This should be enough. I want to add that the corresponding question by somebody else on stackoverflow was never answered: https://stackoverflow.com/questions/45720966/how-to-copy-an-azure-image-from-one-region-to-another-region
I did that long time ago, never got a response
Related command
az image copy --source-resource-group "ResGroupForMetaBatchAccount" --source-object-name "MyHPCImage-7" --target-location "southcentralus" --target-resource-group "ResGroupForMetaBatchAccount-southcentralus" --cleanup
Describe the bug
It returns ERROR, the image is not copied
To Reproduce
Run the above command
Additional context
It is a linux image . Please help to copy image to another region.
The text was updated successfully, but these errors were encountered: