Reputation: 751
I am working on copying a Custom Image
from norteurope
region to eastus
in Azure
, so I can create Virtual Machines
in eastus
region based on the copied Custom Image
. I am using following Azure CLI
command:
az image copy `
--source-object-name "playground-windows-vm-image-1" `
--source-resource-group 'playground-demo-rg' `
--target-location 'eastus' `
--target-resource-group 'layground-demo-rg2' `
--cleanup
The Azure CLI
copy command is throwing an error and giving me following error message:
I am using Azure CLI
and mainly did following steps:
Resource Group
with name playground-demo-rg2
in eastus
Image Copy Extension
in order to copy from northeurope
to eastus
Custom Image(playground-windows-vm-image-1)
from Source Resource Group(playground-demo-rg)
to Target Resource Group(playground-demo-rg2)
I have uploaded the full PS
script which threw the above error upon execution:
https://github.com/jagjitsingh700/AzureVirtualMachines/blob/master/CopyingCustomImageToRegion.ps1
Upvotes: 1
Views: 537
Reputation: 28224
It's a known issue and I also face this error. A new open issue is Github here.
As a workaround, you could use Shared Image Gallery in Azure. Using a Shared Image Gallery you can share your images to different users, service principals, or AD groups within your organization. Shared images can be replicated to multiple regions, for quicker scaling of your deployments.
Or copy Managed Images with Powershell. Additionally, you could refer to this blog to Copy an Azure VM From Region A to Region B.
Upvotes: 1