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

Packer fails to publish a VM image version to an Azure compute gallery #11558

Closed
michaelbertoni opened this issue Feb 10, 2022 · 2 comments
Closed

Comments

@michaelbertoni
Copy link

Overview of the Issue

Our Packer pipeline builds a Windows VM image and tried to publish it to an Azure Compute Gallery. The publication step failed with this error: InvalidBeginGetAccessForGalleryImageVersionSnapshotResponseFromPIR : The response from pir.BeginGetAccessForGalleryImageVersionSnapshot is invalid.

This is the first time we got this error.

Inside the Azure Portal, the VM image version inside the Compute Gallery is left in a failed state and it is not possible to re-publish the image version without deleting it first.

Reproduction Steps

Running packer from Gitlab shared runner

Packer version

packer 1.7.8

Operating system and Environment details

target VM image is Windows Server 2019 datacenter
packer runs inside a Gitlab runner, executing a docker container based on alpine 3.14

Log Fragments and crash.log files

[...]
    azure-arm.azure-sig: IMAGE_STATE_COMPLETE
    azure-arm.azure-sig: IMAGE_STATE_UNDEPLOYABLE
    azure-arm.azure-sig: IMAGE_STATE_GENERALIZE_RESEAL_TO_OOBE
==> azure-arm.azure-sig: Querying the machine's properties ...
==> azure-arm.azure-sig:  -> ResourceGroupName : '***'
==> azure-arm.azure-sig:  -> ComputeName       : 'pkrvma1asvzso2n'
==> azure-arm.azure-sig:  -> Managed OS Disk   : '/subscriptions/***/resourceGroups/***/providers/Microsoft.Compute/disks/pkrosa1asvzso2n'
==> azure-arm.azure-sig: Querying the machine's additional disks properties ...
==> azure-arm.azure-sig:  -> ResourceGroupName : '***'
==> azure-arm.azure-sig:  -> ComputeName       : 'pkrvma1asvzso2n'
==> azure-arm.azure-sig: Powering off machine ...
==> azure-arm.azure-sig:  -> ResourceGroupName : '***'
==> azure-arm.azure-sig:  -> ComputeName       : 'pkrvma1asvzso2n'
==> azure-arm.azure-sig: Capturing image ...
==> azure-arm.azure-sig:  -> Compute ResourceGroupName : '***'
==> azure-arm.azure-sig:  -> Compute Name              : 'pkrvma1asvzso2n'
==> azure-arm.azure-sig:  -> Compute Location          : 'eastus'
==> azure-arm.azure-sig:  -> Image ResourceGroupName   : '***'
==> azure-arm.azure-sig:  -> Image Name                : '***_1.4.8'
==> azure-arm.azure-sig:  -> Image Location            : 'eastus'
==> azure-arm.azure-sig: Publishing to Shared Image Gallery ...
==> azure-arm.azure-sig:  -> MDI ID used for SIG publish           : '/subscriptions/***/resourceGroups/***/providers/Microsoft.Compute/images/***'
==> azure-arm.azure-sig:  -> SIG publish resource group            : '***'
==> azure-arm.azure-sig:  -> SIG gallery name                      : '***'
==> azure-arm.azure-sig:  -> SIG image name                        : '***'
==> azure-arm.azure-sig:  -> SIG image version                     : '1.4.8'
==> azure-arm.azure-sig:  -> SIG replication regions               : '[eastus westus canadacentral canadaeast]'
==> azure-arm.azure-sig:  -> SIG storage account type              : ''
==> azure-arm.azure-sig:  -> SIG image version endoflife date      : ''
==> azure-arm.azure-sig:  -> SIG image version exclude from latest : 'false'
==> azure-arm.azure-sig:  -> SIG replica count [1, 10]             : '1'
==> azure-arm.azure-sig: ERROR: -> InvalidBeginGetAccessForGalleryImageVersionSnapshotResponseFromPIR : The response from pir.BeginGetAccessForGalleryImageVersionSnapshot is invalid.
==> azure-arm.azure-sig:
==> azure-arm.azure-sig: Code="InvalidBeginGetAccessForGalleryImageVersionSnapshotResponseFromPIR" Message="The response from pir.BeginGetAccessForGalleryImageVersionSnapshot is invalid."
==> azure-arm.azure-sig: Provisioning step had errors: Running the cleanup provisioner, if present...
@github-actions
Copy link

This issue has been migrated to hashicorp/packer-plugin-azure#183 due to the Packer Plugin split.

Please follow the new issue for updates.

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants