如何从Azure中的现有私有打包程序映像创建新的打包程序映像

时间:2018-03-14 17:39:50

标签: azure packer

我正在使用这两个链接创建一个包装器图像: https://www.packer.io/docs/builders/azure.html https://docs.microsoft.com/en-us/azure/virtual-machines/linux/build-image-with-packer

我想使用'私有图片'而不是市场图片来构建:

"managed_image_resource_group_name": "myResourceGroup",
"managed_image_name": "myPackerImage",

"os_type": "Linux",
"image_publisher": "Canonical",
"image_offer": "UbuntuServer",
"image_sku": "16.04-LTS",

如何在“image_publisher”,“image_offer”,“image_sku”等中引用自己的图像?

"os_type": "Linux",
"image_publisher": "myPrivateRepo",
"image_offer": "UbuntuWeb",
"image_sku": "16-1.0",

提前致谢

1 个答案:

答案 0 :(得分:1)

我自己从未尝试过,但似乎像this一样。

而不是

"image_publisher": "Canonical",
"image_offer": "UbuntuServer",
"image_sku": "16.04.0-LTS",

"image_url": "https://my-storage-account.blob.core.windows.net/path/to/your/custom/image.vhd",