Using an Azure Marketplace Image with Packer

Packer is a fantastic tool that lets you automatically build AMIs on AWS or machine images on Azure. It’s common to start from an operating system machine image published by Microsoft but sometimes you may want to try out (and eventually use) a marketplace image. If you’re not familiar with Azure Resource Group Templates or at least to the point where you are intimate with every JSON property for every resource type (nobody is) then you might miss the subtle nuance required for Marketplace images.

I grabbed the publisher information by going through the motions in the Azure Portal.

When I ran the build I got this error:

Turns out you need the following information:

I found the plan information that I needed also in the RGT that Azure generated for me:

Once I did that, all was well.

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s