My last successful Azure DevOps Packer Master Imag...
# -bis-f
m
My last successful Azure DevOps Packer Master Image Run was on 30. August. Since then, every try breaks during the eventlog clean-up from BIS-F, but I don't see a reason and this hasn't happend in the last three years. I started "_suddenly_"™️. I did four tries so far and they all break at nearly the same moment and Packer just errors out. Here are the logs. Anybody has seen something like this before?
Try 1-4
j
Put a pause in the Packer build before the provisioner that runs BIS-F, then log on to the console and run it directly, see what error code it exits with
m
Azure != Console 😄
But I guess I could RDP in during a Pause 😄
j
Yeah just enable RDP
provisioner "powershell" { pause_before = "6m" inline = ["Write-Host 'Continuing after 6-minute pause.'"] // this pauses Packer, NOT the VM }
Set the timer as necessary
m
Thank you very much, that's a good idea. I can check the BIS-F Log of the successful runs, to see how long BIS-F takes normally and plan the pause accordingly.
I'm now in the paused Packer Build and I ran the BIS-F cmd.. It finished without any issues.
I tried this now 3 times. During the pause BIS-F finishes without any issues. When the pipeline runs, it errors out during the very last eventlogs to delete and the build is gone. Hard to test because the build takes three hours. I guess I have to fork the code, trim down the apps to get fast Troubleshooting.
j
Just bin BIS-F, I don't find it really has much effect. I use custom sealing scripts
m
I see your point, but I do need a solution now ™️ and can't replace it just in time. I use it partly for it's feature to execute any ps1 in the PREP and/or in the PERS phase. In the past I used it to AzureAD Join (Entra) the MCS clones during boot/PERS, but afaik this is done by Citrix with the latest machine catalogs.
I now deactivated the eventlog clear temporary and in a first test deployment, the build pipeline finished. The test pipeline had a reduced app count, to finish a lot faster.
Copy code
# Remove the standalone Clear-EventLog invocation (line ~1067 upstream) to retain event logs in the image
((Get-Content "$BISFDir\Preparation\97_PrepBISF_PRE_BaseImage.ps1" -Raw) -replace "(?m)^\s*Clear-EventLog\s*\r?\n","") | Set-Content -Path "$BISFDir\Preparation\97_PrepBISF_PRE_BaseImage.ps1"
I now re-activated the full pipeline again, to see, if the build finishes now.
Problem is solved now. Instead I have just another issue now and the build still doesn't finish anymore. Now what's the best channel to ask Packer questions?
j
Automation
👍🏻 1
m
Done!