-
Notifications
You must be signed in to change notification settings - Fork 13
Ovftool import #8
base: master
Are you sure you want to change the base?
Conversation
…type before uploading to vsphere
…or-vsphere-ova into test * 'master' of https://github.com/Banno/packer-post-processor-vsphere-ova: Update README.md
@daxgames This looks like a great update on first glance. I'm going to run it against our internal packer build script to make sure it all works well and if so, I'll merge it in. Thanks for the PR! |
Hopefully it works for you. It works well here. |
I really tried to make this work (merge in progress at https://github.com/Banno/packer-post-processor-vsphere-ova/tree/merge-daxgames-ovftool_import), but I unfortunately kept getting I'm going to take a look and see if it works with the master branch so we can determine if it's a problem with our vSphere and not ovftool. |
Interesting. Could it be certificate related? Are you using trusted or self signed certs in vsphere? |
If self-signed you may need to add "insecure": "true" to your packer template post-processor section. Not sure if this was in the readme changes, we could add it if not. |
This still uses SSL it just disabled certificate verification. |
I also noticed that my pull request changes your tabs from a 4 char tab to 2 spaces. I can fix that if you like, just let me know. It is our best practice to use 2 spaces vs tabs so my editor does that automatically. |
a1823e2
to
869a024
Compare
0030f19
to
a3f5cf0
Compare
a3f5cf0
to
488558b
Compare
@daxgames Yeah, it's getting pass SSL for sure. It goes for about 30 seconds and then just stops. I can actually see the uploade vmx and vmdk within the datastore for a short while until it fails. Re the formatting, I've used used gofmt to always reformat the file on save. Whether it's a tab of 2 spaces, I'm not terrible concerned. Just consistency is good for me. |
I am not sure I can even test it now. Let me see what I can do and I will let you know. |
Fixed output type stuff in README.md
@rubbish Here is my "post-processors": [
{
"type": "vsphere-ova",
"host": "{{ user `vcenter_host` }}",
"username": "{{ user `vcenter_user` }}",
"password": "{{ user `vcenter_password` }}",
"datacenter": "MyDC",
"datastore": "datastore01",
"vm_folder": "packer-templates",
"vm_network": "VM Network",
"virtual_hardware_version": "8",
"remove_floppy": true,
"remove_optical_drive": false,
"disk_mode": "thin",
"cluster": "MyCluster",
"output_artifact_type": "template",
}
] @daxgames I also have two feature requests for your code.
Obviously, second one is not critical but first one is. I can use shell-local using this script and do the same, but it would be great to have everything packaged together. I am not well versed with go, otherwise I would have done this myself. |
@vikas027, Regarding your requests. I hate to make the process interactive. What if you could add it to the post-processor definition in the json file. Not sure my code is what is doing this and not saying I can do it but I will look. |
@daxgames yeah, I meant an addition in Json template. Sorry, I wasn't clear. I too do not like user interactive things in my automation framework. |
@daxgames I have one more request for you to make your work production ready :), and this I believe would be an easy one. For now, we cannot choose the ESXi host where we want to put the resultant template as the vi://<vcenter_user>:<vcenter_password>@<vcenter_host>/<datacenter>/host/<cluster> It would be great if there is an option to choose among multiple ESXi hosts as well. To make that happen, the packer post-processor would have to append the ESXi host at the end vi://<vcenter_user>:<vcenter_password>@<vcenter_host>/<datacenter>/host/<cluster>/<esxi_host> To sum up, I have three requests for you in order of priority
Thank you in advance for you work on this. @rubbish Not sure, why this didn't worked for you, I have checked this PR in four different environments, and it worked fine in all of them. I do not no Golang, but I would be happy to help in whatever way I can. Thanks. |
Just giving a +1 in the sense that with this branch I was finally able to make a template in vcenter. |
I'll come back to this and retry it here in a bit. Not exactly sure what the problem I was running into. |
I made some changes to this today to fix some bugs. Only fixes, no enhancements yet. |
Still working on it. |
Still still? :) |
@mrjcleaver ??? |
Are you still working on it? I'm wondering if / when this will get get merged. |
@mrjcleaver I am not working on it. As far as I am concerned it is complete. There are things people have asked for but I have no way to implement/test at this point. As for merge that is up to those that maintain this repo. |
This is a big change, not sure you ever looked it it based on my last email to you. I never saw a response so I never did a pull request until now.
This uses OVFTool to do the import. No clone required, No wait required, results in a more ESXi compatible VM Template that uses a managed vmdk type like seSparse, eagerZeroedThick, thin, or
thick when using the resulting artifact in ESXi as a template. Will require some changes to Packer Templates.