【问题标题】:Terraform with Azure使用 Azure 进行 Terraform
【发布时间】:2019-03-20 14:04:27
【问题描述】:

如何使用位于不同订阅存储帐户的自定义映像 (VHD) 创建 VM(差异订阅 ID)。用过这个

storage_os_disk {
    name              = "${var.Servername}-os-disk"
    create_option     = "FromImage"
    caching           = "${var.disk_perm}"
    os_type           = "${var.ostype}"
    vhd_uri           = "https://myimages.blob.core.newone.net/myvhds/REDHAT7.vhd"
}

【问题讨论】:

    标签: azure terraform azure-virtual-machine vhd


    【解决方案1】:

    很遗憾,您无法从不同订阅中的 VHD 文件创建 VM。你 只需使用 VHD 文件在同一订阅和同一区域中创建 VM。不仅是虚拟机,镜像和快照也是同样的限制。

    如果您确实想从 VHD 文件创建 VM,则必须将 VHD 文件复制到相同的订阅和区域中。我建议使用 AzCopy 工具。

    【讨论】:

      猜你喜欢
      • 2021-07-16
      • 2018-03-26
      • 2020-03-30
      • 2022-01-20
      • 2018-11-03
      • 1970-01-01
      • 1970-01-01
      • 2021-12-21
      • 1970-01-01
      相关资源
      最近更新 更多