Unfortunately the output from the ovftool command is the empty line after
"exit status 1"

* Post-processor failed: Error uploading virtual machine: exit status 1

 [0m

-on-error doesn't affect post-provisioners, I filed
https://github.com/hashicorp/packer/issues/6901to fix or clarify this.

I would advice that you remove the post-processor and run a build so you
get the artifact and then try to run:

ovftool --acceptAllEulas --name=centos7-tmpl-33b99e6 --datastore=datastore
--diskMode=thick --network="Network Name"
centos7-tmpl-33b99e6/centos7-tmpl-33b99e6.vmx
vi://<username>:<password>@vcenter-host/datacenter/host/cluster/?dns=esxi-host

Manually to troubleshoot (change the user password to the correct, unmasked
values).

On Tue, Oct 23, 2018 at 5:47 PM Jackson <
[email protected]> wrote:

> I've attached the log file. The only changes I made were to anonymize
> anything site specific. Thank you for taking the time to look.
>
> On Monday, October 22, 2018 at 11:56:03 PM UTC-6, Rickard von Essen wrote:
>>
>> Could you attach the full PACKER_LOG ?
>>
>> On Mon, Oct 22, 2018 at 10:35 PM <[email protected]>
>> wrote:
>>
>>> Running Packer version 1.3.1
>>>
>>> I have a template that uses the vmware-iso builder to give me a VM built
>>> on a local copy of VMware Fusion. This works great.
>>>
>>> I've tried to add in the vsphere post-processor but I'm running into an
>>> error at that step of the process. I wasn't getting any info from the
>>> normal output so I enabled PACKER_DEBUG=1. This also isn't giving me any
>>> output to determine the cause of the error (relevant portion included
>>> below):
>>>
>>> 2018/10/22 14:21:32 [INFO] (telemetry) Starting post-processor vsphere
>>> 2018/10/22 14:21:32 ui: ESC[0;32m    vmware-iso (vsphere): Uploading
>>> centos7-tmpl-33b99e6/centos7-tmpl-33b99e6.vmx to vSphereESC[0m
>>> 2018/10/22 14:21:32 packer: 2018/10/22 14:21:32 Starting ovftool with
>>> parameters: --acceptAllEulas --name=centos7-tmpl-33b99e6
>>> --datastore=datastore --diskMode=thick --network="Network Name"
>>> centos7-tmpl-33b99e6/centos7-tmpl-33b99e6.vmx
>>> vi://<username>:<password>@vcenter-host/datacenter/host/cluster/?dns=esxi-host
>>> 2018/10/22 14:21:32 [INFO] (telemetry) ending vsphere
>>> 2018/10/22 14:21:32 Deleting original artifact for build 'vmware-iso'
>>> 2018/10/22 14:21:32 ui error: ESC[1;31mBuild 'vmware-iso' errored: 1
>>> error(s) occurred:
>>>
>>> * Post-processor failed: Error uploading virtual machine: exit status 1
>>>
>>> ESC[0m
>>> 2018/10/22 14:21:32 Builds completed. Waiting on interrupt barrier...
>>> 2018/10/22 14:21:32 machine readable: error-count []string{"1"}
>>> 2018/10/22 14:21:32 ui error:
>>> ==> Some builds didn't complete successfully and had errors:
>>> 2018/10/22 14:21:32 machine readable: vmware-iso,error []string{"1
>>> error(s) occurred:\n\n* Post-processor failed: Error uploading virtual
>>> machine: exit status 1\n\n"}
>>> 2018/10/22 14:21:32 ui error: --> vmware-iso: 1 error(s) occurred:
>>>
>>> * Post-processor failed: Error uploading virtual machine: exit status 1
>>>
>>> Because the build fails, Packer removes all the intermediate artifacts
>>> so I'm unable to perform a manual test with the output from a failed build.
>>> I've tried adding "keep_input_artifact" as true to my post-processor but
>>> this has no effect. The documentation
>>> <https://www.packer.io/docs/templates/post-processors.html> implies
>>> that this is only checked after the successful execution of a
>>> post-processor. I've also tried -on-error=ask or -on-error=abort but
>>> neither of these ask me or abort when the post-processor runs into an error
>>> and keeps my VM artifact.
>>>
>>> So far the only thing that has worked has been to run "packer build
>>> -debug" and babysit the process as it runs, moving through each step. Once
>>> it finishes the builder, but before it runs my post-processor, manually
>>> make a separate copy of the artifact and continue on to let the build fail.
>>> A manual test will let me see the ovftool error.
>>>
>>> If anyone has any help for me to solve any of the above issues or other
>>> directions I might not have considered please let me know. I'll provide
>>> more info as necessary
>>>
>>> 1. Lack of ovftool output
>>> 2. Unable to retain output from vmware-iso builder when post-processor
>>> fails
>>>
>>> Thanks!
>>>
>>> --
>>> This mailing list is governed under the HashiCorp Community Guidelines -
>>> https://www.hashicorp.com/community-guidelines.html. Behavior in
>>> violation of those guidelines may result in your removal from this mailing
>>> list.
>>>
>>> GitHub Issues: https://github.com/mitchellh/packer/issues
>>> IRC: #packer-tool on Freenode
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Packer" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/packer-tool/a6b1f4a9-61c3-48e8-b4db-5ad12b7a0194%40googlegroups.com
>>> <https://groups.google.com/d/msgid/packer-tool/a6b1f4a9-61c3-48e8-b4db-5ad12b7a0194%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in
> violation of those guidelines may result in your removal from this mailing
> list.
>
> GitHub Issues: https://github.com/mitchellh/packer/issues
> IRC: #packer-tool on Freenode
> ---
> You received this message because you are subscribed to the Google Groups
> "Packer" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/packer-tool/a7cafd2e-c816-490a-a406-5a6560765662%40googlegroups.com
> <https://groups.google.com/d/msgid/packer-tool/a7cafd2e-c816-490a-a406-5a6560765662%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/CALz9Rt8nj3_COMZ9ROuD6CYwkvXTxMqKDoJb%2BcGqq7FmTzKrRQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to