Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to copy an Azure Image from one region to another region

Tags:

azure

I have a (sysprepped/generalized) server template in an Azure Image in an Azure region (Canada Central). I would like to use it to create an Azure VM in a different Azure region (Central US). It doesn't work.

So, I need that Azure Image to also reside in Central US. How can I copy my Azure image from one Azure region to another?

like image 320
Jay Godse Avatar asked Aug 16 '17 18:08

Jay Godse


1 Answers

You can use azure cli extension to copy images between region

az extension add --name image-copy-extension
az image copy --source-resource-group mySources-rg --source-object-name myImage --target-location uksouth northeurope --target-resource-group "images-repo-rg" --cleanup

**EDIT: There is a new way to share images between regions, Shared Image Gallery.

You can decide which regions will have access to the image with the --target-regions option.

like image 121
darc Avatar answered Oct 02 '22 12:10

darc