Now that we have created the Packer templates, the next step is to run Packer to generate a custom VM image, which will be used to quickly provision VMs that are already configured and ready to use for your applications.
As a reminder, to generate this image, Packer will, from our JSON template, create a temporary VM, on which it will perform all of the configuration actions described in this template, and then it will generate an image from this image. Finally, at the end of its execution, it removes the temporary VM and all of its dependencies.
To generate our VM image in Azure, follow these steps:
- Configure Packer to authenticate to Azure.
- Check our Packer template.
- Run Packer to generate our image.
Let's look in detail at the execution of each of its steps.