我正在将Custom Image
从norteurope
区域复制到eastus
中的Azure
,所以我可以在Virtual Machines
区域中创建eastus
基于复制的Custom Image
。我正在使用以下Azure CLI
命令:
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
Azure CLI
复制命令抛出错误,并给我以下错误消息:
我正在使用Azure CLI
,主要执行以下步骤:
Resource Group
中创建了一个名为playground-demo-rg2
的新eastus
Image Copy Extension
,以便从northeurope
复制到eastus
Custom Image(playground-windows-vm-image-1)
从Source Resource Group(playground-demo-rg)
复制到Target Resource Group(playground-demo-rg2)
我已经上传了完整的PS
脚本,该脚本在执行时引发了上述错误:
https://github.com/jagjitsingh700/AzureVirtualMachines/blob/master/CopyingCustomImageToRegion.ps1
答案 0 :(得分:0)
这是known issue,我也遇到此错误。一个新的未解决的问题是Github here。
作为解决方法,您可以在Azure中使用Shared Image Gallery。使用共享图像库,您可以将图像共享给组织内的其他用户,服务主体或广告组。共享的映像可以复制到多个区域,以更快地扩展部署。
或copy Managed Images with Powershell。此外,您可以参考this blog将Azure VM从区域A复制到区域B。