Packer build halts at uploading PowerShell script on Windows Google Compute Instance

12 views
Skip to first unread message

D Bajaj

unread,
Mar 2, 2023, 1:08:13 PM3/2/23
to Packer
I am trying to build Windows custom image using Google compute instance using packer. The build exits with following error:

==> googlecompute: Provisioning with powershell script: /tmp/powershell-provisioner2323994912
    googlecompute: Downloading Qualys Windows Agent
==> googlecompute: C:\packertemp\qualys.ps1 : System.InvalidOperationException: This command cannot be run due to the error: The file or
==> googlecompute: directory is corrupted and unreadable.
==> googlecompute:    at System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(ErrorRecord errorRecord)
==> googlecompute: At C:\Windows\Temp\script-6400b624-a2a1-b240-5cfc-d2032ae6f885.ps1:1 char:1
==> googlecompute: + c:\packertemp\qualys.ps1
==> googlecompute: + ~~~~~~~~~~~~~~~~~~~~~~~~
==> googlecompute:     + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
==> googlecompute:     + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,qualys.ps1
Reply all
Reply to author
Forward
0 new messages