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

How to create a new packer image from an existing private packer image in Azure

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

我想使用 'private image' 而不是市场图像来构建:

"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",

提前致谢

我自己从未尝试过,但它看起来像 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",

我使用 custom_managed_image_namecustom_managed_image_resource_group_name 属性让它工作。