You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment
Overview of the Issue
I am working on an automation pipeline that will utilize packer to create custom compute images in Oracle Cloud Infrastructure. The packer build uses a variety of powershell provisioner blocks to provision the custom image. For some reason, at seemingly random points while packer is provisioning the image, packer will return an error similar to the one below:
==> oracle-oci.server2019: & : The term 'c:/Windows/Temp/packer-cleanup-64f1b11f-a3a0-8cd0-650a-5c290ac64efd.ps1' is not recognized as the name
2023/09/01 05:39:21 [INFO] 641 bytes written for 'stderr'
2023/09/01 05:39:21 [INFO] RPC client: Communicator ended with: 0
2023/09/01 05:39:21 [INFO] RPC endpoint: Communicator ended with: 0
2023/09/01 05:39:21 packer.exe plugin: [INFO] 0 bytes written for 'stdout'
2023/09/01 05:39:21 packer.exe plugin: [INFO] 641 bytes written for 'stderr'
2023/09/01 05:39:21 packer.exe plugin: [INFO] RPC client: Communicator ended with: 0
==> oracle-oci.server2019: of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included,
==> oracle-oci.server2019: verify that the path is correct and try again.
==> oracle-oci.server2019: At line:1 char:216
==> oracle-oci.server2019: + ... 74748.ps1; &'c:/Windows/Temp/packer-cleanup-64f1b11f-a3a0-8cd0-650a-5 ...
==> oracle-oci.server2019: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
==> oracle-oci.server2019: + CategoryInfo : ObjectNotFound: (c:/Windows/Temp...c290ac64efd.ps1:String) [], CommandNotFoundException
==> oracle-oci.server2019: + FullyQualifiedErrorId : CommandNotFoundException
==> oracle-oci.server2019:
The above example that I provided appears to be associated with the cleanup script that packer uploads to and and runs on the packer image to cleanup the powershell scripts that provisioned the image, but I am also seeing a similar error occur for other scripts as well, like the one below:
Windows PowerShell
oracle-oci.server2019: Copyright (C) Microsoft Corporation. All rights reserved.
==> oracle-oci.server2019: The argument 'C:/Windows/Temp/packer-elevated-shell-64e01ace-0e63-ff7f-5e24-a97293581a92.ps1' to the -File parameter does not exist. Provide the path to an existing '.ps1' file as an argument to the -File parameter.
oracle-oci.server2019:
==> oracle-oci.server2019: Provisioning step had errors: Running the cleanup provisioner, if present...
==> oracle-oci.server2019: Terminating instance (ocid1.instance.oc1.iad.anuwcljsf256y7icqgcjn5wsjgxtbn5uql2cwzyhonomlikwhmjiggauvqqa)...
==> oracle-oci.server2019: Terminated instance.
I am not sure what is going on, but there appears to be some kind of issue with the powershell provisioner.
Reproduction Steps
attempt to create a custom compute image using the oracle cloud infrastructure builder and a packer config similar to the one linked below.
Community Note
Overview of the Issue
I am working on an automation pipeline that will utilize packer to create custom compute images in Oracle Cloud Infrastructure. The packer build uses a variety of powershell provisioner blocks to provision the custom image. For some reason, at seemingly random points while packer is provisioning the image, packer will return an error similar to the one below:
The above example that I provided appears to be associated with the cleanup script that packer uploads to and and runs on the packer image to cleanup the powershell scripts that provisioned the image, but I am also seeing a similar error occur for other scripts as well, like the one below:
I am not sure what is going on, but there appears to be some kind of issue with the powershell provisioner.
Reproduction Steps
Packer version
packer --version
1.9.4
Simplified Packer Template
https://gist.github.com/youngturk2/77adb13dbdbe721767d8bd97aaa2ebe9
Operating system and Environment details
Windows Server 2016
Log Fragments and crash.log files
https://gist.github.com/youngturk2/d1460e3eb22b473715f1e7e4b3a2659e
The text was updated successfully, but these errors were encountered: