Hi all,
I wanted to post this first to the ML. But my posts don't appear although I am subscribed.
I'm trying to use the Vsphere post-processor and always and up with a failure(see Gist ). My guess is that the build artifact gets deleted, before it is even uploaded. And this although I defined "keep_input_artifact".
My post-processor configuration looks like this:
"post-processors": [
{
"type": "vsphere",
"keep_input_artifact": true,
"username": "{{ user `vsphere_user` }}",
"password": "{{ user `vsphere_password` }}",
"vm_name": "{{ user `box_name` }}",
"host": "{{ user `vsphere_host` }}",
"datacenter": "{{ user `vsphere_dc` }}",
"cluster": "{{ user `esx_host` }}",
"resource_pool": " "
}
]
I verified the values by manually uploading an OVF-file with "ovftool".
Does anybody have an idea of what's going on?
Cheers, Shorty
From the log, you appear to be running the vmware-iso
builder against an esxi instance. When building against esxi, Packer produces the mitchellh.vmware-esx
artifact type. The vSphere post-processor does not recognize that artifact type, which is why the build is failing when it gets to the post-processor phase with an error.
We could build support for the post-processor to use those artifacts, but that would require Packer to download the artifacts to the system you are running Packer on before issuing the ovftool command. At minimum, we should add documentation to make clear the behavior is different if building from the esxi builder.
@jasonberanek Yes, I use vmware-iso and build on an ESX host. Yes, please update the documentation. I tried for at least a hole day to get this construct running. I really thought I could build the box on an ESX-host and move it somewhere else in our Vsphere cluster with the post-processor.
I will now try to just build the box without any post-processing and do the rest by myself with a script/ovftool/ssh etc.
Thanks a lot
@jasonberanek Just to be sure that I understand you correctly. The "vsphere" post-processor does not work with the builder-type vmware-iso and remote_type esx5? It does only work with a Vmware desktop product.
@bemeyert That is correct, the vsphere post-processor works with the VMware desktop products.
@jasonberanek Cool, this is what I needed. Now I have something to show to my boss :-) Cheers
Hi,
I've tried to fix this issue in my branch.
https://github.com/higebu/packer/tree/add-step-export-to-esxi-driver
But my work is currently in progress.
I have the similar problem luckily I found this thread...
here is my usecase
I am assuming this fix will support the use case that I have mentioned above. Also please make resource pool and cluster as optional argument for post-construct operation.
Is the fix available in 0.7.5?
@rkarimuthu, no, it's not in the official 0.7.5 release.
See https://github.com/mitchellh/packer/pull/1921 for the latest thread regarding this issue.
@higebu produced an unofficial release as indicated here:
https://github.com/mitchellh/packer/pull/1577
Basically, it can be found here:
https://github.com/higebu/packer/releases/tag/v0.7.5.higebu
I reopened the p-r for this issue:
https://github.com/mitchellh/packer/pull/1921
And the latest version of binaries are here:
https://github.com/higebu/packer/releases/tag/v0.7.5.higebu5
Hi all,
We are using builder:
"type": "vmware-iso",
"remote_type": "esx5"
now we want to use vsphere post processor to create template in vcenter server.
Is this suported in latest packer 0.8.1 version?
or this is somehow working only in higebu branch?
Regards,
Vladimir Ondrus
First: Thanks a lot for the great software - it change the face of sysadmin.
I was also under the impression that you can build using any builder and afterwards the ovftool will convert your machine and upload to vsphere.
I was trying to build with virtualbox-iso and post process with vsphere.
Is this supported?
Sorry I could not found some hint like which post processors are compatible with which builders.
jasonberanek commented on 3 Sep 2014:
At minimum, we should add documentation to make clear the behavior is different if building from the esxi builder.
I didn't find any information about it in documentation and spend a whole day searching a solution.
Please add hint to documentation soon.
My team and I also spen't a couple of days trying to get this to work before discovering this thread.
I would be grateful if you could clarify in the documentation that you can't use the vSphere Post-Processor when building Building on a Remote vSphere Hypervisor.