0
votes

I'm trying to use the "Build immutable image" release step in VSTS to create an Azure VM image. Problem is the VM deployment to create the image is failing, but I can't see the errors in Azure because Packer/VSTS is cleaning up and deleting the resource group immediately after the failure. Is there are way to have Packer in VSTS not cleanup after its self so I can debug this?

1
Do you check Skip temporary file cleanup during deprovision option in advanced section? This is the source code of that task: PackerBuildstarian chen-MSFT
Based on How to use Packer to create Windows virtual machine images in Azure, to capture that source VM for use as an image, you must define a resource group and storage account. The output from the Packer build process is stored in this resource group and storage account. So, could you check the output in resource group and storage account (not the temp resource group).starian chen-MSFT
@starain-MSFT unfortunately not. The resource group in the VSTS step is just the one that contains the storage account to write the image to, Packer creates (and deletes) it's own resource group during deployment, I can see that much in the log.Sam Cogan
@starain-MSFT Yes, I checked that box, that does not seem to impact packerSam Cogan
Do you mean there isn't the log in that resource group and storage account?starian chen-MSFT

1 Answers

0
votes

Run packer with the argument -on-error=ask