Reputation: 2378
I have to create an Image from an existing VM using Packer.This is the link I'm following to do so.
Now I have few doubts in this before proceeding further.
Packer
, is it on client Machine or remote machine? Any inputs on the above questions are appreciated.Thanks!
Upvotes: 0
Views: 836
Reputation: 31424
First of all, there is something you have misunderstood about Packer.
The Azure builder can create either a VHD, or a managed image. If you are creating a VHD, you must start with a VHD. Likewise, if you want to create a managed image you must start with a managed image.
It means you must create the image from the image or VHD, not VM.
The answer to your question.
Update
When you want to create the image from VHD file, you can make an instead:
"image_publisher": "Canonical",
"image_offer": "UbuntuServer",
"image_sku": "16.04.0-LTS",
Into
"image_url": "https://my-storage-account.blob.core.windows.net/path/to/your/custom/image.vhd",
If your vm is managed by Azure, you can pay attention to the option of custom_managed_image and images in Azure. Hope this will be helpful.
Upvotes: 1