在Azure中将自定义图像从一个区域复制到另一区域时出错

时间:2019-10-19 09:42:00

标签: azure virtual-machine azure-cli

我正在将Custom Imagenorteurope区域复制到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复制命令抛出错误,并给我以下错误消息:

enter image description here

我正在使用Azure CLI,主要执行以下步骤:

  1. 我在Resource Group中创建了一个名为playground-demo-rg2的新eastus
  2. 已安装Image Copy Extension,以便从northeurope复制到eastus
  3. 将现有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

1 个答案:

答案 0 :(得分:0)

这是known issue,我也遇到此错误。一个新的未解决的问题是Github here

作为解决方法,您可以在Azure中使用Shared Image Gallery。使用共享图像库,您可以将图像共享给组织内的其他用户,服务主体或广告组。共享的映像可以复制到多个区域,以更快​​地扩展部署。

copy Managed Images with Powershell。此外,您可以参考this blog将Azure VM从区域A复制到区域B。

相关问题