我正在努力将自定义镜像
从norteurope
区域复制到Azure
中的eastus
,这样我就可以根据复制的自定义镜像
在eastus
区域创建虚拟机
。我正在使用以下 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
,主要执行以下步骤:
- 我在
eastus
中创建了一个名为playground-demo-rg2
的新资源组
- 安装了
图像复制扩展
,以便从northeurope
复制到eastus
- 将现有
自定义镜像(playground-windows-vm-image-1)
从源资源组(playground-demo-rg)
复制到目标资源组(playground-demo-rg2)
我已经上传了完整的 PS
脚本,该脚本在执行时抛出上述错误:
https://github.com/jagjitsingh700/AzureVirtualMachines/blob/master/CopyingCustomImageToRegion.ps1
最佳答案
这是一个 known issue我也面临这个错误。一个新的开放问题是 Github here .
作为解决方法,您可以使用 Shared Image Gallery在 azure 中。使用共享图像库,您可以将图像共享给组织内的不同用户、服务主体或 AD 组。共享镜像可以复制到多个区域,以便更快地扩展部署。
或者copy Managed Images with Powershell 。另外,您可以引用this blog将 Azure VM 从区域 A 复制到区域 B。
关于azure - 将自定义镜像从 Azure 中的一个区域复制到另一个区域时出现错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58462346/