Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Azure Shared Image Gallery - Image definition created as part of builder #35

Open
ghost opened this issue Apr 30, 2021 · 1 comment

Comments

@ghost
Copy link

ghost commented Apr 30, 2021

This issue was originally opened by @Marcus-James-Adams as hashicorp/packer#8803. It was migrated here as a result of the Packer plugin split. The original body of the issue is below.


Following on from hashicorp/packer#7809

Packer should be self-contained and be able to do everything required within a builder without outside assistance.

currently, we have to do the following before running packer

Use az cli or PowerShell to create a shared image definition, e.g. for a customised Ubuntu 18.04-LTS image: az sig image-definition create --resource-group --gallery-name <my_shared_image_gallery> --gallery-image-definition --publisher --offer UbuntuServer --sku 18.04-LTS --os-type linux

It would be good if packer could create the definition automatically as part of the builder process.

@bhundven
Copy link

bhundven commented Jun 8, 2021

I also had to add the hyper-v generation, or you might get a generation mis-match:

az sig image-definition create --resource-group <resource_group_name> --gallery-name <my_shared_image_gallery> --gallery-image-definition <gallery_image_definition> --publisher OpenLogic --offer CentOS --sku 7_9-gen2 --os-type linux --hyper-v-generation V2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant